|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XSLT key() - Saxon UnsupportedOperationException
Hi, I have a problem with evaluation of key() fonction. I think my problem is a XSLT problem, not a Saxon bug, but here the exception : java.lang.UnsupportedOperationException: Cannot create intensional node-set with context dependencies: class com.icl.saxon.expr.PathExpression:128 at com.icl.saxon.expr.NodeSetIntent.<init>(NodeSetIntent.java:26) at com.icl.saxon.expr.PathExpression.reduce(PathExpression.java:186) at com.icl.saxon.expr.PathExpression.enumerate(PathExpression.java:219) at com.icl.saxon.expr.NodeListExpression.enumerate(NodeListExpression.java:80) at com.icl.saxon.style.XSLForEach.process(XSLForEach.java:69) at com.icl.saxon.style.StyleElement.processChildren(StyleElement.java:630) at com.icl.saxon.style.XSLForEach.process(XSLForEach.java:96) at com.icl.saxon.style.StyleElement.processChildren(StyleElement.java:630) at com.icl.saxon.style.LiteralResultElement.process(LiteralResultElement.java:281) at com.icl.saxon.style.StyleElement.processChildren(StyleElement.java:630) at com.icl.saxon.style.XSLGeneralVariable.getSelectValue(XSLGeneralVariable.java:235) at com.icl.saxon.style.XSLVariable.process(XSLVariable.java:89) at com.icl.saxon.style.XSLStyleSheet.process(XSLStyleSheet.java:626) at com.icl.saxon.Controller.transformDocument(Controller.java:1065) at com.icl.saxon.Controller.transform(Controller.java:939) at com.icl.saxon.StyleSheet.processFile(StyleSheet.java:516) at com.icl.saxon.StyleSheet.doMain(StyleSheet.java:338) at com.icl.saxon.StyleSheet.main(StyleSheet.java:63) The XSLT program is below. I have two XML documents, and a key to construct, matching elements coming from these two documents. <xsl:variable name="styles" select="document( $stylesPathName )"/> <xsl:key name="groupesdeFieldsParNom" match="$styles/office:document-styles/office:master-styles/style:master-page//text:bookmark-ref/@text:ref-name" use="." /> <xsl:key name="groupesdeFieldsParNom" match="/office:document-content/office:body//text:bookmark-ref/@text:ref-name" use="." />
<xsl:for-each select="
$styles/office:document-styles/office:master-styles/style:master-page//text:bookmark-ref/@text:ref-name[
generate-id() =
generate-id(
key('groupesdeFieldsParNom', .)[1]
)
]">
<xsl:copy-of select="parent::*"/>
</xsl:for-each>
</fields>
</xsl:variable>I think the problem arises on a call to key(), because the context node is not already known, while key() needs this context node, to know what XML tree is to be visited. I tried some workarounds, without success. I guess I will have to find out another resolution method, but perhaps there is indeed a workaround that I have not already thought about. Any idea ? Regards -- Ph D
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








