RE: [F&O] LQ-FO-002 - file exists

We came to the conclusion when we looked at file-exists() that it only
solved a quarter of the problem. There's no value in knowing that a file
exists if it turns out to be empty, or private, or not to contain XML, or
not to pass validation.

There is a real user problem here but it's not easy to find a good solution.
In practice, serious XSLT users write their own URIResolver and tackle the
issue there.

Michael Kay

# -----Original Message-----
# From: public-qt-comments-request@w3.org [mailto:public-qt-comments-
# request@w3.org] On Behalf Of Liam Quin
# Sent: 04 March 2004 18:07
# To: public-qt-comments@w3.org
# Subject: [F&O] LQ-FO-002 - file exists
# 
# 
# There's no easy way right now to check for the existance of a
# local file except by trying to parse (and possibly validate) it
# with document().
# 
# For example, consider using XML Query to generate an XHTML
# Web page with embedded images.  One might not want to
# include an image if the file isn't there, but there's no
# way to test for a non-XML file in F&O today.
# 
# I suggest adding
#     file-exists($fname as XS:string)
# 
# An alternative I shall propose in a separate comment is to
# provide more access to an implementation's underlying
# URI resolver library.
# 
# Liam
# 
# --
# Liam Quin, W3C XML Activity Lead, http://www.w3.org/People/Quin/
# http://www.holoweb.net/~liam/

Received on Thursday, 4 March 2004 18:02:54 UTC