Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Usage of hash sign in schema

Reply
Thread Tools

Usage of hash sign in schema

 
 
Martin v. Lwis
Guest
Posts: n/a
 
      01-08-2008
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
 
Reply With Quote
 
 
 
 
Joseph Kesselman
Guest
Posts: n/a
 
      01-08-2008
At a guess, without having checked: Reduce the risk a human will confuse
these with values which aren't keywords?

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
 
Reply With Quote
 
 
 
 
Martin v. Lwis
Guest
Posts: n/a
 
      01-08-2008
> 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
 
Reply With Quote
 
Richard Tobin
Guest
Posts: n/a
 
      01-08-2008
In article <4783dfd6$0$12460$(E-Mail Removed)>,
Martin v. Lwis <(E-Mail Removed)> wrote:
>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
--
:wq
 
Reply With Quote
 
usenet@tech-know-ware.com
Guest
Posts: n/a
 
      01-09-2008
On 8 Jan, 23:50, (E-Mail Removed) (Richard Tobin) wrote:
> In article <4783dfd6$0$12460$(E-Mail Removed)>,
> Martin v. Lwis <(E-Mail Removed)> wrote:
>
> >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).


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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hash of hash of hash of hash in c++ rp C++ 1 11-10-2011 04:45 PM
Hash#select returns an array but Hash#reject returns a hash... Srijayanth Sridhar Ruby 19 07-02-2008 12:49 PM
Prototype Object.extend(new Base() | Hash | Hash.prototype) usage: jacobstr@gmail.com Javascript 3 03-27-2007 07:56 AM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
J sign instead of ? sign Harold Potter esq. Computer Support 5 04-16-2005 02:19 PM



Advertisments