Subject: [xsl] Following-Sibling From: "Schreifels, Mark J." <mark.schreifels@xxxxxxxxxx> Date: Tue, 10 Feb 2004 15:44:19 -0600 |
> I'm trying to detect and insert a processing instruction in to only <para>s that are followed by <note>s. > > IE: > > <Main> > <para></para> > <para></para> > <para><?blah blah?></para> > <note></note> > <Main> > > I've been working with following-sibling, but haven't been able to get it to work: > > <xsl:template match="*"> > <xsl:copy> > <xsl:copy-of select="@*"/> > <xsl:apply-templates/> > </xsl:copy> > </xsl:template> > > <xsl:template match="//para[following-sibling::note]"> > <xsl:copy> > <xsl:copy-of select="@*"/> > <xsl:processing-instruction name="blah">blah</xsl:processing-instruction> > <xsl:apply-templates/> > </xsl:copy> > </xsl:template> > > Using the following-sibling format above, it seems to put the processing instruction in to every paragraph. If you have any ideas or suggestions, I'd really appreciate it. > > -Mark XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] 2 Predicates in 1 for-eac, Bert | Thread | Re: [xsl] Following-Sibling, J.Pietschmann |
RE: [xsl] better way to validate XM, Michael Kay | Date | [xsl] creating new elements in XML , Gruenewald, Terry |
Month |