W3C home > Mailing lists > Public > public-qt-comments@w3.org > January 2008

[Bug 5334] [UPD] Inserting attributes

From: <bugzilla@wiggum.w3.org>
Date: Tue, 01 Jan 2008 22:15:06 +0000
To: public-qt-comments@w3.org
Message-Id: <E1J9pO6-0000Qm-Is@wiggum.w3.org>


           Summary: [UPD] Inserting attributes
           Product: XPath / XQuery / XSLFO / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Update Facility
        AssignedTo: andrew.eisenberg@us.ibm.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org

The rules on insertion of attributes seem highly arbitrary.

You are allowed to say

insert node @a after $x/*[12]

and it happily adds a copy of @a to $x, ignoring the requested position.

You can also say

insert nodes (@a, <e/>) after $x/*[12]

and it happily inserts @a as an attribute of $x, and adds <e/> as its 13th
child element.

But you can't say

insert nodes (<e/>, @a) after $x/*[12]

because the source expression isn't allowed to have an attribute appearing
after a non-attribute.

This seems very inconsistent. I would suggest either relaxing the rules by
eliminating error XUTY0004, or making the rules stricter by disallowing all use
of positional qualifiers (after, before, as first, as last) when the source
expression contains an attribute.
Received on Tuesday, 1 January 2008 22:15:12 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:35 UTC