|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Using document() to check the existance of a file
Hi,
I'd like to check the existance of an file with the document function.
Depending oon this test I want to generate a link:
<xsl:choose>
<xsl:when test="document('help.xml')">
<a>
<xsl:attribute name="href">help.xml</xsl:attribute>[help]
</a>
</xsl:when>
<xsl:otherwise>
<a>
<xsl:attribute name="href">helpfiles/help.xml</xsl:attribute>[help]
</a>
</xsl:otherwise>
</xsl:choose>
The above snippet from my xsl file won't work (and I tried several othe
ways also) but it should illustate what I want to achieve. If a file
help.xml exists in the same directory as the xml file it should generate
a link to this 'help.xml' otherwise it should generate a link to the
main help file at helpfiles/help.xml.
Any ideas how to use the document function for that task? Or is there
another and better way to generate the links?
Regards,
mac
--
Mac Schwarz / AERIA Projekt / Inst. f. Klassische Archaeologie
e-mail: mac@xxxxxxxxxxxxxxxxxxxxxxxxxx / Tel.: 09131-85-24791
FAU Erlangen-Nuernberg / Kochstr.4 / 91054 Erlangen
<http://www.phil.uni-erlangen.de/~p1altar/aeriahome.html>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








