On Wednesday, May 17, 2006, 9:05:09 PM, Jon wrote:
JN> Michael wrote:
>> Jon Noring wrote:
>>> However, here is what the XML 1.0 spec does say for production
>>> 44:
>>>
>>> [44] EmptyElemTag ::= '<' Name (S Attribute)* S? '/>'
>>>
>>> "Empty-element tags MAY be used for any element which has no content,
>>> whether or not it is declared using the keyword EMPTY. For
>>> interoperability, the empty-element tag SHOULD be used, and SHOULD
>>> only be used, for elements which are declared EMPTY."
>>>
>>> Reference: http://www.w3.org/TR/REC-xml/#NT-EmptyElemTag
>>>
>>>
>>> So, XML makes a pretty strong statement here ("SHOULD"), even if not
>>> required.
>> But note the definition of "for interoperability"
>> (http://www.w3.org/TR/REC-xml/#dt-interop):
>> "a non-binding recommendation included to increase the chances that
>> XML documents can be processed by the existing installed base of SGML
>> processors which predate the WebSGML Adaptations Annex to ISO 8879.]"
>> How important is it that old SGML processors be able to handle the
>> OpenReader format?
JN> Thanks. I should have checked to see how XML defined the phrase "for
JN> interoperability."
Given that such "old SGML processors" will not handle namespaces, either; and
will require an SGML declaration, and will require a DTD to be both present and
to completely describe all elements and attributes - and given that actual real
SGML processors are now updated to the new SGML version which is a superst of
XML1.0 - not very.
This was a big deal in 1997-1998. Its not anymore.
JN> I'm close to relenting on this, given the excellent feedback by
JN> several here (csssite, Chris and Michael.) However, one last gasp
JN> before I throw in the towel on this one:
JN> The issue is states as:
JN> Should we REQUIRE that: *publication authors* use the empty element
JN> syntax (e.g., <img/>) for all elements in both Binder and content
JN> documents that are declared EMPTY in the associated DTDs. And, when an
JN> element, which is not declared EMPTY, has no content, that it must not
JN> follow the empty element syntax (i.e., it must be <p></p>.) ???
So, precluding for example the XML being generated on the fly by XSLT, produced
by a servlet, or created on the fly from a database by XML Query, or ....
JN> Importantly note that this requirement says nothing about XML
JN> processing -- only that publication authors are required to be good.
There are not always humans involved in the output stage.
JN> So it will have no impact on user agents, but it may have an impact
JN> on "publication conformance checkers" (which I do not consider to be
JN> user agents
(agreed, in passing)
JN> -- a discussion for a different thread.)
JN> The advantages I see are admittedly sparse (others are welcome to add
JN> to this list):
JN> 1) It forces consistency in element usage.
JN> 2) It meets the "interoperability" standard of XML, even if dated as
JN> Michael notes.
No, what XML said was not to use, for example, <p/> for a paragraph with no
text.
JN> The downside is that it is one more restriction on authoring markup
JN> practice, albeit a very minor one.
JN> It also is an added item for "publication conformance checkers" to
JN> have to check.
JN> So, given the above, is there anyone who stands on the side of
JN> requirement? If not, I will relent and rewrite section 3.3.5 of the
JN> Binder and Basic Content Documents to follow the XML 1.0 spec when it
JN> recommends rather than requires it.
JN> (One aspect of this are existing XML processing and rendering tools.
JN> Are they all pretty agnostic between <foo/> and <foo></foo> regardless
JN> of whether or not the elements are declared EMPTY?)
Yes.
JN> Jon
JN> ----------------------------------------------------
JN> Post a message: openreader-format@yahoogroups.com
JN> Unsubscribe: openreader-format-unsubscribe@yahoogroups.com
JN> Switch to digest: openreader-format-digest@yahoogroups.com
JN> Switch to normal: openreader-format-normal@yahoogroups.com
JN> Put mail on hold: openreader-format-nomail@yahoogroups.com
JN> Administrator: openreader-format-owner@yahoogroups.com
JN> ----------------------------------------------------
JN> Yahoo! Groups Links
JN>
--
Chris Lilley mailto:chris@...
Interaction Domain Leader
Chair, W3C SVG Working Group
W3C Graphics Activity Lead
Co-Chair, W3C Hypertext CG