XSLT wil geen xml variant accepteren

Status
Niet open voor verdere reacties.

garfieke

Gebruiker
Lid geworden
25 apr 2007
Berichten
9
Hey,
Heb met het programma GSAK een XML bestand aangemaakt dat een hoop gegevens bevat. Nu wil ik deze file gebruiken om voor mezelf een overzicht te krijgen van wat er in die XML file zit.
Heb de XML en de XSL file in dezelfde map staan, maar heb bij XML slechts 1 enkel wpt gezet om niet teveel gegevens te posten.

Wat doe ik fout? Als ik al weet hoe de 'name' erop te krijgen, dan kan ik al verder!

Heb een tutorial hierover gevolgd en dit heb ik er van gemaakt:

founds.xsl:

Code:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>Geocaching</h2>
<table border="0">
<tr>
<th align="left">Name</th>
</tr>
<xsl:for-each select="gpx/wpt">
    <tr>
      <td><xsl:value-of select="name"/></td>
</tr>
    </xsl:for-each>
    </table>
  </body>
  </html>
</xsl:template>
</xsl:stylesheet>

een deeltje van founds.gpx:

Code:
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="founds.xsl"?>
<gpx xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0" creator="Groundspeak Pocket Query"
xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd http://www.groundspeak.com/cache/1/0 http://www.groundspeak.com/cache/1/0/cache.xsd http://www.gsak.net/xmlv1/1 http://www.gsak.net/xmlv1/1/gsak.xsd"
xmlns="http://www.topografix.com/GPX/1/0">
 <desc>Geocache file generated by GSAK (HasChildren)</desc>
 <author>GSAK</author>
 <email>clyde@gsak.net</email>
 <time>2007-11-03T15:25:49.8125000-07:00</time>
 <keywords>cache, geocache, groundspeak</keywords>
 <bounds minlat="29.889766666" minlon="-95.51086666" maxlat="51.46265" maxlon="107.72246666"/>
 <wpt lat="51.43895" lon="4.467517">
  <time>2007-10-28T00:00:00.0000000-08:00</time>
  <name>GC14BED</name>
  <desc>Het laatste gekraai uit de Wildertnis!(Halloween) by Silly Walker (2,5/2)</desc>
  <url>http://www.geocaching.com/seek/cache_details.aspx?wp=GC14BED</url>
  <urlname>Het laatste gekraai uit de Wildertnis!(Halloween) by Silly Walker</urlname>
  <sym>Geocache Found</sym>
  <type>Geocache|Multi-cache|Found</type>
  <gsak:wptExtension xmlns:gsak="http://www.gsak.net/xmlv1/1">
   <gsak:UserFlag>false</gsak:UserFlag>
   <gsak:Lock>false</gsak:Lock>
   <gsak:DNF>false</gsak:DNF>
   <gsak:Watch>false</gsak:Watch>
   <gsak:UserData> </gsak:UserData>
   <gsak:UserFound>2007-11-03</gsak:UserFound>
   <gsak:FirstToFind>false</gsak:FirstToFind>
   <gsak:User2> </gsak:User2>
  </gsak:wptExtension>
  <groundspeak:cache id="642583" available="True" archived="False" xmlns:groundspeak="http://www.groundspeak.com/cache/1/0">
   <groundspeak:name>Het laatste gekraai uit de Wildertnis!(Halloween)</groundspeak:name>
   <groundspeak:placed_by>Silly Walker</groundspeak:placed_by>
   <groundspeak:owner id="">Silly Walker</groundspeak:owner>
   <groundspeak:type>Multi-cache</groundspeak:type>
   <groundspeak:container>Regular</groundspeak:container>
   <groundspeak:difficulty>2.5</groundspeak:difficulty>
   <groundspeak:terrain>2</groundspeak:terrain>
   <groundspeak:country>Belgium</groundspeak:country>
   <groundspeak:state>Antwerpen</groundspeak:state>
   <groundspeak:short_description html="False"></groundspeak:short_description>
   <groundspeak:long_description html="False"></groundspeak:long_description>
    <groundspeak:encoded_hints></groundspeak:encoded_hints>
   <groundspeak:logs>
  </groundspeak:logs>
   <groundspeak:travelbugs>
   </groundspeak:travelbugs>
</groundspeak:cache>
</wpt>
</gpx>
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan