[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

Subject: RE: using identity transform to change <p /> into <p>text</p>
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Wed, 8 May 2002 15:31:10 +0100
how to change p
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.