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

Reading the values of elements in a complex parameter

Subject: Reading the values of elements in a complex parameter
From: David Adams <dpadams@xxxxxxxxx>
Date: Thu, 23 Sep 2004 12:39:46 +1000
adams and elements
I'm struggling to understand how to read complex external parameters.
Simple parameters are easy enough to work with, but I'm not clear on
the mechanics of extracting value from complex parameters for value-of
or within XPath expressions (select.) As in my post of last week, I'm
trying to feed in a list of values for matching and processing. As an
example, a very reduced sample of a source XML file with the birds of
Australia:

<Australian_Birds>
       <Species>
               <Sequence>1</Sequence>
               <Family_Name>Struthionidae</Family_Name>
               <Genus_Name>Struthio</Genus_Name>
               <Species_Name>camelus</Species_Name>
               <Common_Name>Ostrich</Common_Name>
               <Extinct>False</Extinct>
       </Species>
       <Species>
               <Sequence>2</Sequence>
               <Family_Name>Casuariidae</Family_Name>
               <Genus_Name>Casuarius</Genus_Name>
               <Species_Name>casuarius</Species_Name>
               <Common_Name>Southern Cassowary</Common_Name>
               <Extinct>False</Extinct>
       </Species>
...

The parameter  could look like this:

<genera>
 <genus>Dromaius</genus>
 <genus>Coturnix</genus>
 <genus>Philemon</genus>
</genera>

I want to figure out the syntax for two tasks:
1) Reading and using the value of the subelements:
     Dromaius
     Coturnix
     Philemon

2) Using each subelement value as part of a match condition.

I've looked through the XSLT Cookbook, the XSLT Programmers Ref, the
FAQ and on various sites I've hit with Google. Someone, the lightbulb
hasn't gone off.

Thanks very much for any help. All of the help I've been offered to
date has been greatly apprecaited.


--
---------------------------------------------
David Adams
 dpadams@xxxxxxxxx
Bermagui 2546 NSW
---------------------------------------------

--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
--+--

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.