V
V
Vladimir2017-11-07 18:35:23
XSL & XSLT
Vladimir, 2017-11-07 18:35:23

How to check if a file exists using XSL?

Good afternoon, is it possible to check if a file exists in a directory using XSL?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rorc, 2017-11-07
@rorc

XSL can include files via include, but cannot do it conditionally, the file must exist otherwise there will be an error. Catching an exception is possible only at the handler level, so this method is not directly suitable, because. writing an event interceptor or modifying the parser code is not always possible.
But in XSL there are <xsl:if>ones <xsl:choose>that allow you to select data if a value is available.
The check can be moved to the level of a program or an external script that checks for the presence of files and writes information about the availability of files to the included xls template file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question