Re: Proposed fixes to support "multiple code pages" for WBXML documents

Stefan Haustein <[email protected]> Sun, 16 May 2004 02:52:11 +0200
Newsgroups gmane.comp.java.enhydra.kxml
Organization University of Dortmund
Message-ID <[email protected]>
Christian Kurzke wrote:

 > Please let us know your opinion.

Great! :) Thanks a lot! I have committed all of the proposed changes 
except from the following:

>      2. To make it working properly we should add 
> "org.kxml2.wap.WbxmlParser, org.kxml2.wap.WbxmlSerializer"
>         to the file 
> src/META-INF/services/org.xmlpull.v1.XmlPullParserFactory.

I am not sure whether this is a good idea: How can the factory decide to 
deliver the WBXML parser and not a regular XML parser? The problem is 
that a regular parser won't work for WBXML and vice versa...?

>         a) In the function nextImpl() replace call peekId() with 
> readByte().
> 
>            Originally:
> 
>                while(id == Wbxml.SWITCH_PAGE){
>                    nextId = -2;
>                    selectPage(readByte(), true);
>                    id = peekId();
>                 }
> 
>            Our new version:
> 
>                 while(id == Wbxml.SWITCH_PAGE){
>                     nextId = -2;
>                     selectPage(readByte(), true);
>                     id = readByte ();
>                 }

Is there any difference in functionality? With your change, the line 
"nextId = -2" could be removed, is that correct?

Best regards,
Stefan Haustein