Hi Winona,
 
Since version 1.5, there is a new XPath parser written in _javascript_.
 
There is a bug in it when there is a wildcard for prefix between an axis and a local name (in this error: "descendant::*:editionStmt").
 
As a workaround, if you replace "/descendant::* with "//", such expressions should be parsed correctly.
 
I already have a fix for this bug which will be integrated in the next release.
 
Please also find how to patch yourself the "xsltforms.js" file within the "Fleur.XPathEvaluator._getName" function:
...
Fleur.XPathEvaluator._getName = function(s) {
  var i = 0;
  var o = s.charAt(0);
  var prev = "";
  while (o !== "" && "_.-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz:*{".indexOf(o) !== -1) {
     if (o === "*") {
      if (s.charAt(i + 1) !== ":") {
        if (i > 0 && (s.charAt(i - 1) === ":" || s.charAt(i - 1) === "}")) {
          i++;
          break;
        } else {
          if (i === 0) {
            i++;
          }
          break;
        }
      }
    }
...
 
Thank you for your feedback!
 
--Alain
Le 04/04/2023 15:52 CEST, Winona Salesky <[email protected]> a écrit :
 
 
Hi All, 
I just got around to testing version 1.7. My forms which were working in version 1.3 are now throwing the following error. Any ideas what is going on?
Thanks!
-Winona
 
ERROR: 
XSLTForms Exception

Error parsing the following XPath _expression_
instance('i-porjectSpecificData')//*:option[@name= instance('i-projectSpecificDataSelected')//*:selected]/descendant::*:editionStmt

Unexpected identifier 'syntax'
_______________________________________________ Xsltforms-support mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/xsltforms-support
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to