[ https://issues.apache.org/jira/browse/XALANJ-2474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17736543#comment-17736543 ]
Joe Kesselman edited comment on XALANJ-2474 at 6/24/23 10:40 PM: ----------------------------------------------------------------- When XPaths are invoked from the stylesheet, *StylesheetHandler.createXPath()* passes down a function table. When *dyn:evaluate()* is setting up, it calls *new XPath()* directly, and does not pass in that table so the XPath runs with only the default set. The move to making this "just an extension function" appears to have robbed us of that data. It isn't obvious whether or how how the extension system could fetch the stylesheet's function table or the StylesheetHandler. Deep-diving *myContext* isn't finding a route back to them; it's possible they are not actually reachable after stylesheet compilation since there's nobody else who needs them. I'm not sure whether this is fixable without reimplementing a Xalan-specific extension. We might be able to add an optional FunctionTable parameter to XPathContext; that seems vaguely reasonable, if there's a point where we have both available. was (Author: JIRAUSER285361): When XPaths are invoked from the stylesheet, *StylesheetHandler.createXPath()* passes down a function table. When *dyn:evaluate()* is setting up, it calls *new XPath()* directly, and does not pass in that table. The move to making this "just an extension function" appears to have robbed us of that data. It isn't obvious whether or how how the extension system could fetch the stylesheet's function table. It's been too long; I don't remember the data structures well enough to have this knowledge immediately available. > document() function returns different values with xalan version 2.7.1. and > 2.6.0. > --------------------------------------------------------------------------------- > > Key: XALANJ-2474 > URL: https://issues.apache.org/jira/browse/XALANJ-2474 > Project: XalanJ2 > Issue Type: Bug > Security Level: No security risk; visible to anyone(Ordinary problems in > Xalan projects. Anybody can view the issue.) > Affects Versions: 2.7.1 > Environment: Windows, using command line transform of xalan. > Reporter: pavankumar > Priority: Blocker > Attachments: identitext.xsl, input.xml, jira-xalanj-2474.xml, > jira-xalanj-2474.xslt, transform.xslt > > > xslt document() function returns duplicate and improper values with 2.7.1. > where as the same code works with 2.6.0. > Info : document and evaluate functions are used in xslt and there were other > slightly inconsistent behaviour also for 2 versions in terms of syntax and > all. and xlink:href is getting nil values in 2.7.1 > document result contained by path variable line 93 - transform.xsl is the one > causing problem. and and when printed, it outputs different values with > different versions. > Executed using xalan CLI > C:\>java org.apache.xalan.xslt.Process -IN "C:\input.xml" -XSL > "C:\transform.xslt" -OUT new.html -PARAM global.result input.xml > attaching the files.transform.xslt and input.xml -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@xalan.apache.org For additional commands, e-mail: dev-h...@xalan.apache.org