|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: removing namespaces
I should have written "tiding up namespaces" instead of "removing" as I
don't want to loose them. I just want to clean them up.
Maybe I am wrong but I thought that if the "method" element has the namespace "http://new.element", all child elements will belong to this namespace too. So there's no need to write the namespaces of the child elements to the output. The namespaces are as you proposed defined in the stylesheet element on top of the stylesheet: <xsl:stylesheet version="2.0" xmlns:srcml="http://srcml.de" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:srcml-new="http://new.element" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:meta="http://srcml.de/meta"> ... I don't really understand why the namespaces show up in the elements although they are declared on top of the stylesheet. And I am wondering where the xmlns="" comes from. It would just look nicer if I could get rid of the namespaces in the elements. If I use the Syntax srcml-new:modifiers in the template instead of just "modifiers" there is still the complete srcml-new namespace definition in the output. regards, Garvin I'm not totally sure of what you mean by "hiding" a namespace, which is impossible. Either you remove it (which means you change the QName of the elements) or you leave it in. Cleaning up namespaces (putting there declarations on top of the XML) is possible by declaring the namespaces in the xsl:stylesheet declaration element (and I'm sure there are other ways, but I believe that's the way I did it). Then, all you need to do is use the prefixes in your element names:
|
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
|






