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] Error and Fatal Error

Exactly.  XML is a maximum expectation from minimum compliance contract.  If
you can simply get the few rules there are right, it just works because the
contract is quite specific and both by practice and agreement, no variations
are acceptable.  KISS.

Programming lets us do a lot of tricks.  It doesn't mean we should.
Replacement of the tag characters is certainly possible and SGML allows it.
But SGMLers wisely decided to abhor the SGML Declaration as a means of
network system description with the sole exception of the one James Clark
wrote for XML.  Possibly more than even the spec, it's the XML Constitution
for those who can read it.

This doesn't do more than solve the problem of the syntax parse but that
minimum expectation hits the sweet spot between the things worth catching,
basically typing errors (as in hitting the keys with tired eyes) and
slouching for markers.

I entered over four hundred lines of repetitive lines of XML in Notepad43
today.  Five input errors.  Time to find: about a second and fix:  two
minutes.  Given to the next processor, one FOSI declaration to fix by adding
an e-i-c.  Time since last time I debugged one of those:  18 years.  To
print rendering engine, less than two.

Why?  It's all declarative XML.  All you have to do is stare at the
structure and the properties you are setting are just there.

Best seats in the halls of karma.


-----Original Message-----
From: Jim Melton [mailto:jim.melton@oracle.com] 
Sent: Wednesday, August 10, 2011 7:35 PM
To: stephengreenubl@gmail.com
Cc: Toby.Considine@gmail.com; xml-dev@lists.xml.org
Subject: Re: [xml-dev] Error and Fatal Error


At 7/18/2011 01:14 PM, Stephen D Green wrote:
>The problem is that there are tags in the strings - it is XML.
>System.Security.SecurityElement.Escape and HtmlEncode
>would change the angle brackets in the tags too.

I suggest that you've failed to accept what many have been telling 
you: The presence of angle brackets around sequences of certain 
characters might create "tags", but that does not make it XML.  "XML" 
is a well-defined language.  Claiming that text such as;
    <elem attr="<"&<Bob"/>
is XML doesn't make it so.  There are explicit rules in the 
definition of the language XML that prohibit attribute values 
containing <, &, and the quoting character itself unless they are 
properly "escaped".  Violation of those rules means that the text 
doesn't meet the definition of XML.  Would you, for example, expect a 
C processor to process this text properly:
    switch (flag] { ... )
even though the right square bracket was pretty "obviously" supposed 
to be a right parenthesis and the right parenthesis a right curly 
brace?  I haven't encountered a C processor that would make those 
corrections -- they all seem to report syntax errors and expect me to 
make the corrections.  I don't find that unreasonable.

I'm no longer a software developer (although I was for many, many 
years), and yet I've been able to write fairly simple code in a 
couple of different languages that pseudo-parses input text that 
claims to be XML, locates certain aberrations that my application 
typically produces (e.g., & and < in what were intended to be 
attribute values, -- in what were intended to be comments), and 
corrects those specific errors (e.g., replacement with character 
references and insertion of a space between the hyphens).  Full 
parsing is rarely needed, depending on the precise errors that you 
intend to fix.  I'm sure that you can do the same without significant 

Hope this helps,

Jim Melton --- Editor of ISO/IEC 9075-* (SQL)     Phone: +1.801.942.0144
   Chair, ISO/IEC JTC1/SC32 and W3C XML Query WG    Fax : +1.801.942.3345
Oracle Corporation        Oracle Email: jim dot melton at oracle dot com
1930 Viscounti Drive      Alternate email: jim dot melton at acm dot org
Sandy, UT 84093-1063 USA  Personal email: SheltieJim at xmission dot com
=  Facts are facts.   But any opinions expressed are the opinions      =
=  only of myself and may or may not reflect the opinions of anybody   =
=  else with whom I may or may not have discussed the issues at hand.  =


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