- From: <bugzilla@wiggum.w3.org>
- Date: Wed, 01 Mar 2006 03:24:53 +0000
- To: public-qt-comments@w3.org
- Cc:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2952 Summary: Clarify grouping of decimal-format declarations Product: XPath / XQuery / XSLT Version: Candidate Recommendation Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: XSLT 2.0 AssignedTo: mike@saxonica.com ReportedBy: david_marston@us.ibm.com QAContact: public-qt-comments@w3.org Part 16.4.1 refers to the ability to "group" multiple xsl:decimal-format declarations sharing a name, and to group all the un-named ones. Subsequent paragraphs say: For any named decimal format, the effective value of each attribute is taken from an xsl:decimal-format declaration that has that name, and that specifies an explicit value for the required attribute. If there is no such declaration, the default value of the attribute is used. If there is more than one such declaration, the one with highest import precedence is used. (Similarly for the un-named format) I think the above states that explicit values for different attributes can be merged when doing the grouping of several declarations, and that explicit settings win over defaults. But then cosider this: [ERR XTSE1290] It is a static error if a named or unnamed decimal format contains two conflicting values for the same attribute in different xsl:decimal-format declarations having the same import precedence.... and this: [ERR XTSE1300] It is a static error if, for any named or unnamed decimal format, the variables representing characters used in a picture string do not each have distinct values. This raises a slight doubt, and I think the spec should be completely prescriptive about when the default values are put in effect. For example, if you have only the declaration <xsl:decimal-format name="A" decimal-separator="," /> then error 1300 can be raised because the explicit decimal-separator conflicts with the default grouping-separator. But if the same stylesheet module has the above and also <xsl:decimal-format name="A" grouping-separator="_" /> then the two declarations together have no conflict, and the explicit settings will win, as they should. Without further clarification, an implementer could decide that each declaration must be complete and consistent in itself, and raise 1300 on a per-decl basis, which makes it hard to use the grouping feature. A stylesheet that worked on a processor where the grouping occurs before the consistency check would fail on a processor that checks consistency before grouping. I think grouping first is the best approach. If the stylesheet writer wants to combine multiple declarations under the other scenario, they would have to add spurious attribute settings to each one just to make it consistent, and adding those settings may thwart their effort to get the combination they want. If you choose consistency checking before grouping, then the paragraphs I cited first (explicit wins over default) must be modified to note that explicit settings must be consistent within each declaration and in the grouped form.
Received on Wednesday, 1 March 2006 03:25:03 UTC