[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: root siblings contain xmlns=""
Hi Mike, tried to follow your advice and declared the namespace in the stylesheet element. unfortunately I still get the wrong output. below my testfiles. test.xml: <test > <element1>test</element1> <element2>test</element2> </test> test.xsl: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="a-namespace-uri" exclude-result-prefixes="xs"> <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="test"> <Fxml Version="2_0_2"> <xsl:apply-templates/> </Fxml> </xsl:template> </xsl:stylesheet> output: <?xml version="1.0" encoding="UTF-8"?><Fxml xmlns="a-namespace-uri" Version="2_0_2"> <element1 xmlns="">test</element1> <element2 xmlns="">test</element2> </Fxml> my desired output: <?xml version="1.0" encoding="UTF-8"?><Fxml xmlns="a-namespace-uri" Version="2_0_2"> <element1>test</element1> <element2 >test</element2> </Fxml> thx Christoph This message and any attachment ("the Message") are confidential. If you are not the intended recipient any use is strictly prohibited. If you have received the Message in error, please notify the sender immediately and delete the Message from your system, any use is forbidden. Correspondence via e-mail is primarily for information purposes. KAG/RVG/RIFA/ImmoKAG neither makes nor accepts legally binding statements unless otherwise agreed to the contrary
|
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
|