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

Can I use <xsl:key>

Subject: Can I use <xsl:key>
From: aaron apigo <aaronjose_apigo2001@xxxxxxxxx>
Date: Tue, 6 Sep 2005 00:21:22 -0700 (PDT)
xsl get text
Hi,
  I have this xml, 

<root>
<text:p>
       <text:span>
       <text:user-field-get text:name="ce:author">
       au</text:user-field-get>
       </text:span>                 
       <text:span>
       <text:user-field-get text:name="ce:given-name">
       fnm</text:user-field-get>
       </text:span>
       <text:span>Tzou-Chi</text:span>
       <text:span>
       <text:user-field-get text:name="ce:surname">
       snm</text:user-field-get>
       </text:span>
       <text:span>Huang</text:span>
       <text:span>
       <text:user-field-get text:name="/ce:author">
       /au</text:user-field-get>
       </text:span>
</text:p>
<text:p>
       <text:span>
       <text:user-field-get text:name="ce:author">
       au</text:user-field-get>
       </text:span>                 
       <text:span>
       <text:user-field-get text:name="ce:given-name">
       fnm</text:user-field-get>
       </text:span>
       <text:span>Aaron</text:span>
       <text:span>
       <text:user-field-get text:name="ce:surname">
       snm</text:user-field-get>
       </text:span>
       <text:span>Apigo</text:span>
       <text:span>
       <text:user-field-get text:name="ce:e-address">
       ead</text:user-field-get>
       </text:span>
       <text:span>aaron@xxxxxxxxx</text:span>
       <text:span>
       <text:user-field-get text:name="/ce:e-address">
       /ead</text:user-field-get>
       </text:span>
       <text:span>
       <text:user-field-get text:name="/ce:author">
       /au</text:user-field-get>
       </text:span>
</text:p>
<text:p>
       <text:span>
       <text:user-field-get text:name="ce:author">
       au</text:user-field-get>
       </text:span>                 
       <text:span>
       <text:user-field-get text:name="ce:given-name">
       fnm</text:user-field-get>
       </text:span>
       <text:span>Andrew</text:span>
       <text:span>
       <text:user-field-get text:name="ce:surname">
       snm</text:user-field-get>
       </text:span>
       <text:span>Argente</text:span>
       <text:span>
       <text:user-field-get text:name="ce:e-address">
       ead</text:user-field-get>
       </text:span>
       <text:span>andrew@xxxxxxx</text:span>
       <text:span>
       <text:user-field-get text:name="/ce:e-address">
       /ead</text:user-field-get>
       </text:span>
       <text:span>
       <text:user-field-get text:name="ce:e-address">
       ead</text:user-field-get>
       </text:span>
       <text:span>andrew@xxxxxxxxx</text:span>
       <text:span>
       <text:user-field-get text:name="/ce:e-address">
       /ead</text:user-field-get>
       </text:span>
       <text:span>
       <text:user-field-get text:name="/ce:author">
       /au</text:user-field-get>
       </text:span>
</text:p>
</root>


and I want it to transform like this,

<ce:author-group>
<ce:author>
	<ce:given-name>Tzou-Chi</ce:given-name>
	<ce:surname>Huang</ce:surname>
</ce:author>
<ce:author>
	<ce:given-name>Aaron</ce:given-name>
	<ce:surname>Apigo</ce:surname>
	<ce:e-address>aaron@xxxxxxxxx</ce:e-address>
</ce:author>
<ce:author>
	<ce:given-name>Andrew</ce:given-name>
	<ce:surname>Argente</ce:surname>
        <ce:e-address>andrew@xxxxxxx</ce:e-address>
	<ce:e-address>andrew@xxxxxxxxx</ce:e-address>
</ce:author>
</ce:author-group>

before I'm trying to use <xsl:for-each> but I have a
problem, i don't know how to terminate it when the
condition was match, but when someone reply in my
topic in this forum about "Terminate <xsl:for-each>",
i got an idea to use it again in other transformation
like the one posted in here.
should I use <xsl:key> or can someone give me an idea
on this?

thanks in advance.

regards.
aaron








	
		
______________________________________________________
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/

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.