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

RE: Error and Fatal Error

  • From: "Len Bullard" <cbullard@hiwaay.net>
  • To: "'Jim Melton'" <jim.melton@oracle.com>, <stephengreenubl@g...>
  • Date: Wed, 10 Aug 2011 21:33:28 -0500

RE:  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.

len

-----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@l...
Subject: Re:  Error and Fatal Error

Stephen,

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

Hope this helps,
    Jim

========================================================================
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]


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.