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

Re: are there non streaming use cases of fn:snapshot

Subject: Re: are there non streaming use cases of fn:snapshot function
From: "Mukul Gandhi gandhi.mukul@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 15 Mar 2019 07:41:38 -0000
Re:  are there non streaming use cases of fn:snapshot
Thanks, Martin for insightful comments.

On Fri, Mar 15, 2019 at 12:00 PM Martin Honnen martin.honnen@xxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> Well, whether you have streaming or not supported, snapshot makes
> splitting up files where you want to preserve the tree structure easy


It does seem that, among other things fn:snapshot preserves nodes along the
ancestor axis, but it doesn't preserve nodes along preceding-sibling axis.
I think, that makes fn:snapshot more useful.

> e.g.
> <xsl:for-each select="//foo!snapshot()">
>    <xsl:result-document href="foo{position()}.xml">
>       <xsl:copy-of select="/"/>
>    </xsl:result-document>
> </xsl:for-each>
> Without snapshot in XSLT 2 you would need to write templates to
> reconstruct the ancestor tree of the foo elements.

Thanks for example above. Its useful.

Mukul Gandhi

Current Thread


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.
First Name
Last Name
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.