[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Copy idiom and overriding namespaces: trying to be
Hi George,
Thanks for looking into it and remembering. I looked through the thread, and what I understand from it, is that it's basically the same approach I am using. Meaning, that I should feel confident with the current solution as being the right one to use. A copy of my last attempt, leaving out comment nodes and processing instructions: <xsl:template match="@*" > <xsl:copy /> </xsl:template> <xsl:template match="*" > <xsl:element name="{local-name()}" namespace="{$target-namespace}"> <xsl:apply-templates select="@* | node()" /> </xsl:element> </xsl:template> In short, I could conclude that it is not possible to make a template only for namespace nodes and change the result tree namespace when you encounter an input namespace. Use for-each can be used for getting all namespace nodes. Using the above, can be used to create elements that are ripped off of any namespace information, and receive a new namespace instead. Looking again at the above, it doesn't look that hard anymore now... ;) Cheers, Abel George Cristian Bina wrote: Hi Abel,
|
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
|