Hi Andy,
> I don't think that they are "fundamentally at odds"
> with each other. We can fix the situation simply by
> modifying the documentation for startGeneralEntity's
And startParameterEntity's
> encoding paramter. Instead of stating that the encoding
> is always null when parsed from a java.io.Reader, we
> could add "unless the encoding is set on the input
> source". It's not really a change -- more of a
> clarification. :)
I enjoyed Sandy's response when we talked about this idea: it went
something along the lines of "and maybe next week we'll clarify the
startDocument call to mean that it's issued at the end of a document." :)
I agree though that this is a pretty small change; nonetheless, it is a bit
of a slippery slope...
> We would still have to work around the fact that the
> encoding information provided in the startGeneral-
> Entity call is disconnected from our own XMLLocator
> methods. But we can just keep track of this info in
> the SAX parser.
That's what I was planning to do; that's pretty easy, even if it doesn't
feel very clean (we have to keep a stack of encodings etc.) But it should
work.
So if that's the direction people want things to go, I'm happy to make the
relevant touch-ups.
Cheers,
Neil
Neil Graham
XML Parser Development
IBM Toronto Lab
Phone: 905-413-3519, T/L 969-3519
E-mail: [EMAIL PROTECTED]
|---------+---------------------------->
| | Andy Clark |
| | <[EMAIL PROTECTED]|
| | > |
| | |
| | 03/03/2003 06:00 |
| | PM |
| | Please respond to|
| | xerces-j-dev |
| | |
|---------+---------------------------->
>---------------------------------------------------------------------------------------------------------------------------------------------|
|
|
| To: [EMAIL PROTECTED]
|
| cc:
|
| Subject: Re: treatment of encodings in XNI and SAX Locator2
|
|
|
|
|
>---------------------------------------------------------------------------------------------------------------------------------------------|
[EMAIL PROTECTED] wrote:
> Does anyone know why this behaviour was adopted in XNI?
I chose this so that people would know the original
encoding of the parsed documents. That way they could
write the document back out with the same encoding.
> Any thoughts on how to move forward with this? Locator2
> is still in alpha, so one would think that it should by
> no means be carved in stone at this stage.
I don't think that they are "fundamentally at odds"
with each other. We can fix the situation simply by
modifying the documentation for startGeneralEntity's
encoding paramter. Instead of stating that the encoding
is always null when parsed from a java.io.Reader, we
could add "unless the encoding is set on the input
source". It's not really a change -- more of a
clarification. :)
We would still have to work around the fact that the
encoding information provided in the startGeneral-
Entity call is disconnected from our own XMLLocator
methods. But we can just keep track of this info in
the SAX parser. It's certainly a lot easier than
modifying XNI at this stage.
Whatcha think?
--
Andy Clark * [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]