[Home] [By Thread] [By Date] [Recent Entries]
Hi Andrew, All,
Interesting. I think that I need a little more though. Does it mean that I should do something like: <xsl:variable name="page">
<html>
...
</html>
</xsl:variable>
<xsl:choose>
<xsl:when test="$cond">
<xsl:apply-templates mode="put-in-xhtml-ns" select="$page"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select=$page"/>
</xsl:otherwise>
</xsl:choose>and either (please confirm which, if any): <xsl:template mode="put-in-xhtml-ns" match="*"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:apply-templates mode="#current"/> </xsl:copy> </xsl:template> <xsl:template mode="put-in-xhtml-ns" match="html"> <xsl:element name="html"> <xsl:namespace name="xhtml">http://www.w3.org/1999/xhtml</xsl:namespace> <xsl:copy-of select="@*"/> <xsl:apply-templates mode="#current"/> </xsl:copy> </xsl:template> or
<xsl:template mode="put-in-xhtml-ns" match="*">
<xsl:element name="{QName('http://www.w3.org/1999/xhtml', local-name(.))}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="#current"/>
</xsl:copy>
</xsl:template>Why not something simpler as just
<xsl:element name="
{QName(if ($cond) then 'http://www.w3.org/1999/xhtml' else '', 'html')}">
...
</xsl:element>What would be best? Thank you. Regards, ac On 28 December 2010 07:02, ac<ac@xxxxxxxxxxxxx> wrote:Hi,...
|

Cart



