Skip to content

Instantly share code, notes, and snippets.

@nine9ths
Last active December 21, 2015 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nine9ths/6246108 to your computer and use it in GitHub Desktop.
Save nine9ths/6246108 to your computer and use it in GitHub Desktop.
In Oxygen 16.0, build 2014070913, on OS X 10.9.5, the bundled Saxon 9.5.1.5 is bugged with fn:doc-available(). If the target is an empty file, it returns a parsing error rather than false. The stylsheet below returns the error "Premature end of file."
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:template name="main">
<xsl:sequence select="doc-available('empty.xml')"/>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment