Subject: Re: [xsl] removing a null namespace From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 29 Apr 2005 13:11:22 +0100 |
The XSLT system never changes the namespace of an element automatically. You show output of <h1 xmlns="">header</h1> so either this is an h1 in no-namespace copied from the source, in which case you don't want to use copy-of you want to apply a template that changes elements in no-namespace to elements in the xhtml namespace or this is an h1 in no-namespace created in teh stylesheet, in which case you want to change the stylesheet to create the element in teh xhtml namespace. It looks as if you have the first case, so your input isn't really xhtml. A template such as <xsl:template match="*"> <xsl:element name="local-name()" namespace="http://www.w3.org/1999/xhtml"> <xsl:copy-of select="@*"/> <xsl;apply-templates/> </xsl:element> </xsl:template> will convert elements in no-namespace into xhtml namepsaced elements with the same local name. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] removing a null namespace, Gavin Montague | Thread | Re: [xsl] removing a null namespace, Gavin Montague |
[xsl] removing a null namespace, Gavin Montague | Date | Re: [xsl] removing a null namespace, Gavin Montague |
Month |