Re: revised description of RELAXED feature

Aleksander Slominski <[email protected]> Sat, 21 Feb 2004 14:35:12 -0500
Newsgroups gmane.text.xml.xmlpull.devel
Message-ID <[email protected]>
Stefan Haustein wrote:

>Alek,
>
>I think we actually need two properties or some kind of leveling:
>
>0: parser strictly rejects malformed XML
>  
>
DOCDECL=true && RELAXED_CHECKING=false && RELAXED=false

>1: parser accepts well-formed XML, but also may accept some malformed 
>XML (some well-formedness checks are not implemented)
>  
>
RELAXED_CHECKING=true
http://xmlpull.org/v1/doc/features.html#relaxed-checking

>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.
>  
>
BEST_EFFORT=true (i think it isbetter name than RELAXED ...)
http://xmlpull.org/v1/doc/features.html#best-effort

>kXML can operate in modes 1 and 2.
>  
>
hopefully it should allow to keep kXML2 size small too.

alek

>
>
>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 Links
>
>
>
> 
>
>  
>


-- 
The best way to predict the future is to invent it - Alan Kay



------------------------ 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/