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

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top