Subject: Re: [xsl] xmlns="" / XML to XHTML From: Alexander Nichau <ml@xxxxxxxxxx> Date: Mon, 12 Sep 2005 22:21:41 +0200 |
Joris Gillis schrieb: > The problem is that you do not understand namespaces. I'll leave it up
to the guru's of this list to provide theoretical answers. I'll give this practical answer:
<xsl:template name="content_xhtml">
<xsl:param name="content" select="/page/content/topic"/>
<xsl:apply-templates select="$content/text/*" mode="put_in_new_namespace">
<xsl:with-param name="new_namespace">http://www.w3.org/1999/xhtml</xsl:with-param>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="*" mode="put_in_new_namespace" priority="1"> <xsl:param name="new_namespace"/> <xsl:element name="{local-name()}" namespace="{$new_namespace}"> <xsl:copy-of select="@*"/> <xsl:apply-templates select="node()" mode="put_in_new_namespace"> <xsl:with-param name="new_namespace" select="$new_namespace"/> </xsl:apply-templates> </xsl:element> </xsl:template>
<xsl:template match="node()" mode="put_in_new_namespace"> <xsl:copy-of select="."/> </xsl:template>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xmlns="" / XML to XHTML, Joris Gillis | Thread | Re: [xsl] xmlns="" / XML to XHTML, Alexander Nichau |
Re: [xsl] Traversing the tree, Dimitre Novatchev | Date | RE: [xsl] Create two xml files from, Michael Kay |
Month |