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

Re: transformation of narrative documents with nested

Subject: Re: transformation of narrative documents with nested elements
From: "Joris Gillis" <roac@xxxxxxxxxx>
Date: Sun, 16 Jan 2005 18:58:45 +0100
andrea fiore
Tempore 19:26:54, die 01/16/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Andrea Fiore <a.flow@xxxxxxxxxx>:

* I have to select only the news where an English title is available

* I have to transform all the elements inside the English description,
and they may occur as nested elements, as in line 17: X PATH: /news_list/news/description[lang='it']/bold/emph at the moment i wrote this stylesheet, that does not achieve the second goal: i have a correct output for line 15 and 16, but i have no output for line 17
Hi,

Just replace 'xsl:value-of' elements with 'xsl:apply-templates' elements in the templates:

<xsl:template match="bold">
    <xsl:element name="strong">
      <xsl:apply-templates/>
    </xsl:element>
</xsl:template>
<xsl:template match="emph">
    <xsl:element name="em">
      <xsl:apply-templates/>
    </xsl:element>
</xsl:template>

Note that I also replaced 'i' with 'em'; html has an element that expresses emphasis, you should preserve the markup as much as possible.

regards,
--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041)
Vincit omnia simplicitas
Keep it simple

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.