This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: non-existing file in document() function
- From: Gary Lawrence Murphy <garym at canada dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: 14 Apr 2002 21:15:04 -0400
- Subject: Re: [xsl] non-existing file in document() function
- Organization: TCI Business Innovation through Open Source Computing
- References: <000001c1e413$00c003e0$d15032d2@kaypee>
- Reply-to: xsl-list at lists dot mulberrytech dot com
>>>>> "K" == Kunal H Parikh <kunal@kaypee.net> writes:
K> Hi ! I am trying to use the document function in my XSLT
You just missed this discussion by a few days ;) ... the behaviour
of document() on missing docs is undefined, so it varies from
vendor to vendor.
If Java is an option, one reliable solution is to use the extension
mechanism to define a namespace for the java.io.File class:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fs="java.io.File" >
and then use
<xsl:when test="fs:canRead(fs:new($filename))">
--
Gary Lawrence Murphy <garym@teledyn.com> TeleDynamics Communications Inc
Business Innovations Through Open Source Systems: http://www.teledyn.com
"Computers are useless. They can only give you answers."(Pablo Picasso)
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list