Re: Here's a tricky one

On 5/11/07, Norman Walsh <ndw@nwalsh.com> wrote:
> Assuming that $p:episode is "7ffa7ffa" when this pipeline is executed,
> what is the output?
>
>   <p:option name="match" value="@episode"/>
>   <p:option name="replace" select="$p:episode"/>

The way I read the spec, 'replace' is an XPath expression and it is
evaluated in the context of the matching node. The '7ffa7ffa' XPath
expression will return an empty nodeset in the context of an
attribute, and its string value will be an empty string. So the value
of the '@episode' attribute is set to an empty string.

Alex
-- 
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/

Received on Friday, 11 May 2007 16:13:19 UTC