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

Fallback from document() error

Subject: Fallback from document() error
From: Miloslav Nic <nicmila@xxxxxxxxx>
Date: Wed, 03 Jan 2001 12:08:50 +0100
xsl document error signal
Being quite often plagued by problems with 
document('foo.xml') function when foo() does not exist
I was wandering about means how to solve it.

XSLT1.1 draft still says:
 If there is an error retrieving the resource, then the XSLT processor
may signal an error; if it does not signal an error, it must recover by
returning an empty node-set. 

So you will either get an error from the processor or 
you will be unable to distinguish if the file is missing
or there is no required node in the retrieved document.

It looks to me that such problems would solve if
xsl:fallback is permited as a child of 
elements wite select attribute (e.g. apply-templates)


e.g.:

<xsl:apply-templates select="document('no-file.xml')">
	<xsl:fallback>
              The file does not exist
        </xsl:fallback>
</xsl:apply-templates>


I think that it would also circumvent problems with old processors when
there is a new vesions of XPath and the 
stylesheet would  otherwise parsed without problems not to be there a
"wrong" new XPath.


Is there some flaw in this argument?


-- 
******************************************
<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.