XSLT and DOM

From: Date: Fri, 29 Mar 2002 16:14:59 +0000
Subject: XSLT and DOM
Groups: php.general 
Request: Send a blank email to php-general+get-90677@lists.php.net to get a copy of this message
Can anyone tell me why this is not working? -- snip of xslt_processor.php-------------------------------------------------------------------- $doc = new_xmldoc("1.0"); $root = $doc->add_root("debug"); $head = $root->new_child("broswer", "1"); $head->set_attribute("key", "UserAgent"); $head->set_attribute("value", $HTTP_USER_AGENT); $head = $root->new_child("broswer", "1"); $head->set_attribute("key", "UserAgent"); $head->set_attribute("value", $HTTP_USER_AGENT); $xslt_args["buf"] = sprintf("%s", $doc->dumpmem()); // $xslt_args["buf"] = $doc->dumpmem(); $xh = xslt_create(); $result = xslt_process($xh, $REQ_FILE, $XSL, NULL, $xslt_args, array()); --snip of xml-html.xsl--------------------------------------------------------------------------- <xsl:value-of select="count( document('arg:/buf')/debug/browser )"/>
        <xsl:for-each select="document('arg:/buf')/debug/browser">
          <small>
            <xsl:value-of select="@key"/> == <xsl:value-of select="@value"
/>
          </small>
          <br/>
        </xsl:for-each>
there is no output and the count() is 0 if i "manually set $xslt_args["buf"] like so: $xslt_args["buf"] = " <debug> <browser key=\"Agent\" value=\"$HTTP_USER_AGENT\"/> <browser key=\"CurrentTime\" value=\"$time\"/> <browser key=\"Mode\" value=\"DEBUG\"/> </debug> "; everything works fine. is there a known issue with using DOM and XSLT with php or am i missing something completely trivial? Thanks, -- ------------------------- Sean P. Scanlon perl -e 'print pack("h*", "3707370426c6575646f647e2e65647"), "\n"' -------------------------

« previous php.general (#90677) next »