W3C home > Mailing lists > Public > public-qt-comments@w3.org > June 2015

[Bug 28774] [XSLT30] Suggestion: allow shallow skip to match on non element nodes

From: <bugzilla@jessica.w3.org>
Date: Fri, 12 Jun 2015 08:48:19 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-28774-523-XODjoTwpk8@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28774

Michael Kay <mike@saxonica.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Michael Kay <mike@saxonica.com> ---
Response on behalf of the Working Group:

The working group felt that there was no problem with the way that shallow-skip
handles text (and comment/PI) nodes: the built-in template for element nodes
applies-templates to its children, and the built-in template for text nodes
does nothing; so if you want to process all the text nodes, you can simply
define a rule to process those text nodes.

However the WG accepted that there is a usability problem with attribute nodes,
and resolved to fix this by changing the built in template rule for document
and element nodes to do the following:

<xsl:template match="." mode="M">
    <xsl:apply-templates select="@*" mode="M"/>
    <xsl:apply-templates select="node()" mode="M"/>
</xsl:template>

which is aligned with the behaviour of shallow-copy.

The effect is that if you want to process attribute nodes, you simply add
template rules that match the attribute nodes to be processed. In the absence
of such rules, the behaviour is unchanged, since the default rule for attribute
nodes is to do nothing.

Many thanks for raising the issue. We would be grateful if you would indicate
your acceptance of the response by marking it closed, but if you want to
re-open the issue with new information you are welcome to do so.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Friday, 12 June 2015 08:48:25 UTC

This archive was generated by hypermail 2.3.1 : Friday, 12 June 2015 08:48:25 UTC