Hello -
I am trying to convert an XML file to XSL:FO using a XSL I wrote.
I keep getting a TransformerConfigurationException and StringIndexOutOfBoundsException, and I can not figure out why. This seems like it might be a namespace or tag problem, but I have verified all my xsl and fo namespace tags, and they check out. Any help you can offer would be great.
I am using Xalan and FOP
Below is the print stack I get:
java.lang.StringIndexOutOfBoundsException:
String index out of range: 20
at java.lang.String.substring(String.java:1522)
at org.apache.xpath.compiler.Lexer.tokenize(Lexer.java:235)
at org.apache.xpath.compiler.Lexer.tokenize(Lexer.java:139)
at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:144)
at org.apache.xpath.XPath.<init>(XPath.java:198)
at org.apache.xalan.processor.StylesheetHandler.createXPath(StylesheetHandler.java:193)
at org.apache.xalan.processor.XSLTAttributeDef.processEXPR(XSLTAttributeDef.java:573)
at org.apache.xalan.processor.XSLTAttributeDef.processValue(XSLTAttributeDef.java:917)
at org.apache.xalan.processor.XSLTAttributeDef.setAttrValue(XSLTAttributeDef.java: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(ProcessorTemplateElem.java:120)
at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:632)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1449)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:499)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:795)
at com.techrx.component.report.util.XsltStylesheet.setStylesheet(XsltStylesheet.java:158)
at com.techrx.component.report.util.XsltStylesheet.<init>(XsltStylesheet.java:88)
at com.techrx.component.report.standard.StandardReportBIO.getStylesheet(StandardReportBIO.java:87)
at com.techrx.component.report.test.FillLogTester.main(FillLogTester.java:107)
**** ERROR: com.techrx.component.report.ReportException: javax.xml.transform.TransformerConfigurationException: String index out of range: 20 ****
com.techrx.component.report.ReportException: javax.xml.transform.TransformerConfigurationException: String index out of range: 20
at com.techrx.component.report.util.XsltStylesheet.setStylesheet(XsltStylesheet.java:166)
at com.techrx.component.report.util.XsltStylesheet.<init>(XsltStylesheet.java:88)
at com.techrx.component.report.standard.StandardReportBIO.getStylesheet(StandardReportBIO.java:87)
at com.techrx.component.report.test.FillLogTester.main(FillLogTester.java:107)