xsl-list
[Top] [All Lists]

[xsl] Compound filter in for-each

2009-03-24 14:47:29
Still working on XML derived from Google Earth KML. I want to filter on
particular ExtendedData/Data name and value combinations. Here is an
extract of relevant XML:
<Placemark>
..................
<ExtendedData>
         <Data name  "sciencName">
           <value>Euphrasia micrantha</value>
         </Data>
         <Data name  "grid_ref">
           <value>SN701822</value>
         </Data>
         <Data name  "eng_name">
           <value>An Eyebright</value>
         </Data>
         <Data name  "rdb_status">
           <value>Endangered</value>
         </Data>
.........................
</ExtendedData>
............................
</Placemark>

So I guess what I am looking for is something like:

<xsl:for-each select "Placemark/ExtendedData/Data[(_at_)name 'rdb_status'and value 'Endangered']"> - though this doesn't work (in XML Notepad I just get the unhelpful error message "Input string was not in a correct format.") I've tried various permutations and searched the list archives and the wider Web but not found anything that works for me. Is this actually possible?

Many thanks

Alan Hale
Aberystwyth

--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>