Subject: Re: [xsl] Fallback from document() error From: Miloslav Nic <nicmila@xxxxxxxxx> Date: Wed, 03 Jan 2001 16:07:30 +0100 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Fallback from document() , David Carlisle | Thread | [xsl] XLinking question, Srinivas, Santoshkum |
Re: [xsl] XLinking question, Jiri Jirat | Date | RE: Re: [xsl] for-each loops: arit, Mazza, Glen |
Month |