XSLT process XML problem in XMLSpy
Hi
I am trying to prcess a xml file with xslt.
XML file:
----------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xbrl
xmlns="http://www.xbrl.org/2003/instance"
xmlns:link="http://www.xbrl.org/2003/linkbase"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:cbs-bus_2="http://xbrl.cbs.nl/bus/fs/ps/2006-03-15"
xmlns:int-gcd-entr="http://www.xbrl.org/int/gcd/entry/2005-08-15"
xmlns:int-gcd-exch="http://www.xbrl.org/int/gcd/exchanges/2005-08-15"
xmlns:gen="http://www.ntp.nl/genbase"
xmlns:cbs-bus="http://xbrl.cbs.nl/bus/2006-03-15"
xmlns:ifrs-gp-typ="http://xbrl.iasb.org/int/fr/ifrs/gp/2005-05-15/types"
xmlns:int-gcd-curr="http://www.xbrl.org/int/gcd/currencies/2005-08-15"
xmlns:ff="http://www.xbrl.org/2005/role/restatedLabel"
xmlns:int-gcd-cntr="http://www.xbrl.org/int/gcd/countries/2005-08-15"
xmlns:iso4217="http://www.xbrl.org/2003/iso4217"
xmlns:int-gcd-dt="http://www.xbrl.org/int/gcd/dt/2005-08-15"
xmlns:ifrs-gp="http://xbrl.iasb.org/int/fr/ifrs/gp/2005-05-15"
xmlns:int-gcd-lang="http://www.xbrl.org/int/gcd/languages/2005-08-15"
xmlns:int-gcd="http://www.xbrl.org/int/gcd/cor/2005-08-15"
xmlns:zak="http://www.belastingdienst.nl/2004/xbrl/zak"
xmlns:nl-gcd="http://www.xbrl-ntp.nl/gcd/nl-gcd-2005-11-01">
<context id="C1">
<entity>
<identifier scheme="http://www.bedrijfX.nl/bus">cbs-bus</identifier>
</entity>
<period>
<instant>2006-01-01</instant>
</period>
</context>
<context id="c2">
<entity>
<identifier scheme="http://www.bedrijfX.nl/bus">cbs-bus</identifier>
</entity>
<period>
<startDate>2006-01-01</startDate>
<endDate>2006-12-31</endDate>
</period>
</context>
<unit id="u1">
<measure>iso4217:EUR</measure>
</unit>
</xbrl>
XSLT file
-------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<?altova_samplexml test.xml?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<html>
<head>
<title>Contexten en units validatie</title>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="xbrl">
<table>
<tbody>
<xsl:apply-templates select="context"/>
</tbody>
</table>
</xsl:template>
<xsl:template match="context">
<tr>
<td><xsl:value-of select="@id"/></td>
<td><xsl:value-of select="entity/identifier"/></td>
<td><xsl:value-of select="entity/identifier/@scheme"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>
The xml file has quite lots of name spaces. I cannot get the right result back by using this xslt to process the xml above. But if I remove the name spaces from the tag <xbrl>, then it does work.
Anybody can give a hint? Thanks.
Xin
|