W3C home > Mailing lists > Public > public-xformsusers@w3.org > March 2019

Re: The copy Element (for itemset)

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Thu, 21 Mar 2019 11:41:06 -0700
Message-ID: <CAAc0PEUMHB2Ox9emgpcvMpsaRrz3Pt36tKTWTwB4AxXprg64rg@mail.gmail.com>
To: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>
Cc: Steven Pemberton <Steven.Pemberton@cwi.nl>, XForms <public-xformsusers@w3.org>
> > We don't define what "deep copied" means; does it include attributes for
> instance?
> If the spec uses the term ‘deep copy’, then by all that is holy, please
> make sure the term is used in the same way as in the XPath, XQuery,
> XSLT and related specs.  In those specs, a deep copy does copy
> attributes.

+1 for consistency. This said, I don't see a reference to the term "deep
copy"  in any of:

- XPath 3.1 [1]
- XQuery 3.1 [2]

"XPath and XQuery Functions and Operators 3.1" [3] uses the term twice but
without defining it.

The closest I find is one of the default templates in XSLT 3.0 [4], which

    The effect of processing a tree using a mode that specifies
on-no-match="deep-copy" is that an unmatched element in the source tree is
copied unchanged to the output, together with its entire subtree.

I think that we do mean "deep copy" in the sense of "copied unchanged". Per
the spec, the target has to be an element node and it would not make sense
to NOT copy the attributes of that element.


[1] https://www.w3.org/TR/xpath-31/
[2] https://www.w3.org/TR/2017/REC-xquery-31-20170321/
[3] https://www.w3.org/TR/xpath-functions-31/
[4] https://www.w3.org/TR/xslt-30/#built-in-templates-deep-copy
Received on Thursday, 21 March 2019 18:41:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:37:51 UTC