Help: targetNamespace value on my machine...

Gianni Rubagotti

Usenet Archive
Joined
Jun 3, 2002
Messages
4
Reaction score
0
I'm writing an XMl schema to learn and I have a problem

I want that my schema work on my PC, not to put it on the internet but everytime I serach in tutorials the examples put as value of targetNamespace a http and I don't know what's the well formed URI to say my Schem is in

C:\skima\

C:\skima\
File//C:\skima\
File:\skima\
don't works

How I can write instead of

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="FILE:\skima\" xmlns="FILE:\skima\" elementFormDefault="qualified">

?

Thank you,
Gianni Rubagotti

P.S.: i validate with
http://tools.decisionsoft.com/schemaValidate.html
 

Patrick TJ McPhee

Usenet Archive
Joined
Apr 2, 2000
Messages
269
Reaction score
0
% I want that my schema work on my PC, not to put it on the internet but % everytime I serach in tutorials the examples put as value of % targetNamespace a http and I don't know what's the well formed URI to % say my Schem is in

The targetNamespace is not the address of a resource. It's a unique string which identifies your set of definitions. If you're not going to publish your schema, you can use anything, or leave the name space out altogether. People use http URLs because the domain name registry provides a convenient way of keeping them unique. Supposing you owned the domain giannirubagotti.it, you could use something like http://ns.giannirubagotti.it/project, and feel properly affronted if somebody else created a conflicting schema using the same name space.

The URL doesn't have to use http:, but it shouldn't use file:, because there's no guarantee of uniqueness. Technically, what you've written ought to work -- if you feel more comfortable sticking with file:, I suggest making the file name less likely to be repeated

file:///c/giannirubagotti/it/skima/project-name
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,042
Messages
3,104,223
Members
248,131
Latest member
Tonypshaw1

Latest Threads

Top