Subject: Re: [xsl] Wrapping pieces of content separately From: Florent Georges <darkman_spam@xxxxxxxx> Date: Fri, 25 Aug 2006 00:51:47 +0200 (CEST) |
Jay Bryant wrote: Hi > <xsl:template match="p[*]"> > <xsl:apply-templates/> > </xsl:template> > <xsl:template match="p"> > <p><xsl:apply-templates/></p> > </xsl:template> > <xsl:template match="text()[parent::p[*]]"> > <p><xsl:value-of select="."/></p> > </xsl:template> I'd write "text()[parent::p[*]]" as "p[*]/text()". Take care with: <p>onetwo</p> <p>one<!-- -->two</p> you'll get: <p>onetwo</p> <p>one</p> <p>two</p> because of the use of text(). Regards, --drkm p4.vert.ukl.yahoo.com uncompressed/chunked Thu Aug 24 22:13:39 GMT 2006 ___________________________________________________________________________ Dicouvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet ! Yahoo! Questions/Riponses pour partager vos connaissances, vos opinions et vos expiriences. http://fr.answers.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Wrapping pieces of conten, Jay Bryant | Thread | Re: [xsl] Wrapping pieces of conten, Wendell Piez |
Re: [xsl] metrics for evaluating xs, Andrew Franz | Date | RE: [xsl] template match based on e, Lincoln |
Month |