[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 16:07:30 +0100
Re:  Fallback from document() error
David Carlisle wrote:
> 
> > One problem is where document() is used to retrieve a set of documents, e.g.
> > document(//a/@href). What happens if some of them exist and some don't?
> 
> er, pass;-)
> 
> But what would happen in Miloslav's xsl:fallback version in that case as
> well?
> 
document(//a/@href)

<xsl:fallback>
       <xsl:copy-of select='/..'/> 
</xsl:fallback>

or some non-empty node-set which would be added instead of non-existent
file. 


Another simple usercase if non-existent file always returns an error
and if there is at least one right filename in the source document:

<xsl:template name="open">
  <xsl:param name="x"/> 
  <xsl:param name="y"/>
	
 <xsl:apply-templates select="document($x)//aaa">
     <xsl:fallback>
           <xsl:call-template name="open">
                 <xsl:with-param name="x" select="//files[$y]"/>
                 <xsl:with-param name="y" select="$y + 1"/>
            </xsl:call-template>
     </xsl:fallback>
  </xsl:apply-templates>
</xsl:template>
-- 
******************************************
<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.