It's not clear what you want the output to be, but my guess would be you are
looking for something like
<xsl:value-of select="Data[(_at_)name='grid_ref']/value"/>
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Alan Hale [mailto:alan(_dot_)hale(_at_)btclick(_dot_)com]
Sent: 17 March 2009 21:43
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] ExtendedData from KML
Hi
I am attempting to convert a KML file to CSV using XSLT. I
can succeed with most elements and attributes, along these lines:
<xsl:template match="Folder">
<xsl:for-each select="Placemark">
<xsl:value-of select="@id" />,
<xsl:value-of select="name" />,
<xsl:value-of select="Point/coordinates" />,
<xsl:value-of select="Snippet" />
<br />
</xsl:for-each>
</xsl:template>
but I don't know how to deal with the ExtendedData section
which has multiple <Data> elements identifed with individual
attributes, e.g.:
<ExtendedData>
<Data name="sciencName">
<value>Acer campestre</value>
</Data>
<Data name="grid_ref">
<value>SN593798</value>
</Data>
<Data name="eng_name">
<value>Field Maple</value>
</Data>
<Data name="rdb_status">
<value>Lower risk - least concern</value>
</Data>
</ExtendedData>
Any advice much appreciated.
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>
--~--
--~------------------------------------------------------------------
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>
--~--