I've read through the OMA documents on OMA Provisioning [OMA-WAP-ProvCont-v1_1-20021112-C] and the WBXML specs [WAP Binary XML Content Format]. I thought I understood about code pages but then I looked at the nokia document for the Nokia 6600 from:
Why is there a SWITCH_PAGE for the 'NAME' attribute? In the OMA document [OMA-WAP-ProvCont-v1_1-20021112-C], there are two tables which list "Parm Attribute Start Tokens". The first table is for code page 0 attributes, the second is for code page 1 attributes. The 'NAME' attribute is listed in both tables! Is this a mistake? (See pages 54 and 57 of the OMA-WAP-ProvCont-v1_1-20021112-C document to see the two entries.
Anyway, I'm confused. If 'NAME' is listed in both tables, why the SWITCH_PAGE, to code page 0?
Hello -- very good question -- afraid I don't have an answer for you. As far as I can see, you are absolutely right -- there should be no need for a code page switch, and we just wasted valueable bytes.
I'll send a message to the person who wrote the document (and the sample).
The parameter NAME is indeed specified in two tables. There are a couple of other similar examples, like PORTNBR, INTERNET, STARTPAGE, etc. We haven't been involved in standardization of OMA Provisioning token values, so the reason for duplication is not entirely clear. Our guess is that this is a small optimization. If the parameter NAME is used in characteristic APPLICATION, whose token is found on code page 1, it isn't necessary to switch to page 0 just to specify NAME.
In practice the optimization is so small that many encoders seem to ignore this possibility, and switch to page 0 always when specifying NAME. This is the case in the example of the User's Guide.