[Mono-devel-list] Re: System.Xml patch
Atsushi Eno
atsushi at ximian.com
Wed Jun 15 11:03:17 EDT 2005
Hi Andrew,
Good catch :-) However the fix does not look correct. Your patch
also avoids entity content evaluation, that means it sometimes
results in incorrect well-formedness.
valid-sa-086 looks like this:
<!DOCTYPE doc [
<!ELEMENT doc (#PCDATA)>
<!ENTITY e "">
<!ENTITY e "<foo>">
]>
<doc>&e;</doc>
If there is such xml like:
<!DOCTYPE doc [
<!ELEMENT doc (#PCDATA)>
<!ENTITY e "">
<!ENTITY e "<foo&>">
]>
<doc>&e;</doc>
Then it should be rejected. Note that there is '&' in the second
ENTITY declaration.
So we still have to invoke ResolveInternalEntityReplacementText(),
but without replacing "replacement text". Am not sure I can fix
it soon but would like to take care of it at some stage.
Thanks
Atsushi Eno
Andrew Skiba wrote:
> Hi!
>
> Please review the attached patch. It fixes one of the regressions in W3C
> testsuite. I checked it with nunit tests and xsl standalone, it does not
> break anything.
>
> The idea of the patch is that "If the same entity is declared more than
> once, the first declaration encountered is binding" (citation from
> http://www.w3.org/TR/xml11/#sec-entity-decl ). In this test
> (valid-sa-086) they redefine an entity with unclosed tag, and current
> implementation crashes.
>
> I made the minimal necessary change, but may be you will want to include
> other flows as well.
>
> Regards,
> Andrew.
More information about the Mono-devel-list
mailing list