This ‘generated’ xpath is what we get back from Saxon in the originally parsed expression. This splitting happens recursively based on the type of the expression in https://github.com/betterFORM/betterFORM/blob/development/core/src/main/java/de/betterform/xml/xpath/impl/saxon/SaxonXPathExpressionSerializer.java (still the 220.127.116.11 version there)
The same xpath was returned in Saxon 18.104.22.168 in which it worked. In Saxon 22.214.171.124 it was
Is the xpath3 format that is returned by Saxon while I’m still in xpath2 mode (that is the default right?) should it not also accept this? E.g. by checking if a backwards compatibility flag is set (or a ‘forward compatibility flag’?) or still return the xpath in the ‘old’ pre xpath3 format? Now I know this, it also explains clearly why our referencefindertests fail.
To check if I missed other issues in the SaxonExpressionSerializer (new xpath constructs that are now returned by Saxon) I changed
which we use to create a string reprentation of an element in an axis expression that, in this case returns element(‘’:amount) to
String nt = nodeTest.toString();
int startName = nt.indexOf(":")+1;
int endName = nt.length() -1 ;
to get the ‘original’ saxon pre 9.3 version of element(amount, xs:AnyType). After that I needed to implement ‘serializing’ the LetExpression which was returned by Saxon when creating an Expression for
count(observation[/data != '']/code) > 0
But up to now I seem to be getting along without having to enable XPath 3.0 or adapt Saxon… Heck, the reference finder even seems to find more nodes than before (and logically so I think, but with very exceptional xpath xpressions that I never saw in real life…
One important question though. Is the workaround above ‘safe’ or is there another way to get the name of an element?
Ronald van Kuijk
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ firstname.lastname@example.org https://lists.sourceforge.net/lists/listinfo/saxon-help