Subject: [xsl] grouping like items into one From: Fred Christian <fredc@xxxxxxxxxx> Date: Thu, 22 Jan 2009 17:37:14 -0800 |
_______Source XML__________________ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <DD> <text italic="false" border="">a </text> <text italic="false" border="single">b </text> <text italic="true" border="single">c </text> <text italic="true" border="">d </text> <text italic="false" border="">e </text> <text italic="false" border="single">f </text> <text italic="false" border="single">g </text> <text italic="false" border="">h </text> <text italic="true" border="single">i </text> <text italic="true" border="">j </text> </DD>
_____Current output (formated for readability)________________ a <span class="border">b </span> <span class="border"><i>c </i></span> <i>d </i> e <span class="border">f </span> <span class="border">g </span> h <span class="border"><i>i </i></span> <i>j </i>
<xsl:template match="/DD"> <xsl:apply-templates/> </xsl:template>
<xsl:template match="text" mode="moreStyles"> <xsl:choose> <xsl:when test="./@italic='true'"> <i><xsl:apply-templates/></i> </xsl:when> <xsl:otherwise><xsl:apply-templates/></xsl:otherwise> </xsl:choose> </xsl:template>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] disappearing line breaks , Michael Kay | Thread | Re: [xsl] grouping like items into , Michael Müller-Hille |
Re: [xsl] Re: Re-arranging an XML f, Wendell Piez | Date | [xsl] for-each(-group) - flattening, Robert Koberg |
Month |