[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Getting info of runtime failure in saxon environment

Subject: [xsl] Getting info of runtime failure in saxon environment
From: Karlmarx R <karlmarxr@xxxxxxxxx>
Date: Thu, 21 Feb 2013 17:25:44 +0800 (SGT)

Hello List,

I running my xsl-xml conversion using Saxon processor in java,
called from command line using a batch file that contains "java -jar
saxon9.jar ...". The source XML comes with some invalid byte char that results
in error.

Error at xsl:for-each on line 61 of xxx.xsl:
Invalid byte 1
of 1-byte UTF-8 sequence.
Transformation failed: Run-time
errors were reported

The above error showing xsl line number is of not much
use, but for information purpose, the for-each statement trries to process
files of a collection. Exampple code:
   <xsl:variable name="inputFiles"
<xsl:for-each select="$inputFiles">

What I need is some information giving
clue which line of XML data results in this error, like say "in xml...line
number n char x fails.." sort of message that will make it easy to identify
xml error without the need of using specialised  tools. Is this possible? I am
still reading the documents in saxonica and read "An error reported by the XML
parser is generally fatal. It is not possible to process ill-formed XML."
statement but any possible solution would be of great help. FYI, I did
identified and corrected the source xml using specialised  xml tools, but
going forward we need to use command line option which could be used by
someone with basic xml knowledge.

Thanks in adv,

Current Thread