AlainCouthures / xsltforms

XForms to XHTML+Javascript (AJAX) conversion based on a unique XSL transformation. Suitable server-side (PHP) or client-side (Google Chrome, Edge, Internet Explorer, Mozilla FireFox, Opera, Safari) browser treatment where an XSLT 1.0 engine is available
37 stars 17 forks source link

Using double apostrophe to espacing #7

Open rysi3k opened 9 years ago

rysi3k commented 9 years ago

Hello @AlainCouthures I have xform which is generated and it uses double apostrophes to espace apostrophe. I have done some research about it, and it looks like that is proper literal in XPath 2.0 http://www.w3.org/TR/xpath20/#id-literals http://stackoverflow.com/questions/2887281/escape-single-quote-in-xslt-concat-function

Now i have code like that:

<xf:input ref="xxf:evaluate(concat('instance(''my-instance'')/document', my-xpath))">
<xf:label>...</xf:label>
</xf:input>

and this is inpossible to parse properly in XSLTForms. Could you please look in it? Or give me some advices how to parse it?

Greetings

AlainCouthures commented 9 years ago

Escaping apostrophes and quotes in strings is not an XPath 1.0 feature and XSLTForms is currently integrating an XPath 1.0 only engine with some XPath 2.0+ functions. But it is clearly one of the XPath 2.0+ goodies that can be supported as an extension in XSLTForms XPath parser (written in XSLT 1.0). Please give a try to latest build!