Subject: [xsl] Reading the values of elements in a complex parameter From: David Adams <dpadams@xxxxxxxxx> Date: Thu, 23 Sep 2004 12:39:46 +1000 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Reading the values of element, David Adams | Thread | RE: [xsl] Reading the values of ele, Jarno.Elovirta |
[xsl] <xsl:call-template> and form , Jen Jiang | Date | Re: [xsl] Accessing ASP request dat, Todd Baker |
Month |