|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
[Bug 6808] New: Whitespacing rules are too restrictive for the indent parameterhttp://www.w3.org/Bugs/Public/show_bug.cgi?id=6808
Summary: Whitespacing rules are too restrictive for the indent parameter Product: XPath / XQuery / XSLT Version: Recommendation Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Serialization AssignedTo: zongaro@... ReportedBy: guerneca2003@... QAContact: public-qt-comments@... The serialization spec says in 5.1.3: "Whitespace characters MUST NOT be added other than adjacent to an element node, that is, immediately before a start tag or immediately after an end tag." This seems a bit too restrictive. I think the intent of these rules is to not end up adding any significant whitespace. Imagine a complex type with element only content type and several comments and processing instructions. This rule forbids whitespace to be added to separate the comments/PIs, even though the whitespace would be insignificant. Therefore, I'd suggest relaxing this rule a little bit. -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. |
|
|
[Bug 6808] [Ser] Whitespacing rules are too restrictive for the indent parameterhttp://www.w3.org/Bugs/Public/show_bug.cgi?id=6808
Henry Zongaro <zongaro@...> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Whitespacing rules are too |[Ser] Whitespacing rules are |restrictive for the indent |too restrictive for the |parameter |indent parameter --- Comment #1 from Henry Zongaro <zongaro@...> 2009-08-20 16:07:55 --- Andy, thank you for your comment. I can think of a slightly thorny case that would make it somewhat difficult to word the extension to this feature in the way you've suggested. Consider the following example: <elem>some text<!-- a comment --><!-- a pithy remark --></elem> The first note in section 5.1.3[1] states, in part, "The effect of these rules is to ensure that whitespace is only added in places where... it does not affect the string value of any element node with simple content." So it wouldn't be sufficient to state that whitespace characters could be added before or after comments and processing instructions, as inserting some between the comments in the example above above would change the string value of elem, which might have simple content. Though it would be nice to permit a serializer some additional latitude, my recommendation would be not to fix this in an erratum, and defer consideration of any change until Serialization 1.1. This isn't a serious limitation as it stands. [1] http://www.w3.org/TR/2007/REC-xslt-xquery-serialization-20070123/#xml-indent -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. |
|
|
[Bug 6808] [Ser] Whitespacing rules are too restrictive for the indent parameterhttp://www.w3.org/Bugs/Public/show_bug.cgi?id=6808
--- Comment #2 from Andy Agrawal <guerneca2003@...> 2009-08-20 20:46:45 --- Henry, thanks for the response. I was actually referring to a schema valid element where the schema dictates element only content. In that scenario the added whitespace is not significant. The example you provided isn't exactly an instance of the situation I was referring to as it contains text nodes. I agree that adding significant whitespace is undesirable. It would be nice to have this as an erratum as it's not a big change from the original specification. -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. |
|
|
[Bug 6808] [Ser] Whitespacing rules are too restrictive for the indent parameterhttp://www.w3.org/Bugs/Public/show_bug.cgi?id=6808
--- Comment #3 from Henry Zongaro <zongaro@...> 2009-08-21 14:04:18 --- Hi, Andy. Thanks for the clarification. When I read your initial comments, I thought you were suggesting that whitespace should be permitted more generally than just in the complex type with element-only content example - that that was just one example of why the rules should be relaxed in general. So the changes might be simpler than I thought. I think the following change would suffice. Replace the second bullet in the list in section 5.1.3 with the following two bullets: "o Whitespace characters MUST NOT be added other than adjacent to an element node, comment node or processing instruction node -- that is, immediately before a start tag, an empty element tag, a comment or a processing instruction, or immediately after an end tag, an empty element tag, a comment or a processing instruction. o Whitespace characters MUST NOT be added other than adjacent to an element node in the content of an element whose content model is not known to be element only." The first new bullet would allow spaces to be added before and after comments and PIs, including those that appear outside of any element, which is not generally permitted today. The second new bullet would prevent them from being added in those places to elements with mixed or simple content (including those with type annotation of xs:anyType or xs:untyped). However, my recommendation remains that this change should not be made in an erratum, but only in Serialization 1.1. It would not break existing implementations, but it doesn't seem to add sufficient benefit to make the change. These are my personal opinions of course - it remains for the XQuery and XSL working groups to decide. -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. |
|
|
[Bug 6808] [Ser] Whitespacing rules are too restrictive for the indent parameterhttp://www.w3.org/Bugs/Public/show_bug.cgi?id=6808
Michael Kay <mike@...> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mike@... --- Comment #4 from Michael Kay <mike@...> 2009-08-21 14:15:28 --- I think that second rule is ambiguous: Whitespace characters MUST NOT be added other than adjacent to an element node in the content of an element whose content model is not known to be element only." "in the content" means "added in the content", not "element node in the content". There are too many double/triple negatives. I think the rules are: If the content model of E is known, you can add whitespace as a child of E only if E is element-only, and you can then add it anywhere. If the content model of E is unknown, you can add whitespace as a child of E only immediately before a (contained) start tag or after a (contained) end tag. (And even that is best avoided if there is any possibility that E has mixed content). -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. |
|
|
[Bug 6808] [Ser] Whitespacing rules are too restrictive for the indent parameterhttp://www.w3.org/Bugs/Public/show_bug.cgi?id=6808
--- Comment #5 from Andy Agrawal <guerneca2003@...> 2009-08-21 21:52:41 --- Henry, I know of existing implementations that are already implementing the indentation rules this way i.e. in the less restrictive fashion. I think the intent of the specification was that indentation should not ever add significant whitespace and this particular rule is a bit of an overkill for that. Therefore, my suggestion is to treat it as an erratum. Existing implementations will indeed "break" in the sense that they will fail conformance test even though they are doing the right thing i.e. never adding significant whitespace. For these reasons, I'd suggest not waiting until 1.1. -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. |
|
|
[Bug 6808] [Ser] Whitespacing rules are too restrictive for the indent parameterhttp://www.w3.org/Bugs/Public/show_bug.cgi?id=6808
--- Comment #6 from Henry Zongaro <zongaro@...> 2009-08-25 17:31:49 --- At their joint teleconference of 2009-08-25, the XQuery and XSL working groups decided not to make any change to the 1.0 version of the Serialization Recommendation, and instead enhance the 1.1 version of Serialization to permit a serializer to add whitespace in the way suggested. As there were few members of the XSL WG present for the call, I will raise this issue separately in an XSL WG call to ensure there are no objections to this resolution. -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. |
|
|
[Bug 6808] [Ser] Whitespacing rules are too restrictive for the indent parameterhttp://www.w3.org/Bugs/Public/show_bug.cgi?id=6808
--- Comment #7 from Henry Zongaro <zongaro@...> 2009-11-12 19:39:54 --- At its teleconference of 2009-11-12,[2] the XSL WG ratified the decision [2] http://lists.w3.org/Archives/Member/w3c-xsl-wg/2009Nov/0028.html -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. |
|
|
[Bug 6808] [Ser] Whitespacing rules are too restrictive for the indent parameterhttp://www.w3.org/Bugs/Public/show_bug.cgi?id=6808
--- Comment #8 from Henry Zongaro <zongaro@...> 2009-11-12 19:43:09 --- At its teleconference of 2009-11-12,[2] the XSL WG ratified the decision described in comment #6. That is, no change will be made to the Serialization 1.0 Recommendation, and we will track this instead as an enhancement request for the Serialization 1.1 draft. Andy, may I ask you to confirm that this decision is acceptable to you? [2] http://lists.w3.org/Archives/Member/w3c-xsl-wg/2009Nov/0028.html -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. |
| Free embeddable forum powered by Nabble | Forum Help |