Hi all,
I'm trying to build a Xpath 2.0 expression in an xforms:output element. So here is my expression : <xforms:output value="if (true()) then concat('<a',' href="javascript:MyFunction(&# 39;<a href="http://MyServer/MyFile')"','>'">http://MyServer/MyFile')"','>') else ''" mediatype="text/html"/> I want to build : <a href="javascript:MyFunction('http://MyServer/MyFile')> I have the following error message : ! XForms error: XPath syntax error at char 71 in {...f="javascript:MyFunction('http...}: expected ")", found name "http:" Can anyone tell me what am I doing wrong ? Marc -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Perhaps is taking ':' character as comment inside
XPATH, I have experienced this while trying to call a javascript function using XPath... Try to replace it with something like "<" which is a legal replacement of '<' char. Regards, Al.Haziz. --- [hidden email] wrote: > Hi all, > > I'm trying to build a Xpath 2.0 expression in an > xforms:output element. > > So here is my expression : > > <xforms:output value="if (true()) then > concat('<a',' > href="javascript:MyFunction(� > 39;http://MyServer/MyFile')"','>') else > ''" > mediatype="text/html"/> > > I want to build : > > <a > > > I have the following error message : > > ! XForms error: XPath syntax error at char 71 in > {...f="javascript:MyFunction('http...}: expected > ")", found name > "http:" > > Can anyone tell me what am I doing wrong ? > > Marc > > > > -- > You receive this message as a subscriber of the > [hidden email] mailing list. > To unsubscribe: > mailto:[hidden email] > For general help: > mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: > http://www.objectweb.org/wws > Send instant messages to your online friends http://uk.messenger.yahoo.com -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Marc.Benimeli
Hi al,
Replacing : with : is not solving the problem. Thanks for your help Marc -----Message d'origine----- De : al haziz [mailto:[hidden email]] Envoyé : vendredi 24 mars 2006 20:06 À : [hidden email] Objet : Re: [ops-users] Xpath 2.0 evaluation Perhaps is taking ':' character as comment inside XPATH, I have experienced this while trying to call a javascript function using XPath... Try to replace it with something like "<" which is a legal replacement of '<' char. Regards, Al.Haziz. --- [hidden email] wrote: > Hi all, > > I'm trying to build a Xpath 2.0 expression in an xforms:output > element. > > So here is my expression : > > <xforms:output value="if (true()) then concat('<a',' > href="javascript:MyFunction(� > 39;http://MyServer/MyFile')"','>') else ''" > mediatype="text/html"/> > > I want to build : > > <a > > > I have the following error message : > > ! XForms error: XPath syntax error at char 71 in > {...f="javascript:MyFunction('http...}: expected ")", found name > "http:" > > Can anyone tell me what am I doing wrong ? > > Marc > > > > -- > You receive this message as a subscriber of the > [hidden email] mailing list. > To unsubscribe: > mailto:[hidden email] > For general help: > mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: > http://www.objectweb.org/wws > Send instant messages to your online friends http://uk.messenger.yahoo.com -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Marc,
The : is not the problem its the quotes (") you need to replace them with " Ryan Puddephatt Software Engineer TFX Group - IT UK 1 Michaelson Square Livingston West Lothian Scotand EH54 7DP * [hidden email] ( 01506 407 110 7 01506 407 108 >-----Original Message----- >From: [hidden email] [mailto:[hidden email]] >Sent: 27 March 2006 13:45 >To: [hidden email] >Subject: RE: [ops-users] Xpath 2.0 evaluation > >Hi al, > >Replacing : with : is not solving the problem. > >Thanks for your help > >Marc > >-----Message d'origine----- >De : al haziz [mailto:[hidden email]] >Envoyé : vendredi 24 mars 2006 20:06 >À : [hidden email] >Objet : Re: [ops-users] Xpath 2.0 evaluation > >Perhaps is taking ':' character as comment inside XPATH, I have experienced >this while trying to call a javascript function using XPath... > >Try to replace it with something like "<" which is a legal replacement >of '<' char. > > Regards, Al.Haziz. > >--- [hidden email] wrote: > >> Hi all, >> >> I'm trying to build a Xpath 2.0 expression in an xforms:output >> element. >> >> So here is my expression : >> >> <xforms:output value="if (true()) then concat('<a',' >> href="javascript:MyFunction(� >> 39;http://MyServer/MyFile')"','>') else ''" >> mediatype="text/html"/> >> >> I want to build : >> >> <a >> >href="javascript:MyFunction('http://MyServer/MyFile')> >> >> I have the following error message : >> >> ! XForms error: XPath syntax error at char 71 in >> {...f="javascript:MyFunction('http...}: expected ")", found name >> "http:" >> >> Can anyone tell me what am I doing wrong ? >> >> Marc >> >> > >> -- >> You receive this message as a subscriber of the >> [hidden email] mailing list. >> To unsubscribe: >> mailto:[hidden email] >> For general help: >> mailto:[hidden email]?subject=help >> ObjectWeb mailing lists service home page: >> http://www.objectweb.org/wws >> > > >Send instant messages to your online friends http://uk.messenger.yahoo.com > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by Marc.Benimeli
Marc,
To escape a single quote in an XPath 2.0 expression, use two single quotes ('', not "). Note that funnily enough, this is not possible in XPath 1.0. Using " doesn't help, as that is interpreted by the parser, not by the XPath interpreter. -Erik [hidden email] wrote: > Hi all, > > I'm trying to build a Xpath 2.0 expression in an xforms:output element. > > So here is my expression : > > <xforms:output value="if (true()) then concat('<a',' > href="javascript:MyFunction(&# > 39;<a href="http://MyServer/MyFile')"','>'">http://MyServer/MyFile')"','>') else ''" > mediatype="text/html"/> > > I want to build : > > <a href="javascript:MyFunction('http://MyServer/MyFile')> > > I have the following error message : > > ! XForms error: XPath syntax error at char 71 in > {...f="javascript:MyFunction('http...}: expected ")", found name > "http:" > > Can anyone tell me what am I doing wrong ? > > Marc -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |