|
From: Nicola F. <ni...@lu...> - 2002-08-30 17:10:09
|
hi darryl I've spent about 2 hours getting all the bits and pieces from various documents of different projects and specifications - I hope it is a step forward towards WAP support for sync4j. altough I hope I have no really nasty bugs in my rather lengthy email, critics & correction are always welcome! On Fri, 2002-08-30 at 17:33, Darryl Champagne wrote: > I don't see kXML as being a WBXML parser, just an XML parser. The two are > moderately different. Also, while there are some WBXML parsers available, > the last time I checked none of them supported multiple code spaces (or was > it multiple code pages?), both of which SyncML uses. kXML v1.x does indeed support WBXML (as stated in [8]) - while version 2 does not (first paragraph in [9]). I google'd around for WBXML & Java and found an example where kXML was used to transform WBXML to XML and the other way 'round [1]. a small Java class doing this can be found at [2]. the WBXML specification [4] says that "A binary XML document must include a string table immediately after the public identifier." and: "Various tokens encode references to the contents of the string table." [6] - so much for the concern that those code pages would have to be fed to the WBXML parser. regarding your concern of multiple code spaces: "This version of the SyncML representation protocol specification maps all the SyncML related DTDs into a single WBXML code space." [3] this single code space divides into two code _pages_: 1. SyncML 2. MetInf in a WBXML stream, a SWITCH_PAGE token can switch the current page. apart from these website tutorials, I think that parsing a WBXML stream to produce plain XML should not be _that_ difficult, if we fail to find an existing parser capable of transforming SyncML WBXML. given those code-pages (which are delivered in the WBXML stream like specified in [6]), it would have to get the first XML tag, look it up in the string table, write out the full XML tag, get the next byte etc. but this should only be necessary in the last resort. > How certain are you of your support for WBXML? quite sure actually - it's a part of my project at the university of fribourg. :) feedback is welcome! regards nicola [1]: http://www.devx.com/xml/articles/bs120101/Part2/bs120101p2-1.asp [2]: http://www.devx.com/xml/articles/bs120101/Part2/listing3.asp [3]: SyncML representation protocol v1.1, chp. 8.1, p. 38 [7]: SyncML meta information DTD v1.1, chp. 7, p. 19 [4]: WBXML encoding specification, http://www.w3.org/TR/wbxml/ [5]: Token Structure, http://www.w3.org/TR/wbxml/#_Toc443384902 [6]: String Table, http://www.w3.org/TR/wbxml/#_Toc443384901 [8]: kXML v1.x, http://kxml.enhydra.org/project/aboutProject/index.html [9]: kXML v2.x, http://www.kxml.org/ |