[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
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 Ok. 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. -- Regards, Mukul Gandhi
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|