Re: revised description of RELAXED feature

Stefan Haustein <[email protected]> Sat, 21 Feb 2004 20:29:24 +0100
Newsgroups gmane.text.xml.xmlpull.devel
Organization University of Dortmund
Message-ID <[email protected]>
Alek,

I think we actually need two properties or some kind of leveling:

0: parser strictly rejects malformed XML

1: parser accepts well-formed XML, but also may accept some malformed 
XML (some well-formedness checks are not implemented)

2: parser tries to make its best effort to read anything. This is needed 
for real-world HTML parsing or the implementation of tools similar to 
HTML-Tidy.

kXML can operate in modes 1 and 2.



Aleksander Slominski wrote:
> hi,
> 
> i took Stefan and Elliotte comments and tried to come up with the 
> updated description for RELAXED feature.
> 
> does it sound right or did i miss something?
> 
> thanks,
> 
> alek
> 
> <h3>
> <a name="relaxed"></a>Optional feature: RELAXED</h3>
> <br />
> 
> <p>This feature is identified by
> <a href="http://xmlpull.org/v1/doc/features.html#relaxed">
> http://xmlpull.org/v1/doc/features.html#relaxed</a> 
> </p>
> 
> <p>If this feature is supported that means that XmlPull parser will be lenient 
> when checking XML well formedness. 
> Even when this feature is enabled parser <b>MUST</b> accepts all valid XML
> (the only exception is in case when PROCESS DOCDECL is disabled as in
> this case DOCDECL is not parsed). This feature is intended to indicate
> that the parser will make less effort to detect not well formed XML input. 
> Note that it is different from invalid XML documents: when
> VALIDATION feature is enabled RELAXED feature <b>MUST</b> be disabled.
> </p>
> 
> <p><b>NOTE</b>: use it only if XML input is not well-formed and the usage 
> of this feature is <b>discouraged</b> </p>
> 
> <p><b>NOTE</b>: as there is no definition of what exactly is accepted as 
> without checks when relaxed XML parsing is enabled therefore what parser will do 
> completely depends on an implementation. For example in kXML2 relaxed setting 
> is used to parse subset of HTML including accepting SGML constructs
> such as &lt;table border=1> etc.
> </p>
> 
> <p><b>NOTE</b>: This feature is intended be used in J2ME and
> similar very small footprint devices (where each KB of 64KB counts!)
> to help in producing very small footprint XML parsers 
> (such as kXML2).
> </p>
> 




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/2U_rlB/TM
---------------------------------------------------------------------~->

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/xmlpull-dev/

<*> To unsubscribe from this group, send an email to:
     [email protected]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/