Usage of hash sign in schema

Discussion in 'XML' started by Martin v. Löwis, Jan 8, 2008.

  1. 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
    Martin v. Löwis, Jan 8, 2008
    #1
    1. Advertising

  2. 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
    Joseph Kesselman, Jan 8, 2008
    #2
    1. Advertising

  3. > 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
    Martin v. Löwis, Jan 8, 2008
    #3
  4. In article <4783dfd6$0$12460$>,
    Martin v. Löwis <> 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
    Richard Tobin, Jan 8, 2008
    #4
  5. Martin v. Löwis

    Guest

    On 8 Jan, 23:50, (Richard Tobin) wrote:
    > In article <4783dfd6$0$12460$>,
    > Martin v. Löwis <> 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
    , Jan 9, 2008
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Markus
    Replies:
    1
    Views:
    1,497
    Markus
    Nov 23, 2005
  2. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,170
    Stanimir Stamenkov
    Apr 25, 2005
  3. Jimmy
    Replies:
    1
    Views:
    918
    Cowboy \(Gregory A. Beamer\)
    Nov 21, 2006
  4. rp
    Replies:
    1
    Views:
    494
    red floyd
    Nov 10, 2011
  5. Jimmy
    Replies:
    3
    Views:
    2,380
    shimmyshack
    Nov 20, 2006
Loading...

Share This Page