[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: MicroXML

  • From: James Clark <jjc@jclark.com>
  • To: Amelia A Lewis <amyzing@talsever.com>
  • Date: Tue, 14 Dec 2010 11:35:31 +0700

Re:  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} http://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



  • Follow-Ups:
  • References:
    • MicroXML
      • From: James Clark <jjc@jclark.com>
    • Re: MicroXML
      • From: Amelia A Lewis <amyzing@talsever.com>

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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.