[Mono-devel-list] Re: System.Xml patch

Atsushi Eno atsushi at ximian.com
Thu Jun 23 01:11:52 EDT 2005


Hi Andrew,

> How about this patch? To save iterations, I made the same check in 
> ResolveExternalEntityReplacementText, please tell me, if it's unnecessary.

This patch looks fine. Let's check it in svn.

I'll apply the patch attached after your commit.

> Index: DTDReader.cs
> ===================================================================
> --- DTDReader.cs	(revision 46238)
> +++ DTDReader.cs	(working copy)
> @@ -641,8 +641,9 @@
>  		private void ResolveExternalEntityReplacementText (DTDEntityBase decl)
>  		{
>  			if (decl.LiteralEntityValue.StartsWith ("<?xml")) {
> +				// FIXME: not always it should be read in Element context - AS

What does this mean? I guess you have in mind that there are cases that
entities could be used inside attributes, but attribute content check
is less prohibiting and '<' characters are checked anyways.

(BTW we won't understand what "-AS" means there ;-)

Besides the comment itself.

In fact I also don't like that part of code. Actually, though
replacing entities with a simple string is good for performance
as compared to such code that loads entity possibly from external
files every time, it causes incorrect BaseURI resolution (that
results in incorrect not-wf error for XHTML 1.1 DTD; bug #51495).

So, basically rewriting that entity expansion part is the best
solution. But I haven't tried that since it will not be done as a
quick hack and it will first result in several breakage in
standalone tests.

Thanks,
Atsushi Eno
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: invalid-entitydecl-test.diff
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050623/c2345035/attachment.pl 


More information about the Mono-devel-list mailing list