You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Colin Paul Adams <co...@colina.demon.co.uk> on 2003/01/31 16:04:05 UTC
std::istream as XSLTInputSource
I see that std::istream is an acceptable input to an XSLTInputSource
constructor. Would I be correct in asuuming this should represent a
byte stream of characters encoded as UTF-8?
--
Colin Paul Adams
Preston Lancashire
Re: std::istream as XSLTInputSource
Posted by David N Bertoni/Cambridge/IBM <da...@us.ibm.com>.
Hi Colin,
You have to do what the XML recommendation says:
http://www.w3.org/TR/REC-xml#charencoding
http://www.w3.org/TR/REC-xml#sec-guessing
So the answer is yes.
Dave
Colin Paul Adams
<colin@colina.de To: xalan-c-users@xml.apache.org
mon.co.uk> cc: (bcc: David N Bertoni/Cambridge/IBM)
Subject: Re: std::istream as XSLTInputSource
01/31/2003 11:18
AM
>>>>> "David" == David N Bertoni/Cambridge/IBM <da...@us.ibm.com>
writes:
David> There is no assumption made about the encoding. It can be
David> any stream of bytes that represents a well-formed XML
David> document. The parser will do what is required to determine
David> the encoding, as it would with a stream from a file.
So does that mean I can pass a stream of UTF-16 bytes to it?
If so, do I have to start the stream with a BOM, for the parser to
recognise it as UTF-16?
--
Colin Paul Adams
Preston Lancashire
Re: std::istream as XSLTInputSource
Posted by Colin Paul Adams <co...@colina.demon.co.uk>.
>>>>> "David" == David N Bertoni/Cambridge/IBM <da...@us.ibm.com> writes:
David> There is no assumption made about the encoding. It can be
David> any stream of bytes that represents a well-formed XML
David> document. The parser will do what is required to determine
David> the encoding, as it would with a stream from a file.
So does that mean I can pass a stream of UTF-16 bytes to it?
If so, do I have to start the stream with a BOM, for the parser to
recognise it as UTF-16?
--
Colin Paul Adams
Preston Lancashire
Re: std::istream as XSLTInputSource
Posted by David N Bertoni/Cambridge/IBM <da...@us.ibm.com>.
Hi Colin,
There is no assumption made about the encoding. It can be any stream of
bytes that represents a well-formed XML document. The parser will do what
is required to determine the encoding, as it would with a stream from a
file.
Dave
Colin Paul Adams
<colin@colina.de To: xalan-c-users@xml.apache.org
mon.co.uk> cc: (bcc: David N Bertoni/Cambridge/IBM)
Subject: std::istream as XSLTInputSource
01/31/2003 07:04
AM
I see that std::istream is an acceptable input to an XSLTInputSource
constructor. Would I be correct in asuuming this should represent a
byte stream of characters encoded as UTF-8?
--
Colin Paul Adams
Preston Lancashire