|
Subject: Re: [xsl] Display text and all the following nodes except <anchor> and <pb> From: "J. S. Rawat" <jrawat@xxxxxxxxxxxxxx> Date: Fri, 19 Sep 2008 15:27:16 +0530 |
XSLT <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:xd="http://www.pnp-software.com/XSLTdoc" exclude-result-prefixes="xd" version="1.0">
<xsl:template match="div/head">
<xsl:choose>
<xsl:when test="../@type='ss1'">
<h2>
<xsl:apply-templates/>
</h2>
</xsl:when>
</xsl:choose>
</xsl:template><xsl:template match="sCap|bold|ital">
<span class="{name()}">
<xsl:apply-templates/>
</span>
</xsl:template><xsl:template match="anchor">
<a name="{@id}">
<xsl:apply-templates/>
</a>
</xsl:template><xsl:template match="pb">
<a name="{@n}">
<xsl:apply-templates/>
</a>
</xsl:template>It's really a lot better if you post _complete_ but small stylesheets, then people can run the stylesheet and comment on the result. If you only post f ragments, then people can't run them, and often the problem turns out to be in the part of the code not posted.
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Display text and all the , David Carlisle | Thread | Re: [xsl] Display text and all the , George Cristian Bina |
| RE: [xsl] xsltproc and stringparam,, Michael Kay | Date | Re: [xsl] Display text and all the , George Cristian Bina |
| Month |