Nesting same-prefix namespaces

Discussion in 'XML' started by Hugo Wetterberg, Nov 10, 2005.

  1. Hi All,
    If i have this snippet:
    <Gengis xmlns="hw.gengis.FileProxy">
    <Styler xmlns:Styler="hw.gengis.stylers.StylerSet">
    <Styler:Styler xmlns:Styler="hw.gengis.stylers.Flat">
    <Styler:Normal>
    <Styler:Active>
    <Styler:Selected>
    </Styler:Styler>
    </Styler>
    </Gengis>

    Will then the child Styler-element that declares
    xmlns:Styler="hw.gengis.stylers.Flat" have the namespace
    "hw.gengis.stylers.StylerSet" or "hw.gengis.stylers.Flat"?

    /Hugo Wetterberg
    Hugo Wetterberg, Nov 10, 2005
    #1
    1. Advertising

  2. Hugo Wetterberg wrote:

    > <Gengis xmlns="hw.gengis.FileProxy">
    > <Styler xmlns:Styler="hw.gengis.stylers.StylerSet">
    > <Styler:Styler xmlns:Styler="hw.gengis.stylers.Flat">


    > Will then the child Styler-element that declares
    > xmlns:Styler="hw.gengis.stylers.Flat" have the namespace
    > "hw.gengis.stylers.StylerSet" or "hw.gengis.stylers.Flat"?


    hw.gengis.stylers.Flat is the namespace URI (as far as that thing in the
    example deserves to be called a URI) of that element.
    See <http://www.w3.org/TR/REC-xml-names/#scoping>, the first
    xmlns:Styler="hw.gengis.stylers.StylerSet" is in scope for that Styler
    element and its descendants but for the Styler:Styler element and its
    descendants it is overridden by xmlns:Styler="hw.gengis.stylers.Flat.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Nov 10, 2005
    #2
    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. Tim Tyler
    Replies:
    36
    Views:
    1,445
    Darryl L. Pierce
    Dec 10, 2004
  2. PA
    Replies:
    0
    Views:
    388
  3. KJ
    Replies:
    6
    Views:
    503
  4. Chris  Chiasson
    Replies:
    6
    Views:
    602
    Richard Tobin
    Nov 14, 2006
  5. Trans
    Replies:
    10
    Views:
    286
    Sean O'Halpin
    Sep 16, 2005
Loading...

Share This Page