Altova Mailing List Archives

Re: trying to get xslt to work with xml and xsd

From: Mark Johnson <102334.12@----------.--->
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.


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.