[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: apply-templates and XHTML's <p> tag

Subject: RE: apply-templates and XHTML's <p> tag
From: Americo Albuquerque <aalbuquerque@xxxxxxxxxxxxxxxx>
Date: Mon, 24 Mar 2003 18:33:38 -0000
xhtml date tag
Hi.

> -----Mensagem original-----
> De: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] Em nome de Gan 
> Uesli Starling
> Enviada: segunda-feira, 24 de Marco de 2003 18:00
> Para: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Assunto:  apply-templates and XHTML's <p> tag
> 
(..)
> Cool would be to split <p> into a sequence of <foo>
> tags with the <b> and <i> as attributes for some,
> not on others.
> 
> Can someone point me at a tutorial or how-to which
> illustrates an XSLT-ish method for dealing sequentially
> with a mixed bunch of text and tags?

Sure. See http://www.w3.org/TR/xslt#copying or
http://www.w3.org/TR/xslt#copy-of.


One example could be:

<xsl:template match="p">
   <xsl:copy>
      <xsl:apply-templates mode="identity"/>
   </xsl:copy>
</xsl:template>

<xsl:template match="@*|node()" mode="identity">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()" mode="identity"/>
  </xsl:copy>
</xsl:template>


Another could be:

<xsl:template match="p">
   <xsl:copy-of select="."/>
</xsl:template>

Attachment: smime.p7s
Description: S/MIME cryptographic signature

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.