W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2009

[Bug 6535] New: [SER 1.1]: Add new serialization option suppress-indentation

From: <bugzilla@wiggum.w3.org>
Date: Fri, 06 Feb 2009 09:58:56 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-6535-523@http.www.w3.org/Bugs/Public/>


           Summary: [SER 1.1]: Add new serialization option suppress-
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Serialization 1.1
        AssignedTo: zongaro@ca.ibm.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org

There is a class of XML documents - our errata documents are a good example -
that contain "data" at the upper levels of the content hierarchy, and narrative
text further down the hierarchy. Atom feeds are another example: the top-level
structure contains metadata, and inside this there is a "content" element that
holds XHTML.

The nicest way to serialize such documents - exemplified by the way the Atom
spec shows its examples - is to use indentation for the "data" part, and to
suppress indentation for the "narrative" part.

If the result document is schema-validated, specifying indent="yes" will tend
to achieve this, because we specify that indentation should not apply within
elements that have mixed content. But usually there is no schema, and it would
be useful to be able to achieve the same effect in that case also.

I propose a new serialization property suppress-indentation whose value is a
list of QNames. If this property is specified in conjunction with indent="yes",
then its effect is to modify the rules for indentation by specifying that no
whitespace is to be added to the output within the content (at any depth) of an
element whose name appears in the list of QNames. If indent="no" is specified
then the attribute is ignored, except that it must still be a syntactally valid
list of QNames. The default value is an empty list.

The property behaves like cdata-section-elements in its surface syntax in XSLT
and XQuery, and in XSLT its override behavior follows cdata-section-elements in
that overriding definitions are additive.

The property should also be useful in purely narrative documents like those
using the xmlspec DTD; suppress-indentation="p" to suppress indentation below
the paragraph level would be a significant improvement on the results currently

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.
Received on Friday, 6 February 2009 09:59:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:26 UTC