Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XML: XSL: Unbounds Prefix

Reply
Thread Tools

XML: XSL: Unbounds Prefix

 
 
Tjerk Wolterink
Guest
Posts: n/a
 
      11-17-2004
Hello i have an xml file and an xsl file:

xml:


<?xml version="1.0" encoding="ISO-8859-1"?>

<xccontent xmlnsc="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>
</xccontent>









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"
xmlnsc="http://www.wolterinkwebdesign.com/xml/xcontent">

<xslutput method="xml" indent="yes"/>

<xslaram name="absolute_url"/>
<xslaram name="upload_url"/>

<xsl:template match="/xccontent">
<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?


 
Reply With Quote
 
 
 
 
Joris Gillis
Guest
Posts: n/a
 
      11-17-2004
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
 
Reply With Quote
 
 
 
 
Tjerk Wolterink
Guest
Posts: n/a
 
      11-17-2004
>
>
> It seems you've forgotten to declare the 'xsl' namespace.
>
>
> regards,


haha, dam'n im blind!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
removing a namespace prefix and removing all attributes not in that same prefix Chris Chiasson XML 6 11-14-2006 05:08 PM
ISE 6.3i error : unable to find flow prefix Nisheeth VHDL 0 03-08-2005 05:57 PM
"static" prefix - to parallel "this" prefix Tim Tyler Java 36 12-10-2004 01:02 AM
Suddenly increase in Internet BGP Prefix Count Niche Cisco 0 11-19-2004 01:24 AM
Tech-prefix david Cisco 1 01-28-2004 01:56 PM



Advertisments