[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How could I detect/prevent a file not found except
On 05.02.2019 14:21, Trevor Nicholls trevor@xxxxxxxxxxxxxxxxxx wrote:
A set of templates which are used to fill in the clickable text of a cross-reference are occasionally failing for me with a "file not found" exception. The processor we are using for this is Saxon but I'm hoping that there may be a way to code round the problem that is not processor-specific, so I am posting the relevant part of it here rather than on the Saxon list. In general Saxon 9 supports the function doc-available, like any other processor supporting XSLT/XPath 2 and later so using e.g. <!-- can't find the file/id, so need a bit of magic: use the cache document from the previous build --> <xsl:if test="doc-available($cachefile)"> <xsl:for-each select="document($cachefile,/)"> might help. With Saxon 9.8 or 9.9 and XSLT 3 you would also be able to use `xsl:try/catch"
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|