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

Re: deep copy without attributes

Subject: Re: deep copy without attributes
From: Ihe Onwuka <ihe.onwuka@xxxxxxxxx>
Date: Tue, 21 May 2013 01:35:54 +0100
Re:  deep copy without attributes
On Tue, May 21, 2013 at 12:02 AM, Graydon <graydon@xxxxxxxxx> wrote:
> On Mon, May 20, 2013 at 10:34:31PM +0100, Ihe Onwuka scripsit:
>> On Mon, May 20, 2013 at 8:48 PM, Graydon <graydon@xxxxxxxxx> wrote:
>> > You can't make the solution simpler than the problem.
>>
>> But you can make the solution more complicated than the problem.
>>
>> Say I wanted to copy a directory structure but not carry over the
>> symbolic links.
>>
>>  I'd expect to be able to accomplish that  by setting an option on my
>> copy command rather than having to implement a recursive shell script.
>
> Symbolic links, in XML terms, would be elements from some other tree
> inserted by reference.  XML doesn't do that, and if it did do that,
> there'd be a case for some kind of "is it really there, or referenced?"
> distinction.  (Attributes, by file system analogy, would be things like
> mtime and ctime.)
>

 it's not hard to find another example (try hidden files) - should I
be forced to write a recursive shell  depending on whether I want to
exclude or include them in the copy?

>
> <xsl:template match="node()">
>     <xsl:copy>
>         <xsl:apply-templates select="node()"/>
>     </xsl:copy>
> </xsl:template>
>
> does that; it's not recursive, it's a single template.  It'll get
> applied to all the nodes, but that's the magic of the XSLT declarative
f>

if it were only about  whether cognoscenti can think up an elegant
solution - we'd still all be doing Muenchian Grouping.

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.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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