XSLT - Namespaces

mtk-flo

Erfahrenes Mitglied
Hallo,

ich habe 3 XML-Dateien.

Pruefung.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<Pruefung>
...
</Pruefung>

persDaten.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<pdns:Person xmlns:pdns="http://www.example.org/Person" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.org/Person Schema/PersoenlicheDaten.xsd ">
....
</pdns:Person>

GV.xml
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<GV xmlns="http://www.example.org/GV">
....
</GV>

Nun erstell ich mit XSLT ein PDF, das Daten aus allen 3 XML-Dateien bekommt.
Nur mit dem Namespace der GV.xml stimmt was nicht.
Wie muss ich den Namespace der GV.xml im XSLT angeben ?

meinXSLT.xslt
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:fo=http://www.w3.org/1999/XSL/Format
xmlns:xsl=http://www.w3.org/1999/XSL/Transform
xmlns:fox=http://xml.apche.org/fop/extensions
xmlns=http://www.w3.org/TR/REC-html140
xmlns:pdns="http://www.example.org/Person">
 
<xsl:output method="xml" version="1.0" />
 
<xsl:variable name="pers" select="document('../../../persDaten.xml')" />
<xsl:variable name="gv" select="document('GV.xml')" />
 
<xsl:value-of select="$pers/pdns:Person/Vorname" />
<xsl:value-of select="//Pruefung/Zeitraum/UhrzeitBeginn" />
<!-- GV-Ausgabe -->
....
</stylesheet>
 
Zurück