BUG xslt test with a minus char in php & domxml

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

    BUG xslt test with a minus char in php & domxml

    Hello,

    When I try to do :

    URI = <xsl:value-of select="//@URI"/><br/>
    <xsl:if test = "//@URI != '5-42922'">not equal</xsl:if><br/>
    <xsl:if test = "//@URI = '5-42922'">equal</xsl:if><br/>

    The result is :

    URI = 5-42922<br/>
    not equal<br/>
    equal<br/>


    If I remove the - (minus) of my test, it's works fine !
    Please, help me.



    phpinfo() =

    DOM/XML enabled
    DOM/XML API Version 20020815
    libxml Version 20606
    HTML Support enabled
    XPath Support enabled
    XPointer Support enabled
    DOM/XSLT enabled
    libxslt Version 1.0.33
    libxslt compiled against libxml Version 2.5.11
    DOM/EXSLT enabled
    libexslt Version 1.0.33
  • Janwillem Borleffs

    #2
    Re: BUG xslt test with a minus char in php &amp; domxml

    srommens wrote:[color=blue]
    > When I try to do :
    >
    > URI = <xsl:value-of select="//@URI"/><br/>
    > <xsl:if test = "//@URI != '5-42922'">not equal</xsl:if><br/>
    > <xsl:if test = "//@URI = '5-42922'">equal</xsl:if><br/>
    >
    > The result is :
    >
    > URI = 5-42922<br/>
    > not equal<br/>
    > equal<br/>
    >
    >
    > If I remove the - (minus) of my test, it's works fine !
    > Please, help me.
    >
    >[/color]

    How do you transform the XML/XSLT? When I use the following, I'm getting the
    expected result:

    $proc = new xsltprocessor;
    $proc->importStyleShe et($xsl); // attach the xsl rules
    echo $proc->transformToXML ($xml);


    JW



    Comment

    • srommens

      #3
      Re: BUG xslt test with a minus char in php &amp; domxml

      What is xsltprocessor ???
      (http://fr2.php.net/manual-lookup.php...=xsltprocessor)

      "Cannot instantiate non-existent class: xsltprocessor"

      My code is :

      $DomXml = file_get_conten ts("myxmlfile.x ml",1);
      $DomXml = @domxml_open_me m($DomXml,DOMXM L_LOAD_PARSING +
      DOMXML_LOAD_COM PLETE_ATTRS + DOMXML_LOAD_SUB STITUTE_ENTITIE S +
      DOMXML_LOAD_DON T_KEEP_BLANKS);

      $XslFile = "myxslfile.xsl" ;
      $DomXsl = domxml_xslt_sty lesheet_file($X slFile);

      $result = $DomXsl->process($DomXm l);
      echo $DomXsl->result_dump_me m($result);

      Comment

      • Janwillem Borleffs

        #4
        Re: BUG xslt test with a minus char in php &amp; domxml

        srommens wrote:[color=blue]
        > What is xsltprocessor ???
        > (http://fr2.php.net/manual-lookup.php...=xsltprocessor)
        >
        > "Cannot instantiate non-existent class: xsltprocessor"
        >[/color]




        JW



        Comment

        Working...