Re: Like to contribute / Bug in WbxmlParser
Stefan Haustein <[email protected]> Wed, 12 Nov 2003 11:23:07 +0100
| Newsgroups | gmane.comp.java.enhydra.kxml |
|---|---|
| Message-ID | <[email protected]> |
Hi Michael,
thanks a lot for the fix. I have committed the corresponding changes to the CVS
repository.
Concerning your help offer: That's great! I think the most important issue is to
provide support for other character encodings.... The management of the String
table will probably work only for ISO-8859-1... This should be replaced by a
better mechanism. I tend to assume that it should be sufficient to replace the
String holding the String table by a byte array, and then to use the
String(byte[], int, int, String) constructor while parsing... but is this
available in MIDP? What would be the performance tradeoff? Are there other
(better) options?
JUnit test cases would also be a great thing to add....
Best regards,
Stefan
Michael Raab wrote:
> i'm using the WbxmlParser in my Wap Project. I think i found a Bug in
> WbxmlParser. I am using the latest CVS Version.
>
> The method createParser() of the class Wml sets the
> tagTable, attrStartTable and the attrValueTable in the
> WbxmlParser. The setTagTable() method works properly, but both
> setAttrStartTable() and setAttrValueTable() methods use the tagTable
> variable instead of attrStartTable/attrValueTable:
(...)
> You wrote that you seek someone for WBXML testing and I am gladly willing
> to contribute some work in this area and i like to know how to contribute
> and how are the general rule in the development process of your project.
>
> I am using Eclipse as developing platform. I hope the my input is of some
> help and i am looking forward to helping you in the future.
>
>
> /**
> * Sets the tag table for a given page.
> * The first string in the array defines tag 5, the second tag 6 etc.
> */
>
> public void setTagTable(int page, String[] tagTable) {
>
> //!!! This is ok
> setTable(page, TAG_TABLE, tagTable);
>
> // this.tagTable = tagTable;
> // if (page != 0)
> // throw new RuntimeException("code pages curr. not supp.");
> }
>
> /** Sets the attribute start Table for a given page.
> * The first string in the array defines attribute
> * 5, the second attribute 6 etc.
> * Currently, only page 0 is supported. Please use the
> * character '=' (without quote!) as delimiter
> * between the attribute name and the (start of the) value
> */
>
> public void setAttrStartTable(
> int page,
> String[] attrStartTable) {
> //!!! Here should be:
> //!!! setTable(page, ATTR_START_TABLE, attrStartTable);
> setTable(page, ATTR_START_TABLE, tagTable);
>
> // this.attrStartTable = attrStartTable;
> // if (page != 0)
> // throw new RuntimeException("code pages curr. not supp.");
> }
>
> /** Sets the attribute value Table for a given page.
> * The first string in the array defines attribute value 0x85,
> * the second attribute value 0x86 etc.
> * Currently, only page 0 is supported.
> */
>
> public void setAttrValueTable(
> int page,
> //!!! Here should be:
> //!!! String[] attrValueTable) {
> String[] attrStartTable) {
>
> //!!! Here should be:
> //!!! setTable(page, ATTR_VALUE_TABLE, attrValueTable);
> setTable(page, ATTR_VALUE_TABLE, tagTable);
>
> // this.attrValueTable = attrStartTable;
> // if (page != 0)
> // throw new RuntimeException("code pages curr. not supp.");
> }
>
> Regards,
> Michael