Hmm, my only question is about default behavior.
Before it was not using/resolving any DTD links,
and now it is... which means old code which was worked perfectly before,
now will stop to function.
So, maybe its worth to change the default behavior to be backwards
compatible?
Also, i'm not sure if it is good idea to go over a wire for an arbitrary
content you can give to XMLDOMParser, imo this should be disabled by
default, and instructed by user explicitly instead.

Don't take me wrong: i really like that now we can handle DTD stuff
properly, i'm only doubting current default way of handling it.



On 6 January 2014 12:58, monty <monty...@engineer.com> wrote:

> You can use the DTDCachingEntityResolver to cache responses:
>
> resolver := DTDCachingEntityResolver new.
>
> then:
>
> (XMLDOMParser onFileNamed: 'lion.svg')
>  externalEntityResolver: resolver;
>  parseDocument.
>
> or you could just disable validation and external entity resolution
> altogether:
> (XMLDOMParser onFileNamed: 'lion.svg')
>  isValidating: false;
>  resolvesExternalEntities: false;
>  parseDocument.
>
> if you're parsing a string or stream (and you can always create your own
> file stream and give it that), you can do everything with just one message:
>
> XMLDOMParser
>  parse: xmlStringOrStream
>  usingNamespaces: true;
>  validation: false;
>  externalEntities: false.
>
> This is all in the documentation for SAXHandler.
>
> ----- Original Message -----
> From: J.F. Rick
> Sent: 01/06/14 04:37 AM
> To: Pharo Development List
> Subject: Re: [Pharo-dev] XMLParser Problem with SVG
>  Monty, thanks. You are right that the latest version of XMLParser fixes
> the parsing problem. I think you just need to upload an updated
> configuration to the MetaRepoForPharo30 to fix this. And, yes, I would like
> to know how to turn DTD parsing off or for it to cache the DTD as it takes
> several seconds to retrieve the DTD for SVG and that gets annoying. Cheers,
> Jeff On Mon, Jan 6, 2014 at 10:18 AM, Sven Van Caekenberghe <s...@stfx.eu>
> wrote:
> On 06 Jan 2014, at 10:06, Igor Stasenko <siguc...@gmail.com> wrote:
>
> >
> >
> >
> > On 5 January 2014 15:19, J.F. Rick <s...@je77.com> wrote:
> > I am trying to use SVG with Athens; however, the XMLParser for Pharo 3.0
> cannot read normal SVG files that it used to. So, the demo of "ASVGMorph
> fromFile: 'lion.svg'" fails in the XMLParser (i.e., before ASVGMorph really
> does anything to it). It seems to download the DTD file from the Internet
> and then cannot properly parse it. Here is my setup:
> >
> > Up-to-date Pharo 3.0. Added XMLParser from the Configuration Browser.
> > Example file can be found here:
> http://www.thetangentbundle.net/w/images/f/ff/lion.svg
> > The following brings up an error: XMLDOMParser parseFileNamed: 'lion.svg'
> >
> > Hmm, why it tries to parse DTD file? It looks like something has changed
> in XMLDOMParser, because it wasn't before, and there is no support in SVG
> parser
> > for that.
>  Yes, the parsing of DTD’d is new, Monthy added it recently.
> He says there is a way to turn it off.
> >
> > Cheers,
> >
> > Jeff
> >
> > --
> > Jochen "Jeff" Rick, Ph.D.
> > http://www.je77.com/
> > Skype ID: jochenrick
> >
> >
> >
> > --
> > Best regards,
> > Igor Stasenko.
>
>    --
> Jochen "Jeff" Rick, Ph.D.
> http://www.je77.com/
> Skype ID: jochenrick
>
>


-- 
Best regards,
Igor Stasenko.

Reply via email to