Re: Running xmlpull tests?

Aleksander Slominski <[email protected]> Wed, 21 Jul 2004 16:33:43 -0500
Newsgroups gmane.text.xml.xmlpull.devel
Message-ID <[email protected]>
Tatu Saloranta wrote:

>--- Aleksander Slominski <[email protected]>
>wrote:
>  
>
>>CVS, viewcvs and 
>>
>>    
>>
>http://www.extreme.indiana.edu/dist/java-repository/xpp3/distributions/
>  
>
>>should all work now.
>>    
>>
>
>Thanks! Yesterday I downloaded xpp3 sources, and got
>the tests. Now "only" 55 tests fail (error/fail). :-)
>But I did find one actual bug with namehandling in the
>implementation I wrote... so that was good. :-)
>Plus obviously there are lots of things tests kind of
>defined WRT xmlpull api; for example, type of
>exceptions to be thrown on illegal args. Javadocs
>often are vague about expected types.
>
>One question regarding xmlpull and mapping to StAX: I
>assume PROCESS_DOC_DECL from xmlpull is roughly
>equivalent to StAX' SUPPORT_DTD, and then validation
>enabling features are also similar/identical. Is this
>correct? Former meaning 'read dtd, internal/external
>subset, use entities but', and latter that 'validate
>using dtdf rules'?
>  
>
yes. AFAIR it is correct.

>Now, what I'm not sure about is how validation
>enabling should work. I mean, most (2 out of 3)
>xmlpull parsers do not implement (DTD-based)
>validation, but tests try to enable it. Is expected
>behaviour just to 'succeed' in setting validation (no
>exceptions), but return 'false' if feature's value is
>checked? 
>
in XmlPull v1 API PROCESS_DOC_DECL is optional so only check is to know 
if parser supports it or not.

>Right now my StAX implementation throws an
>exception when trying to enable it (which may or may
>not be right for stax), but I could make wrapper catch
>that exception if necessary, if that's not how xmlpull
>expects things to work.
>  
>
>(one difference between stax and xmlpull is that stax
>has 'isPropertySupported' method that can be used to
>check existence of a property/feature... too bad it
>can't tell if value being set is acceptable).
>  
>
in xmlpull i think it is always exception to indicate that feature is 
not supported. by try{}catch{ isSupported=false } it you essentially 
have isProperty/FeatureSupported() methods without need to add them to 
API (and making API bigger and that is concern for J2ME to keep only 
required or very useful methods)

thanks,

alek

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



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/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/