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

concat without end parenthesis #26

Open vionta opened 1 year ago

vionta commented 1 year ago

Hi Alain,

I've found a weird one. I may be wrong but here I go:

I have the following code, that actually works without the end parenthesis ")" at the end of the concat function call: <xf:repeat ref="instance('paginas')//*:group" > <a href="{concat('/mockup/web/', ../key, '/' ,key,'.html'}" target="mockup-frame" name="{key}" > ...

if I add the end parenthesis, like this, it breaks: <a href="{concat('/mockup/web/', ../key, '/' ,key,'.html')}" target="mockup-frame" name="{key}" >

I thought it could be something weird, but then I saw this one working with the same fault, it does n't work if I add the end parenthesis on the concat line: <xf:repeat ref="instance('paginas')//*:menu" > <li> <a href="{concat('#', target}" > <xf:output ref="name" /> </a> </li> </xf:repeat>

As you can see, I have no urgent need for this to be fixed but it may bug other ones (or me..). The script version is 1.3 (details below).

XSLTForms 1.3 (652) XForms 1.1+ with XPath 1.0+ Engine

Hope everything is Ok, thanks for all Alain.

AlainCouthures commented 1 year ago

Hi Jorge,

I have fixed the XSLT named template "avtparser" for XSLTForms 1.3 (since 1.5, AVT parsing is performed with Javascript).

This template must add its own concat() call for AVT with multiple items and it was in conflict with another concat() call within.

Please give the fixed template a try: avtparser.zip

As a workaround, "{concat('#",target)}" could also be written "#{target}".

Thank you for your feedback!