Sablotron error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Slav

    Sablotron error

    Hi,

    I trying to process an XML file using a XSL but am getting a
    Sablotron error ("...mismatc hed tag") when I entered an accented letter
    such as "é". I tried to play around with the encoding and am
    currently using UTF-8.

    When I process my XML file using XMLSpy the ouput is fine (the é
    letter is properly displayed), which leads me to believe that there is
    nothing wrong with my XML file strcuture.

    The PHP code that I have is very simple (snippet is below).

    xslt_set_encodi ng($xsltproc, 'UTF-8');
    $html = xslt_process($x sltproc, 'arg:/_xml', "file://" .
    $_SERVER['DOCUMENT_ROOT']."/lib/xsl/XSL_Main_Layout .xsl", NULL,
    $xml_file);


    Any help would be appreciated!


    The XML file is

    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type = "text/xsl" href =
    "Z:/Slawek/lib/xsl/XSL_Main_Layout .xsl"?>
    <content xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
    title="Manage User" display_checkbo x="false" display_refresh ="false"
    display_lock="t rue" filename="CCS_M anage_User" display_menu="N etwork
    Operator Admin" root_table="t_n ms_user" display_body="s tandard"
    display_header= "true" display_footer= "true" help_file="mana ge_user.htm"
    xsi:noNamespace SchemaLocation= "../../lib/xsd/XSD_Standard_Pa ge_Description. xsd"
    version="1.2.x" help_subdir="NO ">
    <section type="item">
    <item control="true" name="t_service _provider__name " direction="view "
    label="Service Provider">
    <value/>
    <value selected="true" >Test</value>
    <value>dw</value>
    </item>
    </section>
    <section type="item">
    <item control="false" name="t_nms_use r__username"
    direction="top/down" label="Login" disabled="false ">
    <value>Dudé</value>
    </item>
    </section>
    <section type="button" label="NO" permission="48" >
    <button label="Add" target="NMS_Mai n.php?page=CCS_ Manage_User"/>
    <button label="Delete"
    target="NMS_Mai n.php?page=CCS_ Manage_User_Tab le" disabled="true"/>
    <button label="Update" target="NMS_Mai n.php?page=CCS_ Manage_User"
    disabled="true"/>
    </section>
    <section type="button">
    <button label="&lt;Back Manage User Table"
    target="NMS_Mai n.php?page=CCS_ Manage_User_Tab le"/>
    </section>
    </content>

  • Andy Hassall

    #2
    Re: Sablotron error

    On 9 Aug 2005 13:11:15 -0700, "Slav" <slawek_jarosz@ engineer.com> wrote:
    [color=blue]
    > I trying to process an XML file using a XSL but am getting a
    >Sablotron error ("...mismatc hed tag") when I entered an accented letter
    >such as "é". I tried to play around with the encoding and am
    >currently using UTF-8.[/color]
    [color=blue]
    > <value>Dudé</value>[/color]

    What you posted isn't in UTF-8, but that's not necessarily the whole picture
    since perhaps you converted it before posting.

    Could you make the XML file available through a webserver so the raw contents
    can be seen?

    If what you pasted _are_ the raw contents, then it's not UTF-8 encoded; the é
    looks like the start of a multibyte character sequence so the parser will
    consume the '<' trying to look for trail bytes.

    é is two bytes in UTF-8; what you posted is one (and is probably iso-8859-1 or
    iso-8859-15).

    --
    Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
    <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

    Comment

    Working...