[XML-SIG] Yet another stupid XML question

Lars Marius Garshol larsga@step.de
Fri, 08 May 1998 11:13:20 +0200

Fredrik Lundh wrote:
> Which reminds me of one thing: when I first read the XML specification,
> I came under the impression that you can determine whether a document
> uses 8/16/32-bit characters by looking at the first bytes. 

Sort of. For entities not in UTF-8 or -16 you can do this.
between UTF-8 and -16 should also be simple. (Appendix F of the spec
explains this.)

> But I've recently seen a few references that seem to claim that you 
> can also change character sets for each new element. 

That's wrong, but maybe you/they think of/mean entities? When


refers to an external entity there's no constraint that the external
entity be in the same character set as the referring entity, which is
why external entities can have their own XML declaration (the spec
calls it a text declaration). 

xmlproc currently does not handle text declarations correctly, but it

--Lars M.