xsd:schema targetNamespace="nondomainstring" possible ?

M

Markus Meckler

Somewhere (I don't remember where) that Is it possible to enter a simple string as namespace
in a xsd schema definiton. E.g.:

<xsd:schema targetNamespace="mydomainstring">

Is this true?

Marcus
 
H

Henry S. Thompson

Somewhere (I don't remember where) that Is it possible to enter a simple string as namespace
in a xsd schema definiton. E.g.:

<xsd:schema targetNamespace="mydomainstring">

Is this true?

Yes. Although XML Namespaces deprecates the use of relative URIs
(which is what that is, technically), W3C XML Schema does not enforce
this. In practice virtually any string can be used as a namespace
name. Strictly speaking, it must be a syntactically valid URI or URI
reference, but that imposes only very modest constraint.

ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: (e-mail address removed)
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
 
C

Cat

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Somewhere (I don't remember where) that Is it possible to enter a simple string as namespace
in a xsd schema definiton. E.g.:

<xsd:schema targetNamespace="mydomainstring">

Is this true?

Marcus
Yes it is true, it's useful for testing etc. Anything you release in the wild
should..
"have the characteristics of uniqueness and persistence"

http://www.w3.org/TR/REC-xml-names/

See above for other details.
- --
Cat

http://www.ratrobot.com/writing/sport/ Would you cheat in a $100 million
dollar lottery if you knew they wouldn't catch you? This is the problem with
drugs in sport. How do we solve it?
Mon Jun 28 21:38:31 UTC 2004
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA4I/XKHRjYtwQ1QARAg+tAJ9SFCa+GNhKLC+jyIxos+sCD45DHwCdG9K9
pdQZieafy+gwQK3lopV9AWs=
=GCa9
-----END PGP SIGNATURE-----
 
P

Priya Lakshminarayanan [MSFT]

Yes, the targetNamespace attribute is typed as xs:anyURI in the
SchemaForSchema, and hence it can contain any string that is allowed by the
lexical representation for xs:anyURI. xs:anyURI allows absolute as well as
relative uris.

Thanks,
Priya
 

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
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top