I have the below simple xslt and the input xml, doing the transformation in eclipse Mars... However when I run this getting "String Index out of range error"
Could anyone lease give a hint on the fix? Is it because of the date function?
xsl
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xslt" xmlns:str="http://exslt.org/strings" xmlns:set="http://exslt.org/sets" xmlns:math="http://exslt.org/math" xmlns:exsl="http://exslt.org/common" xmlns:date="http://exslt.org/dates-and-times" version="1.0"> <xsl:output method="xml" encoding="UTF-8" indent="no"/> <xsl:template match="/"> <xsl:apply-templates select="Top" mode="create"/> </xsl:template> <xsl:template match="Top" mode="create"> <Root> <body> <out> <Temp> <Temp1> <data> <xsl:value-of select="date:date()"/> </data> </Temp1> </Temp> </out> </body> </Root> </xsl:template> </xsl:stylesheet> xml
<Top></Top> error in eclipse after transform - Eclipse Mars, xml perspective, JAXPSAXProcessorInvoker
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(Unknown Source) at com.sun.org.apache.xalan.internal.lib.ExsltDatetime.date(Unknown Source) at map_getLoanAgmt_to_manageLoanAgmtPHStatement_MF_req_1.template$dot$1() at map_getLoanAgmt_to_manageLoanAgmtPHStatement_MF_req_1.applyTemplates1() at map_getLoanAgmt_to_manageLoanAgmtPHStatement_MF_req_1.template$dot$0() at map_getLoanAgmt_to_manageLoanAgmtPHStatement_MF_req_1.applyTemplates() at map_getLoanAgmt_to_manageLoanAgmtPHStatement_MF_req_1.transform()
No comments:
Post a Comment