[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Wrapping pieces of content separately
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|