You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by John Meyer <jm...@cstlink.com> on 2002/05/14 16:51:46 UTC
template rule xpath error
I have a rather lengthy template rule to selectively copy stylistic
attributes. However, when I use this template rule, a
java.lang.ArrayIndexOutOfBoundsException is thrown. I'm guess this is a bug
because when I remove the template, the stylesheet runs and the full version
will run under MSXML. As a side note, if anyone has any suggestions how to
optimize this kind of operation within the scope of the stylesheet, I'd be
appreciative as I will doing several similar operations in other
stylesheets.
Thanks
John
<xsl:template match="@source-document |
@role |
@absolute-position |
@top |
@right |
@bottom |
@left |
@azimuth |
... about 200 other attributes here
@white-space |
@xml:lang" mode="copy-style-attrs">
<xsl:copy-of select="."/>
</xsl:template>
<xsl:template match="@*" mode="copy-style-attrs"/>
java.lang.ArrayIndexOutOfBoundsException
at org.apache.xpath.compiler.Lexer.mapPatternElemPos(Lexer.java:436)
at org.apache.xpath.compiler.Lexer.tokenize(Lexer.java:252)
at org.apache.xpath.compiler.Lexer.tokenize(Lexer.java:139)
at
org.apache.xpath.compiler.XPathParser.initMatchPattern(XPathParser.java:194)
at org.apache.xpath.XPath.<init>(XPath.java:200)
at
org.apache.xalan.processor.StylesheetHandler.createMatchPatternXPath(Stylesh
eetHandler.java:210)
at
org.apache.xalan.processor.XSLTAttributeDef.processPATTERN(XSLTAttributeDef.
java:625)
at
org.apache.xalan.processor.XSLTAttributeDef.processValue(XSLTAttributeDef.ja
va:923)
at
org.apache.xalan.processor.XSLTAttributeDef.setAttrValue(XSLTAttributeDef.ja
va:1075)
at
org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(
XSLTElementProcessor.java:364)
at
org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(
XSLTElementProcessor.java:300)
at
org.apache.xalan.processor.ProcessorTemplateElem.startElement(ProcessorTempl
ateElem.java:120)
at
org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.
java:632)
at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidat
or.java:1214)
at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanne
r.java:1806)
at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1182)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
at
org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFa
ctoryImpl.java:795)