[Mono-dev] RE: External entity resolution

Konstantin Triger kostat at mainsoft.com
Tue Nov 22 10:14:50 EST 2005


Hi Eno,

Yep, you are right, we have more problems here: if someone retrieves the
Entity object using DOM, it will be never resolved... So the direction
looks good, but there is more work to do. May be we will consider to
continue it at a later stage.

Regards,
Konstantin Triger


-----Original Message-----
From: Atsushi Eno [mailto:atsushi at ximian.com] 
Sent: Thursday, November 17, 2005 4:22 PM
To: Konstantin Triger
Cc: mono-devel-list at lists.ximian.com
Subject: Re: External entity resolution

Hi Kosta,

I think the idea that entity declaration does not have to resolve
the actual entity until it is referenced is nice to do.
But the patch breaks several tests with NullReferenceException.
Can you please run "make run-test" in System.XML and hopefully
in System.XML/Test/System.Xml/standalone_tests? Andrew made a
pretty useful NUnit integration there.

Thanks,
Atsushi Eno

Konstantin Triger wrote:
> Hello Eno,
> 
>  
> 
> We fail to load the following xml:
> 
>  
> 
> <!DOCTYPE doc [
> 
> <!ENTITY e PUBLIC ";!*#@$_%" "100.xml">
> 
> <!ELEMENT doc (#PCDATA)>
> 
> ]>
> 
> <doc></doc>
> 
>  
> 
> The reason is that we try to set the entity content when it's declared
> and not when it's referenced.
> 
> The attached patch fixes the issue.
> 
>  
> 
> BTW, do we need to resolve it before it's referenced? I guess no... So
> the LiteralEntityValue should be empty and we need to create a
XmlReader
> based on SystemId and read the data when requested...
> 
>  
> 
> Regards,
> 
> Konstantin Triger
> 
>  
> 
> 




More information about the Mono-devel-list mailing list