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

Re: [xsl] Re: Getting info of runtime failure in saxon environment

Subject: Re: [xsl] Re: Getting info of runtime failure in saxon environment
From: Liam R E Quin <liam@xxxxxx>
Date: Wed, 27 Feb 2013 17:06:21 -0500

On Wed, 2013-02-27 at 17:25 +0800, Karlmarx R wrote:
> Thanks Wendell. To answer your quesions, para wise:
> (A) They will use browser for basic well-formedness and this is not an
> issue. But the requirement is to identify where the problem lies
> within xml.
> (B) Yes, this is the issue, to get better feedback. They get the input
> XML from oracle. Some internal oracle function does the data
> extraction and forms the XML. A unix based cron job does this
> overnight (i don't have much info but can get if needed). After that
> that input (which may not be WELL-FORMED) is supposed to go thru
> transformation in xsl-saxon (on unix) and here the failure won't five
> that much clue. 
> What I do know is that at times the data comes with some "chars" that
> makes the XML not well formed. I have asked them whether they can do
> some basic cleaning(?) during the data extraction within oracle
> function.

If Oracle is running on Solaris or Linux, the "xmllint" program may be
installed already -
xmllint --noout foo.xml
will report any errors, including an approximate line number, or will
exit with zero (OK) status if there are no errors.

The errors can be saved to a file as usual, e.g.
xmllint --noout foo.xml > logfile 2>&1

It's often a good idea to build a step like this into an XML processing
workflow before running XSLT: make sure the input is OK before working
on it.


Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml

Current Thread