On 7/13/07, Ingmar Kliche <[EMAIL PROTECTED]> wrote:
I have difficuties to select a node using XPath. I use an EMMA XML
repesented input:

<emma:emma version="1.0"
  <emma:one-of id="r1" emma:start="1087995961542" emma:end="1087995963542">
    <emma:interpretation id="int1" emma:confidence="0.75"
    emma:tokens="flights from boston to denver">

    <emma:interpretation id="int2" emma:confidence="0.68"
    emma:tokens="flights from austin to denver">

taken from [1]. This EMMA document is parsed into its DOM and passed into
the engine (attached to the eventdata). Now I'd like to select the <origin>
out of the first interpretation. I tried to use the following statement:

<transition event="emma" xmlns:emma=http://www.w3.org/2003/04/emma
eq 'Boston'" target="twenty" />

I think the XPath itself is correct, but unfortunately the overall statement
is not a valid JEXL statement anymore (as of the ' around "int1"). How
should I select the value of the attribute to make it a valid statement? I
tried to escape using \ , but it did not work.

Any suggestion?


This nets out to be a JEXL question. It has been asked before a few
[1],[2],[3],[4] times.

JEXL has no elegant way of doing this (you can store an apostrophe in
the state machine's root context and then use it in string
concatenation to get by).


[1] http://www.nabble.com/-scxml--Data%28%29-xpath-and-the-syntax-tf1682372.html
[2] http://www.nabble.com/-jexl--How-to-escape-the-Apostrophe-tf1686607.html
[3] http://www.nabble.com/-Jelly-JEXL--String-concatenation-tf155102.html

- Ingmar.

[1] http://www.w3.org/TR/emma

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to