Re: [Bluez-devel] Proposed DTD

Marcel Holtmann
2006-10-24T09:13:03Z

Hi Denis,

> > I am also not sure that the encoding attribute is needed. If you wanna
> > encode binary data in text elements (at the moment only HID does this)
> > then you can use \000 style encoding to do so.
>
> Perhaps you mean the '&#00;' style escapes? This is feasible, except that
> expat assumes attributes do not contain raw data (it returns an array of
> const char * and assumes it is null terminated). Thus we would need to
> switch text* (and perhaps url*?) elements to be something like:
>
> <!ELEMENT text (#PCDATA)>
>
> or find another parser.

we do the parsing of the string by ourself. You only have to do that for
binary strings anyway. And they are expected only in the HID profile so
far. So that shouldn't be that big problem.

Regards

Marcel