Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 60516 invoked from network); 13 Jul 2007 21:43:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Jul 2007 21:43:42 -0000 Received: (qmail 44579 invoked by uid 500); 13 Jul 2007 21:43:40 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 44522 invoked by uid 500); 13 Jul 2007 21:43:40 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 44510 invoked by uid 99); 13 Jul 2007 21:43:40 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jul 2007 14:43:40 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of rahul.akolkar@gmail.com designates 64.233.166.180 as permitted sender) Received: from [64.233.166.180] (HELO py-out-1112.google.com) (64.233.166.180) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jul 2007 14:43:36 -0700 Received: by py-out-1112.google.com with SMTP id a25so1084641pyi for ; Fri, 13 Jul 2007 14:43:15 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=j9+JTinf//JlGjBfFoOfBAHkS2yBN4vFF3DV9NgT2YbPa+iij9Y4vudGaY43cxcHIPjFQ0g0kSL3XIL4zAczVPKXQ06ZJKmJ+OvPBmHAq4jrbX3ydHDr9jFC9uJkrTMPxX1u03I93aZ8bTBA4wtd99e7brEAUsVMkI9NSPPG4CU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=PiwJo+GGiTxlBRrSHF2Tf+zeEtOwNm0UderTSiG1BAHPhoFk2IzJwrZAGSAbtmuPowZuqAoN4KM1BtKRMAqAwI252ZP4sjqRnAt+nQPcx8xKUZ8aWxT16dpy80nDCmuyXXaYcA0zJ03CrThwwvaXxoHp+w2TmShoUbjao2tn8vc= Received: by 10.64.220.8 with SMTP id s8mr3791529qbg.1184362995649; Fri, 13 Jul 2007 14:43:15 -0700 (PDT) Received: by 10.65.186.3 with HTTP; Fri, 13 Jul 2007 14:43:15 -0700 (PDT) Message-ID: Date: Fri, 13 Jul 2007 17:43:15 -0400 From: "Rahul Akolkar" To: "Jakarta Commons Users List" Subject: Re: [SCXML] Difficulties with XPath expression on XML attributes In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org On 7/13/07, Ingmar Kliche wrote: > I have difficuties to select a node using XPath. I use an EMMA XML > repesented input: > > xmlns:emma="http://www.w3.org/2003/04/emma" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.w3.org/2003/04/emma > http://www.w3.org/TR/2007/WD-emma-20070409/emma.xsd" > xmlns="http://www.example.com/example"> > > emma:tokens="flights from boston to denver"> > Boston > Denver > > > emma:tokens="flights from austin to denver"> > Austin > 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 > out of the first interpretation. I tried to use the following statement: > > cond="Data(_eventdata.emma,'/emma:emma/emma:one-of/emma:interpretation[@id='int1']/origin') > 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). -Rahul [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 [4] http://www.nabble.com/-Jexl--String-Literals-with-Newline-do-not-work-tf4035993.html > - Ingmar. > > [1] http://www.w3.org/TR/emma > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org