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
CC:
To: public-qt-comments@w3.org
Message-Id: <E1J9pO6-0000Qm-Is@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5334

           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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:49 GMT