Help: targetNamespace value on my machine...

  • Thread starter Gianni Rubagotti
  • Start date
G

Gianni Rubagotti

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
 
P

Patrick TJ McPhee

% 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

Forum statistics

Threads
473,995
Messages
2,570,233
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top