Re: [Gestalt-users] Copied elements loose the namespace part of theirname
Status: Alpha
Brought to you by:
colin-adams
From: Florent G. <dar...@ya...> - 2006-09-20 12:26:55
|
Colin Adams wrote: Hi > So if you want a resolution before mid-October, you'd > better post the template concerned here, so i can think > about it. I finally succeed to write a simple example. It seems it is related to xsl:namespace-alias: > cat gexslt-copy-ns.xml <test:suite xmlns:test="http://www.fgeorges.org/xslt/unit-test"> <test:tests id="dummy"> <test:title>Dummy title</test:title> <test:test> <test:expect select="()"/> </test:test> </test:tests> </test:suite> > cat gexslt-copy-ns.xsl <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:test="http://www.fgeorges.org/xslt/unit-test" xmlns:x_="http://www.w3.org/1999/XSL/TransformAlias" version="2.0" exclude-result-prefixes="x_"> <xsl:namespace-alias stylesheet-prefix="x_" result-prefix="xsl"/> <xsl:output indent="yes"/> <xsl:template match="/"> <test:report/> </xsl:template> </xsl:stylesheet> > gexslt gexslt-copy-ns.xsl gexslt-copy-ns.xml <?xml version="1.0" encoding="UTF-8"?> <report xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/> If you remove the xsl:namespace-alias instruction, you'll get the following output, which is correct IMHO: <?xml version="1.0" encoding="UTF-8"?> <test:report xmlns:test="http://www.fgeorges.org/xslt/unit-test"/> Have a good trip (vacation if you're lucky) in China. Regards, --drkm ___________________________________________________________________________ Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet ! Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences. http://fr.answers.yahoo.com |