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

Re: Error and Fatal Error

  • From: Jim Melton <jim.melton@oracle.com>
  • To: stephengreenubl@gmail.com
  • Date: Wed, 10 Aug 2011 18:35:22 -0600

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



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