[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] root siblings contain xmlns=""
Subject: RE: [xsl] root siblings contain xmlns="" From: christoph.klocker@xxxxxx Date: Mon, 12 Jun 2006 12:04:37 +0200 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] root siblings contain xml, Michael Kay | Thread | [xsl] RE : RE: [xsl] root siblings , Florent Georges |
RE: [xsl] root siblings contain xml, Michael Kay | Date | [xsl] Listing keywords, Phillip B Oldham |
Month |