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

Wrapping XSL around XML tags of the same name

Subject: Wrapping XSL around XML tags of the same name
From: johng@xxxxxxxxxxxx
Date: Thu, 5 Aug 1999 17:00:50 +0100
xml tags the same name
I'm hoping someone can shed some light on this problem.

I have to wrap an XSL style sheet around some XML which is produced from a 
stored procedure in a SQL database.  It is producing XML as shown below:

<journey>
        <outbound>
                <start_time>
                        <time value="0825"/>
                        <time value="0925"/>
                        <time value="1025"/>
                </start_time>
        </outbound>
</journey> 

My question is basically, how would I wrap XSL around the individual tags?

For example, if the output was:

<journey>
        <outbound>
                <start_time>
                        <time_1 value="0825"/>
                        <time_2 value="0925"/>
                        <time_3 value="1025"/>
                </start_time>
        </outbound>
</journey>

I could just use the following to individually access each attribute:

<xsl:value-of select="journey/outbound/start_time/time_1@value" /> 
<xsl:value-of select="journey/outbound/start_time/time_2@value" /> 
<xsl:value-of select="journey/outbound/start_time/time_3@value" /> 

How would I go about this where the time tag is not unique?

All help is greatly appreciated!

Thanks in advance

John :-)


 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.