[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

check with XSL if a file is available

Subject: check with XSL if a file is available
From: "Joel Fisler" <fisler@xxxxxxxxxxxx>
Date: 7 Jul 2003 16:09:21 +0200
joel fisler
hi,
i want to implement a choose statment that defines what to do if a document is available and what to do if this document is not available. to check whether a file is available or not i use the following structure:


<xsl:choose>
<xsl:when test="document(path/filename.xml)">
do this with the file
</when>
<otherwise>
do something else without the file
</otherwise>
</choose>

now if "filename.xml" is available, everything works just fine. but if not, the otherwise-statment is not running at all, instead cocoon just responds with an error "file not found":
javax.xml.transform.TransformerException: Errors in XSLT transformation:
Fatal: File file:/home/gis/fisler/sharqi/tomcat/webapps/GITTA/student/presentation/html/gittaNavLesson.xsl; Line 18; Column 94; /home/gis/fisler/sharqi/tomcat/webapps/GITTA/student/content/institut/giuz.xml (No such file or directory)



of course this file doesnt exist, thats why i have the "otherwise" statement :-) how can i make this work? i have been trying to fix this for two days with many different trials and errors, but none worked. if anyone has a suggestion? thanks.


i am using cocoon 2.0.4.

bye
joel


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.