Nesting same-prefix namespaces

H

Hugo Wetterberg

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
 
M

Martin Honnen

Hugo said:
<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.
 

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
474,001
Messages
2,570,254
Members
46,850
Latest member
VMRKlaus8

Latest Threads

Top