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

extracting element-names

Subject: extracting element-names
From: "Ben Jung" <benjamin.jung@xxxxxxxxx>
Date: Mon, 5 Apr 1999 15:28:21 +0100
ben jung
I am having problems to extract element-names from XML documents with XSL
stylesheets:

Assuming, I have the following XML fragment:
---------------
<Person>
  <Name>Ben</Name>
  <Age>5</Age>
  <Country>Ireland</Country>
</Person>
---------------

Next: I want to create the following 'table':
---------------
Name: Ben
Age: 5
Country: Ireland
---------------

This XSL stylesheet does the job, BUT only if I know the element-names!
If the XML source document changes (e.g. another child <City>Galway</City>
is included), I would have to change the XSL, too.
---------------
<xsl:for-each select="Person">
  Name: <xsl:value-of select="Name"/>
  Age: <xsl:value-of select="Age"/>
  Country: <xsl:value-of select="Country"/>
</xsl:for-each>
-----------------

Any ideas?
Ben


 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.