[Home] [By Thread] [By Date] [Recent Entries]
On 28/09/2011 11:34, Andrew Welch wrote:
On 28 September 2011 11:25, David Carlisle<davidc@xxxxxxxxx> wrote:On 28/09/2011 11:18, Andrew Welch wrote: our usual situation is we're running the same stylesheet over a couple of thousand input documents. With the way we are currently pipelining these transformations, if you have a function that expects a single element and you go xsl:param name="x" as="element()" then if one of the input documents is bad the error percolates up to the top level and not only that document fails to produce but the entire run is aborted. if on the other hand you don't use as="element()" but instead you accept anything but have <xsl:if test="exists($x[2]) or not($x/self::*)"> <xsl:message select='excuse me, I think parameter x might be wrong'"/> </xsl:if> then the run proceeds to the end but problems get logged more gracefully. It may be that by using a different pipelining strategy each document could be isolated but I think (until there is a try/catch facility within xslt) errors reported by as= attributes will be fatal errors and so stop at the very least that document. David ________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom. This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. ________________________________________________________________________
|

Cart



