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

[XPath] structure similar to CSV with column names in

Subject: [XPath] structure similar to CSV with column names in first row
From: Beverly Voth <bvoth@xxxxxxxxxxx>
Date: Wed, 03 Dec 2003 10:19:03 -0500
csv structure
GIVEN
=====
1) Sometimes the XML is:
'<people>
' <columnNames>
'  <columnName>FirstName</columnName>
'  <columnName>LastName</columnName>
' </columnNames>
' <rows>
'  <row>
'   <column>Sue</column>
'   <column>Brown</column>
'  </row>
'  <row>
'   <column>Billy Bob</column>
'   <column>Jones</column>
'  </row>
...
' </rows>
'</people>

2) Sometimes the XML is:
'<people>
' <columnNames>
'  <columnName>LastName</columnName>
'  <columnName>FirstName</columnName>
' </columnNames>
' <rows>
'  <row>
'   <column>Brown</column>
'   <column>Sue</column>
'  </row>
'  <row>
'   <column>Jones</column>
'   <column>Billy Bob</column>
'  </row>
...
' </rows>
'</people>

3) I'm trying to receive it consistently, but the result may be based upon
who does the query. So, I'm wondering if there's an XPath expression that
can help for now?

NEEDED
======

I want to _always_ get the column corresponding to the "LastName" columnName
regardless of the position in the XML source (1 or 2, above).

'<xsl:template match="//row/column[ ??? = 'LastName' ]">

Gracias, Merci, Danke, Thank you!
Beverly


 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.