- From: <bugzilla@jessica.w3.org>
- Date: Wed, 22 Apr 2015 16:41:38 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28537 Bug ID: 28537 Summary: [FO30] [FO31] Examples on fn:element-with-id uses fn:id and is not aligned with accompanying text Product: XPath / XQuery / XSLT Version: Recommendation Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P2 Component: Functions and Operators 3.0 Assignee: mike@saxonica.com Reporter: abel.braaksma@xs4all.nl QA Contact: public-qt-comments@w3.org Under Examples, under 14.7.2 fn:element-with-id (FO30) and 14.5.2 fn:element-with-id (FO31) the text presently reads (numbering mine): 1) The expression id('ID21256')/name() returns "employee". (The xml:id attribute has the is-id property, so the employee element is selected.). 2) The expression id('E21256')/name() returns "employee". (Assuming the empnr element is given the type xs:ID as a result of schema validation, the element will have the is-id property and is therefore its parent is selected. Note the difference from the behavior of fn:id.). Text of (1) is technically correct, but the section is about fn:element-with-id, not about fn:id. Replacing id('ID21256')/name() with element-with-id('ID21256')/name() seems to make more sense. Text of (2) is technically wrong, as id(...) returns the element with is-id property, not its parent. Replacing id(...) with element-with-id(...) fixes this. And a suggestion: I noticed that fn:idref does not have any example. Not a big deal, but the indirection of this function, and the same question as with fn:id vs fn:element-with-id (i.e., does it select its parent or the attribute/element with is-idref property) seems to warrant one ;). PS: I filed this bug under FO30, but it applies equally to FO31 as well. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Wednesday, 22 April 2015 16:41:40 UTC