Usage of hash sign in schema

  • Thread starter Martin v. Löwis
  • Start date
M

Martin v. Löwis

In schema, several attributes have "special" values that start
with a hash sign, e.g. #all (for final) and ##any, ##targetNamespace,
##local (for namespace). What is the rational for having the hash
sign there? Wouldn't "all" have worked just as fine for fullDerivationSet?

Regards,
Martin
 
J

Joseph Kesselman

At a guess, without having checked: Reduce the risk a human will confuse
these with values which aren't keywords?
 
M

Martin v. Löwis

At a guess, without having checked: Reduce the risk a human will confuse
these with values which aren't keywords?

So no technical reasons. Could well be. However, for final/block, every
other possible value is a keyword, too (restriction, extension, ...) -
it's an enumerated type. So this human is rather confused by the
presence of the hash than by its absence :)

Regards,
Martin
 
R

Richard Tobin

In schema, several attributes have "special" values that start
with a hash sign, e.g. #all (for final) and ##any, ##targetNamespace,
##local (for namespace). What is the rational for having the hash
sign there? Wouldn't "all" have worked just as fine for fullDerivationSet?

I think the double hash is to prevent it from clashing with any
possible namespace name (though namespace names are supposed to be
absolute URIs).

-- Richard
 
U

usenet

I think the double hash is to prevent it from clashing with any
possible namespace name (though namespace names are supposed to be
absolute URIs).

The double hash also makes sure it won't match any valid QName /
NCName. I'm not sure if this is significant for XSD 1.0, but it will
be for XSD 1.1 (where a wildcard can currently have a value of
notQName='##defined').

Whether this is by design, or a lucky break for the people developing
XSD 1.1 I don't know!

HTH,

Pete Cordell
Codalogic
Visit http://www.codalogic.com/lmx/ for XML C++ data binding
 

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,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top