T
Tjerk Wolterink
Hello i have an xml file and an xsl file:
xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xc:xcontent xmlns:xc="http://www.wolterinkwebdesign.com/xml/xcontent" xmlns="http://www.w3.org/1999/xhtml">
<xc:bestand>
<xc:id>6</xc:id>
<xc:beschrijving type="string">[CDATA[betaal lijst 2]]</xc:beschrijving>
<xc:file type="file" mime-type-image="/xcm/mime_types/unknown.png">[CDATA[betaallijst_hok.doc]]</xc:file>
</xc:bestand>
<xc:bestand>
<xc:id>5</xc:id>
<xc:beschrijving type="string">[CDATA[henk]]</xc:beschrijving>
<xc:file type="file" mime-type-image="/xcm/mime_types/image.png">[CDATA[3defin.jpg]]</xc:file>
</xc:bestand>
<xc:bestand>
<xc:id>8</xc:id>
<xc:beschrijving type="string">[CDATA[film voorcafe]]</xc:beschrijving>
<xc:file type="file" mime-type-image="/xcm/mime_types/video.png">[CDATA[voorcafédrietevol.avi]]</xc:file>
</xc:bestand>
<xc:bestand>
<xc:id>26</xc:id>
<xc:beschrijving type="string">[CDATA[wrywry]]</xc:beschrijving>
<xc:file type="file" mime-type-image="/xcm/mime_types/image.png">[CDATA[bocholt_derk.jpg]]</xc:file>
</xc:bestand>
<xc:bestand>
<xc:id>13</xc:id>
<xc:beschrijving type="string">[CDATA[pipoi]]</xc:beschrijving>
<xc:file type="file" mime-type-image="/xcm/mime_types/postscript.png">[CDATA[103290 Brief LicentScharenborg.eps]]</xc:file>
</xc:bestand>
<xc:bestand>
<xc:id>24</xc:id>
<xc:beschrijving type="string">[CDATA[etuetu]]</xc:beschrijving>
<xc:file type="file" mime-type-image="/xcm/mime_types/image.png">[CDATA[1moehaha.jpg]]</xc:file>
</xc:bestand>
</xc:xcontent>
xsl:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlnsage="http://www.wolterinkwebdesign.com/xml/page"
xmlns:xc="http://www.wolterinkwebdesign.com/xml/xcontent">
<xslutput method="xml" indent="yes"/>
<xslaram name="absolute_url"/>
<xslaram name="upload_url"/>
<xsl:template match="/xc:xcontent">
<pageage type="module">
<page:button-new module="files" multiple="bestand"/>
<ul>
<xsl:for-each select="xc:bestand">
<li style="vertical-align:middle;">
<xsl:if test="position() mod 2=1">
<xsl:attribute name="class">alternate</xsl:attribute>
</xsl:if>
<a>
<xsl:attribute name="href">
<xsl:value-of select="$upload_url"/>/<xsl:value-of select="xc:file/."/>
</xsl:attribute>
<img style="margin-right:4px;">
<xsl:attribute name="src">
<xsl:value-of select="xc:file/@mime-type-image"/>
</xsl:attribute>
</img>
<xsl:value-of select="xc:beschrijving"/>
</a>
<page:button-edit-delete module="files" id="{./id}" multiple="bestand"/>
</li>
</xsl:for-each>
</ul>
</pageage>
</xsl:template>
</xsl:stylesheet>
Now i get the following error:
XSLT Error:
array(4) {
[0]=>
resource(99) of type (XSLT Processor)
[1]=>
int(3)
[2]=>
int(0)
[3]=>
array(6) {
msgtype ="error"
code =string(1) "2"
module ="Sablotron"
URI ="arg:/xsl"
line ="2"
msg ="XML parser error 27: unbound prefix"
}
}
So the error is in line 2 of the xsl file. but what is wrong?
xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xc:xcontent xmlns:xc="http://www.wolterinkwebdesign.com/xml/xcontent" xmlns="http://www.w3.org/1999/xhtml">
<xc:bestand>
<xc:id>6</xc:id>
<xc:beschrijving type="string">[CDATA[betaal lijst 2]]</xc:beschrijving>
<xc:file type="file" mime-type-image="/xcm/mime_types/unknown.png">[CDATA[betaallijst_hok.doc]]</xc:file>
</xc:bestand>
<xc:bestand>
<xc:id>5</xc:id>
<xc:beschrijving type="string">[CDATA[henk]]</xc:beschrijving>
<xc:file type="file" mime-type-image="/xcm/mime_types/image.png">[CDATA[3defin.jpg]]</xc:file>
</xc:bestand>
<xc:bestand>
<xc:id>8</xc:id>
<xc:beschrijving type="string">[CDATA[film voorcafe]]</xc:beschrijving>
<xc:file type="file" mime-type-image="/xcm/mime_types/video.png">[CDATA[voorcafédrietevol.avi]]</xc:file>
</xc:bestand>
<xc:bestand>
<xc:id>26</xc:id>
<xc:beschrijving type="string">[CDATA[wrywry]]</xc:beschrijving>
<xc:file type="file" mime-type-image="/xcm/mime_types/image.png">[CDATA[bocholt_derk.jpg]]</xc:file>
</xc:bestand>
<xc:bestand>
<xc:id>13</xc:id>
<xc:beschrijving type="string">[CDATA[pipoi]]</xc:beschrijving>
<xc:file type="file" mime-type-image="/xcm/mime_types/postscript.png">[CDATA[103290 Brief LicentScharenborg.eps]]</xc:file>
</xc:bestand>
<xc:bestand>
<xc:id>24</xc:id>
<xc:beschrijving type="string">[CDATA[etuetu]]</xc:beschrijving>
<xc:file type="file" mime-type-image="/xcm/mime_types/image.png">[CDATA[1moehaha.jpg]]</xc:file>
</xc:bestand>
</xc:xcontent>
xsl:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlnsage="http://www.wolterinkwebdesign.com/xml/page"
xmlns:xc="http://www.wolterinkwebdesign.com/xml/xcontent">
<xslutput method="xml" indent="yes"/>
<xslaram name="absolute_url"/>
<xslaram name="upload_url"/>
<xsl:template match="/xc:xcontent">
<pageage type="module">
<page:button-new module="files" multiple="bestand"/>
<ul>
<xsl:for-each select="xc:bestand">
<li style="vertical-align:middle;">
<xsl:if test="position() mod 2=1">
<xsl:attribute name="class">alternate</xsl:attribute>
</xsl:if>
<a>
<xsl:attribute name="href">
<xsl:value-of select="$upload_url"/>/<xsl:value-of select="xc:file/."/>
</xsl:attribute>
<img style="margin-right:4px;">
<xsl:attribute name="src">
<xsl:value-of select="xc:file/@mime-type-image"/>
</xsl:attribute>
</img>
<xsl:value-of select="xc:beschrijving"/>
</a>
<page:button-edit-delete module="files" id="{./id}" multiple="bestand"/>
</li>
</xsl:for-each>
</ul>
</pageage>
</xsl:template>
</xsl:stylesheet>
Now i get the following error:
XSLT Error:
array(4) {
[0]=>
resource(99) of type (XSLT Processor)
[1]=>
int(3)
[2]=>
int(0)
[3]=>
array(6) {
msgtype ="error"
code =string(1) "2"
module ="Sablotron"
URI ="arg:/xsl"
line ="2"
msg ="XML parser error 27: unbound prefix"
}
}
So the error is in line 2 of the xsl file. but what is wrong?