|
Subject: Re: [xsl] Fallback from document() error From: Miloslav Nic <nicmila@xxxxxxxxx> Date: Wed, 03 Jan 2001 14:56:38 +0100 |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Fallback from document() , David Carlisle | Thread | Re: [xsl] Fallback from document() , David Carlisle |
| Re: [xsl] xslT - Tutorial, Elliotte Rusty Harol | Date | RE: [xsl] Fallback from document() , Kay Michael |
| Month |