Subject: xml document as parameter and attribute expression
From: Sebastien Arbogast <sebastien.arbogast@xxxxxxxxx>
Date: Sun, 24 Apr 2005 13:04:15 -0500
|
Hi,
In my XSLT stylesheet, I have a global parameter containing some XML
content like this :
<div id="center" title="myTitle">
...
</div>
This parameter is called 'center' and I would like to retrieve the
value of title with some XPath expression. I tried the following :
<xsl:value-of select="$center/div[@id='center']/@title"/>
But my libxslt/php5 XSLT processor gives me an XPath internal error
(document without root) and I don't understand what's the problem.
BTW I have another stylesheet that does nearly the same except it
receives the uri of a document as a parameter and uses
document($center) instead of center.
I guess it's a problem of tree parsing but how can I solve that,
knowing that I can't change the fact that I receive XML string
directly as a parameter (XSLT transform streaming) ?
Thx in advance.
--
Sebastien ARBOGAST
|