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

Re: Fallback from document() error

Subject: Re: Fallback from document() error
From: Miloslav Nic <nicmila@xxxxxxxxx>
Date: Wed, 03 Jan 2001 14:56:38 +0100
document is empty xml error
It is not.

I can have:

document('foo.xml')//aaa

with foo.xml:

<bbb/>

this bit will return empty node-set but I cannot 
find out that the document exists.

so 
1) I must have according to the current spec:
 a processor which returns empty set not an error if encounters
non-existing file (e.g. Saxon stops processing when the file does not
exist and it is right to do it according to the spec)

2) then I must test: document('foo.xml') and if this does not return
empty-nodeset then

3) I may use document('foo.xml')//aaa

In 1.1 I will not have problems with restrictions
on result tree fragment use, so I can reuse the part from case 2)
and it will not be necessary to repeat the document() part
but still I would love to have a possibility to distinguish
empty node-set because of non-existing file from empty node-set from
non-existing element in one step


David Carlisle wrote:
> 
> While a general exception handling mechanism would be interesting, is it
> clear why this particular case is an error at all what would be lost in
> mandating that document() returns an empty node set if it can't retrieve
> an XML file. This could be tested using standard boolean tests without
> need of error handler at all. Since this behaviour is already allowed by
> the spec it wouldn't be much of a change.
> 
> David
> 
> _____________________________________________________________________
> This message has been checked for all known viruses by Star Internet delivered
> through the MessageLabs Virus Control Centre. For further information visit
> http://www.star.net.uk/stats.asp
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

-- 
******************************************
<firstName> Miloslav </firstName>    
<surname>   Nic      </surname>     

<mail>    nicmila@xxxxxxxxx    </mail>   
<support> http://www.zvon.org  </support>
<zvonMailingList> 
    http://www.zvon.org/index.php?nav_id=4 
</zvonMailingList>

 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.