XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] MicroXML


How do I tell whether it's safe to use my uXML parser instead of my
(heavier) XML 1.0 + Namespace in XML + XML:Base + XML:ID + whatever
parser?

Given that MicroXML is designed to be a subset, how could there be a reliable in-band mechanism to tell you?  Anything you might put in the document, has to be legal XML 1.0, so it can't be a reliable indicator that it's MicroXML rather than XML 1.0. Similar problem with telling how to use MicroXML rather than HTML.  I don't think this is any different from problems we have today. How do you choose between an HTML, XML or an SGML parser? There's no reliable in-band mechanism.  In the end, you have to rely on out-of-band information.

Nonetheless I can think of some heuristics.  I suspect it is very unusual in XML to have a DOCTYPE declaration with neither an internal nor an external subset.  Thus such a DOCTYPE declaration (regardless of the DOCTYPE name) could be a good indicator.

If you have <!DOCTYPE html>, then you have the question of whether to use an HTML5 parser or MicroXML.  For this case, you could perhaps use a link relation or a profile attribute (if that gets added back to HTML5 at some point).

I think the general policy has to be that if you don't have out of band information, then use the more liberal format (ie XML or HTML5 rather than MicroXML).

James


 
XML declaration not allowed.  XML 1.0 and uXML are placed in the
position of both claiming to be the canonical format indicated by the
absence of a declaration.

Processing instruction not allowed (meaning no presentation in the
browser via XSLT, either, but that's another issue).  Can't use a PI to
indicate that this is uXML.

Doctype declaration not allowed.  In comments on the blog, James seems
to be leaning toward allowing the declaration (simplified: <!DOCTYPE
root> with no public id, no system id (consequently no external subset)
and no internal subset).  Problem with introducing it: it can't be
effectively used, for uXML, as intended (unless uXML defines a single
canonical root element).  Problem with using it: generally, a parser
errors on encountering one of these anywhere but at the beginning (same
problem as with the XML declaration).

That leaves: attribute on the root--or some other--element.  Does this
defeat the design goal of embedding?  Specially-formatted comment.
That ... simply changes the syntax of processing instructions (which is
what happens in HTML, and no doubt will happen in HTML5 as well).
Modifying content syntax to carry meaning has a long, inglorious
history in HTML.

This suggests (to me) that the likeliest hack will be to create custom
semantically important comments, possibly paired comments if uXML is
widely deployed embedded (start and stop), although well-formedness
might make a single indicator sufficient.

Personally, I'd rather have a PI.

In other issues, I think that there may be an over-emphasis on HTML5
compatibility, even at the expense of XML compatibility.

If this were to be of interest, I'd expect to see it "grow up" with
additional layers, at some point.  So, for instance, James's grammar
describes strings; *someone* is going to want to apply schemata, of
some flavor, and introduce 'typing' at some layer.  There may be an
opportunity to suggest a better layer, but I'd say that if such a
slimmed profile were adopted, one can predict some parts of its future
(the functionality enhancements) by examining the functionalities
provided by accepted and widely-implemented specifications in the XML
stack.

Amy!
--
Amelia A. Lewis                    amyzing {at} talsever.com
There are two major products that came out of Berkeley: LSD and BSD
Unix.  We don't believe this to be a coincidence.

_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS