[Bug 28565] [xslt30] The nilled, is-id, and is-idref properties

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28565

--- Comment #5 from Michael Kay <mike@saxonica.com> ---
My proposal is as follows.

1. Unparsed entities should be copied whenever a document node is copied using
xsl:copy-of, xsl:copy, copy-of(), or snapshot().

NOTE: document nodes are never copied in the course of "constructing complex
content".

RATIONALE: better to retain the information than to lose it. In xsl:merge, this
is the only way the application will have access to the unparsed entities,
since only copied information is available.

NOTE: previous versions left this question unanswered.

2. Whenever nodes are constructed with validation="strict" or validation="lax",
the is-id, is-idref, and nilled properties are as determined by the XDM rules
for "construction from a PSVI".

NOTE: this is the status quo, though the spec doesn't make it very clear, and
xsl:copy-of says something contradictory. We should add explicit mention of
this in 24.4 Validation, and remove the contrary statement from xsl:copy-of.

3. When element or attribute nodes are deep-copied using validation="preserve"
(explicitly or by virtue of default-validation), the values of is-id, is-idref,
and nilled remain unchanged. This includes xsl:copy-of with
validation="preserve" either explicitly or through default-validation, xsl:copy
on attribute nodes, fn:copy-of(), fn:snapshot() (for nodes "below the pivot).

NOTE: this is the status quo, and appears unproblematic. It needs to be
clarified in the text.

4. When element nodes are deep-copied using validation="strip" (explicitly or
by virtue of default-validation or strip-type-annotations), the value of
"nilled" is set to false.

NOTE: This is what we currently say in 24.1.1, though it conflicts with a
statement in xsl:copy-of. It is necessary in order to avoid violating an XDM
consistency constraint, which states that an element with type xs:untyped will
always have nilled=false.

NOTE: this rule also applies implicitly to elements copied using xsl:copy
validation="preserve".

5. When element or attribute nodes are deep-copied using validation="strip"
(explicitly or by virtue of default-validation or strip-type-annotations), the
values of is-id and is-idref are left unchanged.

NOTE: this rule might be questionable, but it is clearly stated in the 2.0
spec, and has value in the case where the is-id and is-idref properties were
DTD-derived.

6. When nodes are copied in the course of "constructing complex content"
(section 5.7.1 rule 10), the rules are effectively determined by section 24.4,
although this isn't clear because there is no cross-reference. In effect, the
validation applied to the newly constructed element (or document node) is also
applied recursively to it children, and this includes validation="strip" or
"preserve". We should add a note to this effect.

NOTE: there is a difference from XQuery, in that XQuery with construction mode
strip will drop is-id and is-idref properties except in the case of xml:id
attributes.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 1 May 2015 08:31:36 UTC