This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: non-existing file in document() function


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]