XSLTGeneral questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
I'm curious if there's a method in XSLT to get the default namespace of the input document.
I have a situation where I need to get the default namespace of the input document, but the root element node MIGHT be in a prefixed alternate namespace.
If the root element node was IN the default namespace always, I could use something like the following:
Unfortunately, that it's just a work around the real problem. When I have the root element in a prefixed-namespace, the above code obviously does not get the default namespace. I need to be able to get the default namespace when I have a document structure like the following: