Hi,
I am using Saxon-B 9.0.0.6J
I have a situation where there may or may not be a file I need to bring into a transformation.
I am using:
Code:
<xsl:variable name="featGrpMap" select="doc($FeatGrpMap)"/>
Where $FeatGrpMap is a relative path to the file that might be present.
If the file is there, of course, all is well.
If the file is missing, I get a java.io.FileNotFoundException (The system cannot find the file specified).
What I hoped for is that the doc() would simply set my variable, $featGrpMap, to an empty structure that I could detect later when I went to use the information and simply skip that processing.
Is there something I can do to detect early on the file is not present and skip the doc() function? Or is there some better way to handle this behaviour?
Thanks,