XML: XSL: Unbounds Prefix

Discussion in 'XML' started by Tjerk Wolterink, Nov 17, 2004.

  1. 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:eek:utput 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?
     
    Tjerk Wolterink, Nov 17, 2004
    #1
    1. Advertising

  2. Tjerk Wolterink

    Joris Gillis Guest

    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-view.cgi?userid=38041)
    Ceterum censeo XML omnibus esse utendum
     
    Joris Gillis, Nov 17, 2004
    #2
    1. Advertising

  3. >
    >
    > It seems you've forgotten to declare the 'xsl' namespace.
    >
    >
    > regards,


    haha, dam'n im blind!
     
    Tjerk Wolterink, Nov 17, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tim Tyler
    Replies:
    36
    Views:
    1,497
    Darryl L. Pierce
    Dec 10, 2004
  2. Jacques

    Prefix problem with XML/XSL

    Jacques, Jun 23, 2004, in forum: XML
    Replies:
    3
    Views:
    468
    Jacques
    Jun 23, 2004
  3. Replies:
    1
    Views:
    3,637
    A. Bolmarcich
    May 27, 2005
  4. Chris  Chiasson
    Replies:
    6
    Views:
    635
    Richard Tobin
    Nov 14, 2006
  5. Replies:
    5
    Views:
    1,251
Loading...

Share This Page