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

Re: XML5: Re: MicroXML

  • From: David Carlisle <davidc@nag.co.uk>
  • To: rjelliffe <rjelliffe@allette.com.au>
  • Date: Tue, 14 Dec 2010 10:54:42 +0000

Re: XML5:  Re:  MicroXML
On 14/12/2010 01:29, rjelliffe wrote:
> Is Henri suggesting (and I don't want to say it is a bad idea...) that
> really there already is a subset of XML implemented and in the field:
> that subset of XML that HTML5 parsers will support? I think Henri wrote
> "XML5" at one stage as a typo, but it fits.

"xml5" wasn't a typo, it was a reference to

http://code.google.com/p/xml5/

The trouble is that HTML5 parsers will parse a large subset of XML but 
produce radically different parse trees, leading to silent data corruption.

It's virtually impossible for a human to figure out what parse tree an 
html5 parser will produce from a fragment of well formed XML, you just 
have to [expletive deleted] it and see.

Some random examples

1)

<p><a id="foo"/> <b>xx</b></p>

parses as

<p><a id="foo"> <b>xx</b></a></p><a id="foo">
</a>


2)

<p><math><mfrac><mn>1</mn><span>x</span></mfrac></math></p>

parses as

<p><math><mfrac><mn>1</mn></mfrac></math><span>x</span></p>



3)

<p><maths><mfrac><mn>1</mn><span>x</span></mfrac></maths></p>

which has the same structure as (2), but  a different element name, 
parses as

<p><maths><mfrac><mn>1</mn><span>x</span></mfrac></maths></p>



The polyglot spec (which still has its own problems) tries to lead 
people away from these traps, but documenting that they exist doesn't 
really help unless all the tools are updated. the costs of that compared 
to the costs of html specifying a sane parsing mode in standards mode 
seem to have been discounted.

David




________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________


[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.