Subject: Re: Disable Output Escaping - really useful From: David Carlisle <davidc@xxxxxxxxx> Date: Mon, 27 Mar 2000 16:44:49 GMT |
Which I naturally want to turn into something like this: <p> Some <font color="green">green</font> text. </p> <para> Some <?Pub _font FontColor="green"?>green<?Pub /_font?> text. </para> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" > <xsl:template match="para"> <p> <xsl:apply-templates/> </p> </xsl:template> <xsl:template match="para/text() [count(following-sibling::processing-instruction()) mod 2 = 1]"/> <xsl:template match="text()" mode="yes"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="processing-instruction('Pub')"> <xsl:variable name="x" select="count(following-sibling::processing-instruction())"/> <xsl:if test="$x mod 2 = 1"> <font color="{substring-before(substring-after(.,'FontColor="'),'"')}"> <xsl:apply-templates select="following-sibling::node()[ count(following-sibling::processing-instruction())=$x]" mode="yes"/> </font> </xsl:if> </xsl:template> </xsl:stylesheet> xt norm1.xml norm1.xsl <?xml version="1.0" encoding="utf-8"?> <p> Some <font color="green">green</font> text. </p> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Disable Output Escaping - reall, Norman Walsh | Thread | RE: Disable Output Escaping - reall, Kay Michael |
RE: Microsoft or W3C?, Jonathan Marsh | Date | RE: Namespace Jungle, Carlos Araya |
Month |