xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Fallback from document() error


Subject: Re: [xsl] Fallback from document() error
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 3 Jan 2001 14:17:26 GMT

  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.

Yes but if the spec was changed to make returning an empty node set
mandatory rather than just an option, then you could go

<xsl:if test="document('foo.xml')">
  <xsl:apply-templates select="document('foo.xml')//aaa"/>
</xsl:if>

(which would look nicer if xpath had an if expression)

>  1.1 I will not have problems with restrictions
>  result tree fragment use, so I can reuse the part from case 2)

You could do that anyway, even under xslt 1.0, if you go
<xsl:variable name="x select="document('foo.xml')"/>
then $ is a node set not an rtf.

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



Current Thread
Keywords
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2010 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor