[Home] [By Thread] [By Date] [Recent Entries]
On 23/08/2010 15:33, pankaj.c@xxxxxxxxxxxxxxxxxx wrote:
you have used xsl:copy which copies an element (along with its namespace context) from the source rather than use a literal result element, or xsl:element which generates an element node using the namespace context in the stylesheet. well not exactly. If you do that then the element is created using the namespace context of the stylesheet but if you use xsl:element (in xslt 1) only the namespace used in the element name is copied. It seems you want all the namespaces from the stylesheet copied which (in xslt 1) requires you to use a literal result eleemnt <xsl:template match="chapter"> <chapter> ... however that would cause the namespaces to be declared on every chapter which was why I suggested using this technique instead on the top level element (book?) so that they just get decared once. Of course, if chapter is your top level element this comes to the same thing. see above<xsl:attribute name="aid:pstyle"/> <xsl:attribute name="aid:cstyle"/> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:element> </xsl:template> David
This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. ________________________________________________________________________
|

Cart



