![]() |
XML: XSL: Unbounds Prefix
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" xmlns:page="http://www.wolterinkwebdesign.com/xml/page" xmlns:xc="http://www.wolterinkwebdesign.com/xml/xcontent"> <xsl:output method="xml" indent="yes"/> <xsl:param name="absolute_url"/> <xsl:param name="upload_url"/> <xsl:template match="/xc:xcontent"> <page:page 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> </page:page> </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? |
Re: XML: XSL: Unbounds Prefix
Hi,
> 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" The debug message says it is a XML parser error, so the problem is not realted to XSLT. > } > } It seems you've forgotten to declare the 'xsl' namespace. regards, -- Joris Gillis (http://www.ticalc.org/cgi-bin/acct-v...i?userid=38041) Ceterum censeo XML omnibus esse utendum |
Re: XML: XSL: Unbounds Prefix
>
> > It seems you've forgotten to declare the 'xsl' namespace. > > > regards, haha, dam'n im blind! |
| All times are GMT. The time now is 02:50 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.