Altova Mailing List Archives
>microsoft.public.xml Archive Home
>Thread Prev - Re: trying to get xslt to work with xml and xsd
>Thread Next - Re: trying to get xslt to work with xml and xsd
Re: trying to get xslt to work with xml and xsd
Date: 8/28/2003 10:56:00 PM
Oleg Tkachenko <oleg@N...> wrote: >Mark Johnson wrote: > >> Exactly. And you have to do so, explicitly. A default ns will 'hide' >> nodes from XPath. >Well, that's a pure sophistics. Equally one can say "Changing namespace >form A to B hides nodes from XPath". And that's also true actually. Not if you change A to B in expressions attempting to retrieve nodes in A or B. But you can't change anything, there's nothing you can do, to get nodes in a default ns - correct? They're 'hidden', and can't be found. The solution is that they literally need an explicit prefix, or one has to remove the declaration of a default ns in that scope. That's why I wondered - why and when is a default ns ever used, given that problem? >Well, for readability or to save couple of kilobytes or for backward >compatibility with namespace-unaware legacy code (XHTML case). Many >people really believe life would be easier without default namespaces, >but that's too late to change anything. Of course, a simple solution - XPath 2.0 could be written to handle default namespaces.