|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: using identity transform to change <p /> into <p>t
Depending on the exact details of your source document, you might be able to do this with <xsl:template match="section/text()"> <p><xsl:copy-of select="."/></p> </xsl:template> <xsl:template match="section/p[not(node())]"/> <xsl:template match="p"> <xsl:copy-of select="."/> </xsl:template> Michael Kay Software AG home: Michael.H.Kay@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Zack Brown > Sent: 08 May 2002 15:03 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: using identity transform to change <p /> into > <p>text</p> > > > Hi folks, > > I have a bunch of files with the following form: > > -------------------------------------------------------------- > <section> > > first paragraph. > > <p /> > > second paragraph. > > <p /> > > third paragraph. > > <p /> > > fourth paragraph. > > </section> > > <section> > > <p>paragraph not to change</p> > > <p>another good paragraph</p> > > </section> > -------------------------------------------------------------- > > Is there a way to use the identity transform (or anything else) to > change that to > > -------------------------------------------------------------- > <section> > > <p>first paragraph.</p> > > <p>second paragraph.</p> > > <p>third paragraph.</p> > > <p>fourth paragraph.</p> > > </section> > > <section> > > <p>paragraph not to change</p> > > <p>another good paragraph</p> > > </section> > -------------------------------------------------------------- > > Thanks, > Zack > > -- > Zack Brown > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








