Consistency of Formatting Property Names, Values, and Semantics

TAG Finding 25 Jul 2002

This version:
http://www.w3.org/2001/tag/doc/formatting-properties (HTML, XML)
Previous versions:
http://www.w3.org/2001/tag/doc/formatting-properties-2002-07-15 http://www.w3.org/2001/tag/doc/formatting-properties-2002-06-17
Norman Walsh, Sun Microsystems, Inc. <Norman.Walsh@Sun.COM>


The use of named formatting properties to influence the presentation of documents on the web has become widespread. As XML vocabularies are now being combined in many ways, it is imperative that a common set of property names, values, and semantics be maintained.

This finding establish an architectural principle to that effect.

Status of this Document

This document has been developed for discussion by the W3C Technical Architecture Group. This finding addresses issue formattingProperties-19.

This finding was accepted by the TAG at its 22 July 2002 teleconference. The TAG originally reached consensus on this finding at its 15 July 2002 teleconference.

Additional TAG findings, both approved and in draft state, may also be available. The TAG expects to incorporate this and other findings into a Web Architecture Document that will be published according to the process of the W3C Recommendation Track.

Please send comments on this finding to the publicly archived TAG mailing list www-tag@w3.org (archive).

Table of Contents

1 Formatting Properties on the Web
2 A History of Successful Coordination
3 An Architectural Principle
4 References

1 Formatting Properties on the Web

The use of named formatting properties to influence the presentation of documents on the web has grown from its introduction in [CSS1] to include a wide range of specifications: [CSS2], [SVG], [SMIL], [MathML], [XSL], and possibly others.

This has a positive benefit for the user- and developer-communities because it reduces the number of property languages that need to be understood by users and applications. Furthermore, as XML vocabularies are now being combined in many ways, it is becoming more than merely beneficial, it is becoming imperative that a common set of properties and values be developed.

Consider an application that is expected to render a compound document that consists of XSL Formatting Objects, XHTML table markup, SVG diagrams, and MathML equations. Typically, the author (and the reader) would want consistent styling for all these pieces.

Because many properties are considered "inheritable", each of the vocabularies must use the same properties for the same purpose in order for the styling to be consistent. In addition to using the same properties, the interpretation of those properties must be the same in each vocabulary.

Consider a simple concrete example, where only two vocabularies are nested:

<html:div xmlns:html="http://www.w3.org/1999/xhtml"
          style="font-family: serif; font-size: 18pt">
   <html:p>Some XHTML text</html:p>
   <svg:svg xmlns:svg="http://www.w3.org/2000/svg">
      <svg:g transform="scale(0.5)">
        <svg:text>Some SVG text</svg:text>

In the absence of any other direction (from an external stylesheet, for example), one imagines that selection of a font family and size on the XHTML div element applies to both the the XHTML text and the SVG text.

It would be architecturally unsound to suggest that different vocabularies should specify the same or very similar traits using different property names or values. In this particular case, for example, it would be unsound to suggest that the "font-family" property be used to influence XHTML text but the "fontFamily" property be used to exert the same influence over SVG.

2 A History of Successful Coordination

The CSS, HTML, SVG, and XSL Working Groups have a shared history of successful coordination on formatting properties and values. It is possible that specific actions could be taken to assure continued coordation: establishing key liasons, formation of a coordination group, or even broad reorganization of the specifications.

However, these actions are outside the scope of this finding which aims simply to specify an architectural principle.

3 An Architectural Principle

Formatting property names, values, and semantics must be consistent across all specifications. Whenever a working group suggests the creation of a new formatting property, or the addition of, or a change to, an existing formatting property's allowed values, the working group must show a strong justification for not using an existing formatting property or properties that are related to the proposed new property or value.

Clearly innovation on the web will create situations where new properties are required and existing properties will need to be extended. What we must avoid doing is changing the semantics of existing properties in ways that introduce unnecessary interoperability issues.

4 References

Hakon Wium Lie, Bert Bos, editors. Cascading Style Sheets, level 1. World Wide Web Consortium, 1996. (See http://www.w3.org/TR/REC-CSS1.)
Bert Bos, Hakon Wium Lie, Chris Lilley, Ian Jacobs, editors. Cascading Style Sheets, level 2. World Wide Web Consortium, 1998. (See http://www.w3.org/TR/REC-CSS2.)
David Carlisle, Patrick Ion, Robert Miner, Nico Poppelier, editors. Mathematical Markup Language (MathML) Version 2.0. World Wide Web Consortium, 1991. (See http://www.w3.org/TR/MathML2/.)
Jeff Ayars, Dick Bulterman, Aaron Cohen, et. al., editors. Synchronized Multimedia Integration Language (SMIL 2.0). World Wide Web Consortium, 2001. (See http://www.w3.org/TR/smil20/.)
Jon Ferraiolo, editor. Scalable Vector Graphics (SVG) 1.0 Specification. World Wide Web Consortium, 2001. (See http://www.w3.org/TR/SVG/.)
Sharon Adler, Anders Berglund, Jeff Caruso, et. al., editors. Extensible Stylesheet Language (XSL) Version 1.0 World Wide Web Consortium, 2001. (See http://www.w3.org/TR/xsl/.)