Subject: Re: [xsl] Use of xsl:apply-templates exception with an element From: lee qm <akimilee@xxxxxxxxx> Date: Fri, 25 Sep 2009 16:31:30 +0800 |
How about this? <xsl:template match="blockquote"> <blockquote> <xsl:apply-templates select="*[name()!='attribution']"/> <xsl:apply-templates select="attribution"/> </blockquote> </xsl:template> On Fri, Sep 25, 2009 at 3:58 PM, <srinivasan.p@xxxxxxxxxx> wrote: > Hi Team, > > I need to use <xsl:apply-templates/> element but exception of a particular > element. Is there any option in XSLT 2.0 for this? I am using XSLT 2.0 and > Saxon. > > My Input: > > <blockquote> > <attribution>...<emphasis>..</emphasis>...</attribution> > <para>......</para> > </blockquote> > > Note: For example purpose, I have just included "para" tag after the > attribution, but in the live case any tags can be present. > > My expected output: > > > <blockquote> > <para>......</para> > <attribution>...<emphasis>..</emphasis>....</attribution> > </blockquote> > > My XSLT: > > <xsl:template match="blockquote"> > <blockquote> > <xsl:apply-templates/> > <xsl:apply-templates select="attribution"/> > </blockquote> > </xsl:template> > > I am getting twice output of attribution element using this XSLT. > > I need to place the attribution element at the last of blockquote element. > The thing is I need to omit the attribution element in first > "xsl:apply-templates" element. > > Can you please help me on this? > > Thanks > Srinivasan
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Use of xsl:apply-template, srinivasan.p | Thread | Re: [xsl] Use of xsl:apply-template, G. Ken Holman |
RE: [xsl] Use of xsl:apply-template, Michael Kay | Date | RE: [xsl] Namespace problem, Michael Kay |
Month |