Re: extended support for DOCDECL

Aleksander Slominski <[email protected]>
Newsgroups gmane.text.xml.xmlpull.devel
Message-ID <[email protected]>
Pawel S. Veselov wrote:

>I'm trying to create a DOM2 tree out of the XmlPullParser implementation.
>For DOCDECL tag, it is kind of hard to obtain System ID and Public ID,
>since they're either unparsed, or missing at all (if FEATURE_PROCESS_DOCDECL)
>is set.
>
hi,

this is right - currently it is unspecified what is returned by 
getText() when FEATURE_XML_ROUNDTRIP is false and PROCESS_DOCDECL is 
true then what is returned is undefined (it may be even null)

>Are there any plans adding say getSystemId() and getPublicId() methods to
>the parser interface, so for all the nodes that have those values defined,
>they are returned.
>
i think that you are right and this information is important and needed. 
so i have now looking into adding two optional properties to allow 
reading system and public identifier and proposed that those two 
properties as required in 1.2 release of XmlPull API.

>I understand, J2ME implementations won't probably care about DOCDECL's and
>will only want to get raw XML, but in my case I care, since there are different
>document types code can get, and implementation needs to know, what is
>the document type exactly at least in order to validate, whether a document
>is sane.
>
that is right but it should be still very easy to extract this 
information even in J2ME (with minimal increase in implementation size) 
but i will see what is Stefan opinion (author of kXML2) about doing it 
as he has more experience with J2ME.

>I also understand, XmlPullParser is intended for reading XML only, and
>DTD may not really be pulled, since DTD elements are not listed as types, and
>an implementation doesn't have a way to report them. Are there any plans
>to support DTD tags, as an option for rich environments ?
>
speaking about XPP3: absolutely yes! however this task is currently 
pre-empted by other higher priority tasks on my todo list :-)

however you can still use XmlPull API implementation that provides 
DOCDECL handling and validation: please give try XNI2XmlPull that is 
implementation of XmlPull API that is based on Xerces2 codebase. i 
should be updating it in very near future to support Xerces 2.3.0 as in 
this version XNI API reached stable "gold" status. currently 
as XNI2XmlPull is still in beta stage you can get it only from CVS 
 location described in  http://sourceforge.net/projects/xni2xmlpull/

thanks,

alek

-- 
"Mr. Pauli, we in the audience are all agreed that your theory is crazy. 
What divides us is whether it is crazy enough to be true." Niels H. D. Bohr



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/LIgTpC/vN2EAA/xGHJAA/2U_rlB/TM
---------------------------------------------------------------------~->

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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.