Re: Strict-Mode and Lax-Mode MicroXML
On 3 June 2012 20:32, Liam R E Quin <firstname.lastname@example.org> wrote: > On Sun, 2012-06-03 at 10:00 +0100, Pete Cordell wrote: > >> Â Â If a < character is not followed by a nameStartChar or a ? character >> Â Â or a ! character then it should be treated as a < character that has no >> Â Â special meaning. > or / of course :-) > >> Â Â If a & character is not followed by one of the character sequences >> Â Â gt; or lt; or amp; or quot; or apos; then it should be treated as a & >> Â Â character that has no special meaning. > > or # presumably. Good point. Which is why it's better for the spec to specify the rules rather than leave it up to developers to work out the fallbacks, which has been some of the problems of Postel's law. > Optimising for hand-authored documents is a mistake - make hand > authoring easy, but not at the expense of harder machine processing. For me it depends on the cost-benefit analysis. Neither the simplest parser, nor the easiest to hand-author are likely to be optimal. > An example was the CDATA section, included in XML because the spec > authors wanted it for examples despite the fact it made parsing > irregular. Better might have been to include a CDATA element, e.g. by > saying element names "starting with %" (in SGML terms) were literal, > <%foo> ...</%foo>. > >> I see this as a migration strategy to get away from some of the SGML baggage >> that is no longer relevant, and maybe in 10 years time we can safely adopt >> lax-mode for 99% of what developers want to do and have -- in comments etc. > > There's no acceptable value of "10 years" for breaking changes. > > XML today is used in consumer devices, in computer boot sequences, in > aircraft and car engines, it's not something that can change; ÂµXML, if > successful and in use a decade from now, would be in a similar > situation. HTML has evolved. e.g. <script> no longer requires comments to escape them etc. Other syntaxes have also evolved, such as programming languages. Why can't XML evolve? And if you want uXML in aircraft or engines then you can just insist on strict mode and just ignore lax mode. Pete Cordell Codalogic Ltd Interface XML to C++ the easy way using XML C++ data binding to convert XSD schemas to C++ classes. Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com for more info
[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!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format