xsl-list
[Top] [All Lists]

Re: [xsl] deep copy without attributes

2013-05-21 03:09:08
I've not been paying attention to 3.0 but I'd be looking at copy-of
and thinking it is ripe for accepting an anonymous function/template
that is applied as it traverses it's hierarchy. which would be another
way of addressing the issue.

...but that's already inbuilt into the language - template matching.
That's 'the xslt way' of solving this problem.

A deep copy (xsl:copy-of) copies the entire subtree unmodified, so
that would be the wrong approach if you want the output tree to be
different to the input tree... but I agree that the identity template
and shallow copying etc takes a bit of understanding.  But when the
penny does drop, the genius of it all becomes clear.



-- 
Andrew Welch
http://andrewjwelch.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--