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

Re: exsl:document help

Subject: Re: exsl:document help
From: Gilles FALCON <gilles.falcon@xxxxxxxxxxxxxxxxx>
Date: Thu, 30 Sep 2004 10:29:46 +0200
gilles falcon
May be you write a2 twice, and you get only the 2nd one with c3
hope this help.

Greg Schafer a e'crit :

Hello

Relative newbie here using xsltproc.

Given this xml:


<?xml version='1.0' encoding="ISO-8859-1"?> <source> <AAA id="a1"> <BBB> <CCC>c1</CCC> </BBB> </AAA> <AAA id="a2"> <BBB> <CCC>c2</CCC> </BBB> <BBB> <CCC>c3</CCC> </BBB> </AAA> </source>


This XSLT sylesheet _almost_ achieves the desired goal:



<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl" version="1.0">

 <xsl:template match="/">
   <xsl:apply-templates select="//BBB"/>
 </xsl:template>

 <xsl:template match="CCC">
   <exsl:document href="{../../@id}" method="text">
     <xsl:value-of select="."/>
   </exsl:document>
 </xsl:template>

</xsl:stylesheet>


Document `a1' is created properly. But document `a2' contains only `c3' when I need it to contain:

c2
c3

Can anyone point me in the right direction?
Thanks in advance.

Greg

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.