[Expat-discuss] Re: Summary of Pull API thoughts

Karl Waclawek karl at waclawek.net
Tue Mar 25 11:35:34 EST 2003


> I know this is off-topic, but while you have your design juices flowing I
> thought I'd ask a question that we're struggling with in my group.
> 
> My group is using expat to implement a VoiceXML processor and a multimodal
> browser using the XHTML + Voice proposal in the W3C
> (http://www.w3.org/TR/xhtml+voice/.) We're also considering its use by the
> grammar compiler in our speech engines in order to support the Speech
> Recognition Grammar Specification (http://www.w3.org/TR/speech-grammar/)

Cool. Which version of Expat?
 
> However, we have a sticky requirement for our language support to be able
> to switch dynamically between 1 byte ascii and 2 byte Unicode. By doing
> this, our European languages require half the space of the Asian languages,
> which is very important for our embedded customers who sqeal every kilobyte
> we consume.
> 
> How hard would it be to change the character size from a build-time to a
> run-time decision in expat?

It looks hard, since even the API itself is statically tied to the
definition of XML_Char.

However, you should be able to compile two libraries (XML_Char defined
as char or wchar_t), and dynamically load whichever you need at runtime,
and even switch between them. Why would that not work for you?

Karl




More information about the Expat-discuss mailing list