|
Revision 1215, 1.0 kB
(checked in by thomase, 1 year ago)
|
two stylesheets whereby one of our KML point files can be rendered into a comma-delimited text file with x,y,label and pleiadesurl columns; first apply unescapekmldesc so that the kml2xy stylesheet can get at xhtml tags in the description; characters above us-ascii are converted to numeric entities; these text files have been tested with arcmap "add xy data" tool.
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
|---|
| 2 |
<xsl:stylesheet |
|---|
| 3 |
xmlns="http://earth.google.com/kml/2.1" |
|---|
| 4 |
xmlns:kml="http://earth.google.com/kml/2.1" |
|---|
| 5 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|---|
| 6 |
version="2.0"> |
|---|
| 7 |
|
|---|
| 8 |
<xsl:output encoding="UTF-8" method="xml" /> |
|---|
| 9 |
|
|---|
| 10 |
<xsl:template match="/"> |
|---|
| 11 |
<xsl:apply-templates/> |
|---|
| 12 |
</xsl:template> |
|---|
| 13 |
|
|---|
| 14 |
<xsl:template match="*"> |
|---|
| 15 |
<xsl:copy> |
|---|
| 16 |
<xsl:apply-templates select="@* | node()"/> |
|---|
| 17 |
</xsl:copy> |
|---|
| 18 |
</xsl:template> |
|---|
| 19 |
|
|---|
| 20 |
<xsl:template match="kml:description"> |
|---|
| 21 |
<xsl:copy> |
|---|
| 22 |
<xsl:apply-templates select="text()" mode="escaped"/> |
|---|
| 23 |
</xsl:copy> |
|---|
| 24 |
</xsl:template> |
|---|
| 25 |
|
|---|
| 26 |
<xsl:template match="@* | comment()"> |
|---|
| 27 |
<xsl:copy-of select="."/> |
|---|
| 28 |
</xsl:template> |
|---|
| 29 |
|
|---|
| 30 |
<xsl:template match="text()" mode="escaped"><xsl:value-of disable-output-escaping="yes" select="normalize-space(.)"/></xsl:template> |
|---|
| 31 |
|
|---|
| 32 |
<xsl:template match="text()"><xsl:value-of select="normalize-space(.)"/></xsl:template> |
|---|
| 33 |
|
|---|
| 34 |
</xsl:stylesheet> |
|---|