"Re: LSParser.parse - stringData - encoding declaration"

Hi,

on 2/27/2004 11:41 PM Philippe Le Hegaret wrote:

> On Wed, 2004-02-25 at 11:53, Kasimier Buchcik wrote:
> 
>>Hi,
>>
>>I learned that the LSSerializer should generate an encoding declaration 
>>of "UTF-16" if serializing a whole DOM document to a DOMString via 
>>LSSerializer.writeToString.
> 
> 
> Note that this depends on the value of the xml-declaration parameter.
> 
> 
>>So just to have it black on white: does this imply the encoding 
>>declaration *has to* be existent and *has to* state "UTF-16", if parsing 
>>with LSParser.parse with an input.stringData holding a XML document - 
>>otherwise an error would be reported?
> 
> 
> We added the following on LSInput.characterStream (modulo the
> "<code>stringData</code>") and LSInput.stringData:
> [[
> It is not a requirement to have an XML declaration when using
> <code>stringData</code>. If an XML declaration is present, the value of
> the encoding attribute will be ignored.
> ]]
> Since the document is already represent as characters, there is no need
> for encoding information anymore.

Ignored to what extent? Does it affect Document.xmlEncoding? Should no 
error be raised if it is not supported or incorrect? Or does *ignored* 
mean that one can declare whatever encoding - e.g. "XYZ-1972" - without 
*any* effect?


Greetings,

Kasimier

Received on Monday, 8 March 2004 06:28:05 UTC