Re: question on default namespace
I tried to transform a document with a default namespace. In the result I wanted to include the contents of another document that is in no namespace. The xslt-snippet below didn't work, only when I deleted the xpath-default-namespace and added to all elements processed the namespace it worked. Are there any other solutions that include the xpath-default-namespace?
You can declare xpath-default-namespace any number of times by adding it to *any* instruction using:
... or to any literal result element using:
There is no obligation to use it only on the document element.
It has scope for all the descendants until it hits another such declaration
Can I "reset" an xpath to no use of a namespace?
Any time you want. Just use an empty string.
I hope this helps.
. . . . . . . . . Ken
-- XQuery/XSLT training in Prague, CZ 2009-03 http://www.xmlprague.cz XQuery/XSLT/XSL-FO training in Los Angeles/Anaheim - 2009-06-01/10 Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format