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

Re: non-existing file in document() function

Subject: Re: non-existing file in document() function
From: Gary Lawrence Murphy <garym@xxxxxxxxxx>
Date: 14 Apr 2002 21:15:04 -0400
xmlns fs
>>>>> "K" == Kunal H Parikh <kunal@xxxxxxxxxx> 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@xxxxxxxxxxx> 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


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-2011 All Rights Reserved.