Hi all,

I have to treat many xml files at the same time with a XSLT,
so I made the following xml to be transform:
<?xml version="1.0" encoding="UTF-8"?>
<files>
        <file>c:\temp\file1.xml</file>
        <file>c:\temp\file2.xml</file>
        <file>c:\temp\file3.xml</file>
        <file>c:\temp\file4.xml</file>
        ....
</files>

My XSLT looks like this:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:template match="/">
        <msci>
                <xsl:apply-templates select="document(//file)/root/entity"/>
        </msci>
</xsl:template>

<xsl:template match="entity">
        <entity>
                ...
        </entity>
</xsl:template>

</xsl:stylesheet>


Executing this transformation crash with the following error code:
SystemId Unknown; Line #7; Column #-1; Can not load requested doc:
C:\temp\file3.xml
Warning: popContextNodeList when stack is empty!
com.eim.util.msci.MSCIImporterException:
javax.xml.transform.TransformerException:
java.lang.ArrayIndexOutOfBoundsException: -1
        at
com.eim.util.msci.MSCIImporter.getFundsTracks(MSCIImporter.java:260)
        at com.eim.util.msci.MSCIImporter.main(MSCIImporter.java:303)
Caused by: javax.xml.transform.TransformerException:
java.lang.ArrayIndexOutOfBoundsException: -1
        at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1276)
        at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:
668)
        at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:
1129)
        at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:
1107)
        at
com.eim.util.msci.MSCIImporter.getFundsTracks(MSCIImporter.java:250)
        ... 1 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
        at org.apache.xml.utils.ObjectStack.pop(ObjectStack.java:137)
        at
org.apache.xalan.transformer.TransformerImpl.popElemTemplateElement(Transfor
merImpl.java:2521)
        at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transformer
Impl.java:2178)
        at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1213)
        ... 5 more

NB: I have try with naming my files c:\\temp\\....xml or c:/temp/....xml but
I got the same error.


It's strange because it's always this specific file that make the parser
crash (I tried to change the order of my files but it's always the same)

Can someone give me a hint?

best regards
Alban.


***********************************************************************************

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager to [EMAIL PROTECTED]

***********************************************************************************

Reply via email to