Skip to main content
本文に 6 文字追加
ソース リンク
本文に 8 文字追加
ソース リンク
BLUEPIXY
  • 6,907
  • 1
  • 21
  • 34

・kmlファイルに含まれるポイントデータ(以下を参照頂けると幸いです)のうち、時間のデータ(#msn_red-blank<styleUrl>#msn_red-blank</styleUrl>)から鳥のデータ(#msn_pink-blank<styleUrl>#msn_pink-blank</styleUrl>)を分離したいと思っております。

直面している課題は、
スタイルシートの<xsl:apply-templates select="Document/Folder/Placemark[styleUrl=#msn_pink-blank]"/><xsl:apply-templates select="Document/Folder/Placemark[styleUrl=#msn_pink-blank]"/>部分に問題があると考えました。styleUrlの部分を他の要素に変えた際にはエラーがなかったため、[styleUrl=#msn_pink-blank][styleUrl=#msn_pink-blank]部分の指定が最も問題であると考えています。

・kmlファイルに含まれるポイントデータ(以下を参照頂けると幸いです)のうち、時間のデータ(#msn_red-blank)から鳥のデータ(#msn_pink-blank)を分離したいと思っております。

直面している課題は、
スタイルシートの<xsl:apply-templates select="Document/Folder/Placemark[styleUrl=#msn_pink-blank]"/>部分に問題があると考えました。styleUrlの部分を他の要素に変えた際にはエラーがなかったため、[styleUrl=#msn_pink-blank]部分の指定が最も問題であると考えています。

・kmlファイルに含まれるポイントデータ(以下を参照頂けると幸いです)のうち、時間のデータ(<styleUrl>#msn_red-blank</styleUrl>)から鳥のデータ(<styleUrl>#msn_pink-blank</styleUrl>)を分離したいと思っております。

直面している課題は、
スタイルシートの<xsl:apply-templates select="Document/Folder/Placemark[styleUrl=#msn_pink-blank]"/>部分に問題があると考えました。styleUrlの部分を他の要素に変えた際にはエラーがなかったため[styleUrl=#msn_pink-blank]部分の指定が最も問題であると考えています。

書式の改善
ソース リンク
mjy
  • 1.2万
  • 3
  • 22
  • 53
RouteRoute#msn_ylw-pushpin142.748871,42.661877,-12.130737142.748901,42.661919,-6.593933142.748901,42.661919,-6.593933142.748917,42.661915,-3.935120142.748901,42.661934,-7.262329

2016.06.07 17:53:05 memo
左7ノビタキメス警戒

142.748901
42.661919
0
5.000000
0
0.005076180966892688
relativeToGround<gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode>
#msn_pink-blank

142.748901,42.661919,-6.593933

<?xml version="1.0" encoding="UTF-8"?> 
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"> 
<Document> 
<Folder> 
<Placemark> 
<name>Route</name> 
<description><![CDATA[]]>Route</description> 
<styleUrl>#msn_ylw-pushpin</styleUrl> 
<MultiGeometry> 
<LineString> 
<coordinates> 
142.748871,42.661877,-12.130737 
142.748901,42.661919,-6.593933 
142.748901,42.661919,-6.593933 
142.748917,42.661915,-3.935120 
142.748901,42.661934,-7.262329 
</coordinates> 
</LineString> 
</MultiGeometry> 
</Placemark>

<Placemark><name>2016.06.07 17:53:05 memo</name> 
<description>左7ノビタキメス警戒</description> 
<LookAt> 
<longitude>142.748901</longitude> 
<latitude>42.661919</latitude> 
<altitude>0</altitude> 
<range>5.000000</range> 
<tilt>0</tilt> 
<heading>0.005076180966892688</heading> 
<altitudeMode>relativeToGround</altitudeMode><gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode></LookAt> 
<styleUrl>#msn_pink-blank</styleUrl> 
<Point> 
<coordinates>142.748901,42.661919,-6.593933</coordinates> 
</Point> 
</Placemark>

</Folder> 
</Document> 
</kml>

c:\kml_territory\stylesheet>java Transform q.xml kmlconv.xsl qq.xml
ERROR: 'file:/c:/kml_territory/stylesheet/kmlconv.xsl: line 9: XPath式'Document/Folder/Placemark[styleUrl=#msn_pink-blank]'の解析中にエラーが発生しました。'
FATAL ERROR: 'file:/c:/kml_territory/stylesheet/kmlconv.xsl: line 9: XPath式'Document/Folder/Placemark[styleUrl=#msn_pink-blank]'の解析中にエラーが発生しました。'
Exception in thread "main" javax.xml.transform.TransformerConfigurationException: file:/c:/kml_territory/stylesheet/kmlconv.xsl: line 9: XPath式'Document/Folder/Placemark[styleUrl=#msn_pink-blank]'の解析中にエラーが発生しました。
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(Unknown Source)
at Transform.main(Transform.java:15)

c:\kml_territory\stylesheet>java Transform q.xml kmlconv.xsl qq.xml 
ERROR:  'file:/c:/kml_territory/stylesheet/kmlconv.xsl: line 9: XPath式'Document/Folder/Placemark[styleUrl=#msn_pink-blank]'の解析中にエラーが発生しました。' 
FATAL ERROR:  'file:/c:/kml_territory/stylesheet/kmlconv.xsl: line 9: XPath式'Document/Folder/Placemark[styleUrl=#msn_pink-blank]'の解析中にエラーが発生しました。' 
Exception in thread "main" javax.xml.transform.TransformerConfigurationException: file:/c:/kml_territory/stylesheet/kmlconv.xsl: line 9: XPath式'Document/Folder/Placemark[styleUrl=#msn_pink-blank]'の解析中にエラーが発生しました。 
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown Source) 
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(Unknown Source) 
at Transform.main(Transform.java:15)
RouteRoute#msn_ylw-pushpin142.748871,42.661877,-12.130737142.748901,42.661919,-6.593933142.748901,42.661919,-6.593933142.748917,42.661915,-3.935120142.748901,42.661934,-7.262329

17:52
2016.06.07 17:52:50

142.748871
42.661877
0
5.000000
0
0.005076180966892688
relativeToGround<gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode>
#msn_red-blank

142.748871,42.661877,-12.130737

17:52
2016.06.07 17:52:53

142.748901
42.661919
0
5.000000
0
0.005076180966892688
relativeToGround<gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode>
#msn_red-blank

142.748901,42.661919,-6.593933

<?xml version="1.0" encoding="UTF-8"?> 
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"> 
<Document> 
<Folder> 
<Placemark> 
<name>Route</name> 
<description><![CDATA[]]>Route</description> 
<styleUrl>#msn_ylw-pushpin</styleUrl> 
<MultiGeometry> 
<LineString> 
<coordinates> 
142.748871,42.661877,-12.130737 
142.748901,42.661919,-6.593933 
142.748901,42.661919,-6.593933 
142.748917,42.661915,-3.935120 
142.748901,42.661934,-7.262329 
</coordinates> 
</LineString> 
</MultiGeometry> 
</Placemark>

<Placemark><name>17:52</name> 
<description>2016.06.07 17:52:50</description> 
<LookAt> 
<longitude>142.748871</longitude> 
<latitude>42.661877</latitude> 
<altitude>0</altitude> 
<range>5.000000</range> 
<tilt>0</tilt> 
<heading>0.005076180966892688</heading> 
<altitudeMode>relativeToGround</altitudeMode><gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode></LookAt> 
<styleUrl>#msn_red-blank</styleUrl> 
<Point> 
<coordinates>142.748871,42.661877,-12.130737</coordinates> 
</Point> 
</Placemark>

<Placemark><name>17:52</name> 
<description>2016.06.07 17:52:53</description> 
<LookAt> 
<longitude>142.748901</longitude> 
<latitude>42.661919</latitude> 
<altitude>0</altitude> 
<range>5.000000</range> 
<tilt>0</tilt> 
<heading>0.005076180966892688</heading> 
<altitudeMode>relativeToGround</altitudeMode><gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode></LookAt> 
<styleUrl>#msn_red-blank</styleUrl> 
<Point> 
<coordinates>142.748901,42.661919,-6.593933</coordinates> 
</Point> 
</Placemark>

<Placemark><name>2016.06.07 17:53:05 memo</name> 
<description>左7ノビタキメス警戒</description> 
<LookAt> 
<longitude>142.748901</longitude> 
<latitude>42.661919</latitude> 
<altitude>0</altitude> 
<range>5.000000</range> 
<tilt>0</tilt> 
<heading>0.005076180966892688</heading> 
<altitudeMode>relativeToGround</altitudeMode><gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode></LookAt> 
<styleUrl>#msn_pink-blank</styleUrl> 
<Point> 
<coordinates>142.748901,42.661919,-6.593933</coordinates> 
</Point> 
</Placemark>

</Folder> 
</Document> 
</kml>

2016.06.07 17:53:05 memo
左7ノビタキメス警戒

142.748901
42.661919
0
5.000000
0
0.005076180966892688
relativeToGround<gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode>
#msn_pink-blank

142.748901,42.661919,-6.593933

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8"/>

<xsl:template match="/">

<xsl:apply-templates select="Document/Folder/Placemark[styleUrl=#msn_pink-blank]"/>

</xsl:template>

<xsl:template match="Placemark">
xsl:copy
<xsl:apply-templates select="name"/>
<xsl:apply-templates select="description"/>
<xsl:apply-templates select="Lookat"/>
<xsl:apply-templates select="longitude"/>
<xsl:apply-templates select="latitude"/>
<xsl:apply-templates select="styleUrl"/>
<xsl:apply-templates select="Point"/>
<xsl:apply-templates select="MultiGeometry"/>
<xsl:apply-templates select="LineString"/>
<xsl:apply-templates select="coordinates"/>
</xsl:copy>
</xsl:template>

<xsl:template match="name">
<xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="description">
<xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="Lookat">
<xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="longitude">
<xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="latitude">
<xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="styleUrl">
<xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="Point">
<xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="MultiGeometry">
<xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="LineString">
<xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="coordinates">
<xsl:copy-of select="."/>
</xsl:template>

</xsl:stylesheet>

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
<xsl:output method="xml" encoding="UTF-8"/>

<xsl:template match="/"> 
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"> 
<xsl:apply-templates select="Document/Folder/Placemark[styleUrl=#msn_pink-blank]"/> 
</kml> 
</xsl:template>

<xsl:template match="Placemark"> 
<xsl:copy> 
<xsl:apply-templates select="name"/> 
<xsl:apply-templates select="description"/> 
<xsl:apply-templates select="Lookat"/> 
<xsl:apply-templates select="longitude"/> 
<xsl:apply-templates select="latitude"/> 
<xsl:apply-templates select="styleUrl"/> 
<xsl:apply-templates select="Point"/> 
<xsl:apply-templates select="MultiGeometry"/> 
<xsl:apply-templates select="LineString"/> 
<xsl:apply-templates select="coordinates"/> 
</xsl:copy> 
</xsl:template>

<xsl:template match="name"> 
<xsl:copy-of select="."/> 
</xsl:template>

<xsl:template match="description"> 
<xsl:copy-of select="."/> 
</xsl:template>

<xsl:template match="Lookat"> 
<xsl:copy-of select="."/> 
</xsl:template>

<xsl:template match="longitude"> 
<xsl:copy-of select="."/> 
</xsl:template>

<xsl:template match="latitude"> 
<xsl:copy-of select="."/> 
</xsl:template>

<xsl:template match="styleUrl"> 
<xsl:copy-of select="."/> 
</xsl:template>

<xsl:template match="Point"> 
<xsl:copy-of select="."/> 
</xsl:template>

<xsl:template match="MultiGeometry"> 
<xsl:copy-of select="."/> 
</xsl:template>

<xsl:template match="LineString"> 
<xsl:copy-of select="."/> 
</xsl:template>

<xsl:template match="coordinates"> 
<xsl:copy-of select="."/> 
</xsl:template>

</xsl:stylesheet>
RouteRoute#msn_ylw-pushpin142.748871,42.661877,-12.130737142.748901,42.661919,-6.593933142.748901,42.661919,-6.593933142.748917,42.661915,-3.935120142.748901,42.661934,-7.262329

2016.06.07 17:53:05 memo
左7ノビタキメス警戒

142.748901
42.661919
0
5.000000
0
0.005076180966892688
relativeToGround<gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode>
#msn_pink-blank

142.748901,42.661919,-6.593933

c:\kml_territory\stylesheet>java Transform q.xml kmlconv.xsl qq.xml
ERROR: 'file:/c:/kml_territory/stylesheet/kmlconv.xsl: line 9: XPath式'Document/Folder/Placemark[styleUrl=#msn_pink-blank]'の解析中にエラーが発生しました。'
FATAL ERROR: 'file:/c:/kml_territory/stylesheet/kmlconv.xsl: line 9: XPath式'Document/Folder/Placemark[styleUrl=#msn_pink-blank]'の解析中にエラーが発生しました。'
Exception in thread "main" javax.xml.transform.TransformerConfigurationException: file:/c:/kml_territory/stylesheet/kmlconv.xsl: line 9: XPath式'Document/Folder/Placemark[styleUrl=#msn_pink-blank]'の解析中にエラーが発生しました。
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(Unknown Source)
at Transform.main(Transform.java:15)

RouteRoute#msn_ylw-pushpin142.748871,42.661877,-12.130737142.748901,42.661919,-6.593933142.748901,42.661919,-6.593933142.748917,42.661915,-3.935120142.748901,42.661934,-7.262329

17:52
2016.06.07 17:52:50

142.748871
42.661877
0
5.000000
0
0.005076180966892688
relativeToGround<gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode>
#msn_red-blank

142.748871,42.661877,-12.130737

17:52
2016.06.07 17:52:53

142.748901
42.661919
0
5.000000
0
0.005076180966892688
relativeToGround<gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode>
#msn_red-blank

142.748901,42.661919,-6.593933

2016.06.07 17:53:05 memo
左7ノビタキメス警戒

142.748901
42.661919
0
5.000000
0
0.005076180966892688
relativeToGround<gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode>
#msn_pink-blank

142.748901,42.661919,-6.593933

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8"/>

<xsl:template match="/">

<xsl:apply-templates select="Document/Folder/Placemark[styleUrl=#msn_pink-blank]"/>

</xsl:template>

<xsl:template match="Placemark">
xsl:copy
<xsl:apply-templates select="name"/>
<xsl:apply-templates select="description"/>
<xsl:apply-templates select="Lookat"/>
<xsl:apply-templates select="longitude"/>
<xsl:apply-templates select="latitude"/>
<xsl:apply-templates select="styleUrl"/>
<xsl:apply-templates select="Point"/>
<xsl:apply-templates select="MultiGeometry"/>
<xsl:apply-templates select="LineString"/>
<xsl:apply-templates select="coordinates"/>
</xsl:copy>
</xsl:template>

<xsl:template match="name">
<xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="description">
<xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="Lookat">
<xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="longitude">
<xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="latitude">
<xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="styleUrl">
<xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="Point">
<xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="MultiGeometry">
<xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="LineString">
<xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="coordinates">
<xsl:copy-of select="."/>
</xsl:template>

</xsl:stylesheet>

<?xml version="1.0" encoding="UTF-8"?> 
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"> 
<Document> 
<Folder> 
<Placemark> 
<name>Route</name> 
<description><![CDATA[]]>Route</description> 
<styleUrl>#msn_ylw-pushpin</styleUrl> 
<MultiGeometry> 
<LineString> 
<coordinates> 
142.748871,42.661877,-12.130737 
142.748901,42.661919,-6.593933 
142.748901,42.661919,-6.593933 
142.748917,42.661915,-3.935120 
142.748901,42.661934,-7.262329 
</coordinates> 
</LineString> 
</MultiGeometry> 
</Placemark>

<Placemark><name>2016.06.07 17:53:05 memo</name> 
<description>左7ノビタキメス警戒</description> 
<LookAt> 
<longitude>142.748901</longitude> 
<latitude>42.661919</latitude> 
<altitude>0</altitude> 
<range>5.000000</range> 
<tilt>0</tilt> 
<heading>0.005076180966892688</heading> 
<altitudeMode>relativeToGround</altitudeMode><gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode></LookAt> 
<styleUrl>#msn_pink-blank</styleUrl> 
<Point> 
<coordinates>142.748901,42.661919,-6.593933</coordinates> 
</Point> 
</Placemark>

</Folder> 
</Document> 
</kml>
c:\kml_territory\stylesheet>java Transform q.xml kmlconv.xsl qq.xml 
ERROR:  'file:/c:/kml_territory/stylesheet/kmlconv.xsl: line 9: XPath式'Document/Folder/Placemark[styleUrl=#msn_pink-blank]'の解析中にエラーが発生しました。' 
FATAL ERROR:  'file:/c:/kml_territory/stylesheet/kmlconv.xsl: line 9: XPath式'Document/Folder/Placemark[styleUrl=#msn_pink-blank]'の解析中にエラーが発生しました。' 
Exception in thread "main" javax.xml.transform.TransformerConfigurationException: file:/c:/kml_territory/stylesheet/kmlconv.xsl: line 9: XPath式'Document/Folder/Placemark[styleUrl=#msn_pink-blank]'の解析中にエラーが発生しました。 
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown Source) 
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(Unknown Source) 
at Transform.main(Transform.java:15)
<?xml version="1.0" encoding="UTF-8"?> 
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"> 
<Document> 
<Folder> 
<Placemark> 
<name>Route</name> 
<description><![CDATA[]]>Route</description> 
<styleUrl>#msn_ylw-pushpin</styleUrl> 
<MultiGeometry> 
<LineString> 
<coordinates> 
142.748871,42.661877,-12.130737 
142.748901,42.661919,-6.593933 
142.748901,42.661919,-6.593933 
142.748917,42.661915,-3.935120 
142.748901,42.661934,-7.262329 
</coordinates> 
</LineString> 
</MultiGeometry> 
</Placemark>

<Placemark><name>17:52</name> 
<description>2016.06.07 17:52:50</description> 
<LookAt> 
<longitude>142.748871</longitude> 
<latitude>42.661877</latitude> 
<altitude>0</altitude> 
<range>5.000000</range> 
<tilt>0</tilt> 
<heading>0.005076180966892688</heading> 
<altitudeMode>relativeToGround</altitudeMode><gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode></LookAt> 
<styleUrl>#msn_red-blank</styleUrl> 
<Point> 
<coordinates>142.748871,42.661877,-12.130737</coordinates> 
</Point> 
</Placemark>

<Placemark><name>17:52</name> 
<description>2016.06.07 17:52:53</description> 
<LookAt> 
<longitude>142.748901</longitude> 
<latitude>42.661919</latitude> 
<altitude>0</altitude> 
<range>5.000000</range> 
<tilt>0</tilt> 
<heading>0.005076180966892688</heading> 
<altitudeMode>relativeToGround</altitudeMode><gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode></LookAt> 
<styleUrl>#msn_red-blank</styleUrl> 
<Point> 
<coordinates>142.748901,42.661919,-6.593933</coordinates> 
</Point> 
</Placemark>

<Placemark><name>2016.06.07 17:53:05 memo</name> 
<description>左7ノビタキメス警戒</description> 
<LookAt> 
<longitude>142.748901</longitude> 
<latitude>42.661919</latitude> 
<altitude>0</altitude> 
<range>5.000000</range> 
<tilt>0</tilt> 
<heading>0.005076180966892688</heading> 
<altitudeMode>relativeToGround</altitudeMode><gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode></LookAt> 
<styleUrl>#msn_pink-blank</styleUrl> 
<Point> 
<coordinates>142.748901,42.661919,-6.593933</coordinates> 
</Point> 
</Placemark>

</Folder> 
</Document> 
</kml>
<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
<xsl:output method="xml" encoding="UTF-8"/>

<xsl:template match="/"> 
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"> 
<xsl:apply-templates select="Document/Folder/Placemark[styleUrl=#msn_pink-blank]"/> 
</kml> 
</xsl:template>

<xsl:template match="Placemark"> 
<xsl:copy> 
<xsl:apply-templates select="name"/> 
<xsl:apply-templates select="description"/> 
<xsl:apply-templates select="Lookat"/> 
<xsl:apply-templates select="longitude"/> 
<xsl:apply-templates select="latitude"/> 
<xsl:apply-templates select="styleUrl"/> 
<xsl:apply-templates select="Point"/> 
<xsl:apply-templates select="MultiGeometry"/> 
<xsl:apply-templates select="LineString"/> 
<xsl:apply-templates select="coordinates"/> 
</xsl:copy> 
</xsl:template>

<xsl:template match="name"> 
<xsl:copy-of select="."/> 
</xsl:template>

<xsl:template match="description"> 
<xsl:copy-of select="."/> 
</xsl:template>

<xsl:template match="Lookat"> 
<xsl:copy-of select="."/> 
</xsl:template>

<xsl:template match="longitude"> 
<xsl:copy-of select="."/> 
</xsl:template>

<xsl:template match="latitude"> 
<xsl:copy-of select="."/> 
</xsl:template>

<xsl:template match="styleUrl"> 
<xsl:copy-of select="."/> 
</xsl:template>

<xsl:template match="Point"> 
<xsl:copy-of select="."/> 
</xsl:template>

<xsl:template match="MultiGeometry"> 
<xsl:copy-of select="."/> 
</xsl:template>

<xsl:template match="LineString"> 
<xsl:copy-of select="."/> 
</xsl:template>

<xsl:template match="coordinates"> 
<xsl:copy-of select="."/> 
</xsl:template>

</xsl:stylesheet>
本文に 6 文字追加
ソース リンク
読み込んでいます
ソース リンク
読み込んでいます