Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #1519 > unrolled thread
| Started by | Eduardo <eduzea@gmail.com> |
|---|---|
| First post | 2011-04-07 12:05 +0000 |
| Last post | 2011-04-08 08:13 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: WebMathematica and SVG graphics Eduardo <eduzea@gmail.com> - 2011-04-07 12:05 +0000
Re: WebMathematica and SVG graphics Alexey <lehin.p@gmail.com> - 2011-04-08 08:13 +0000
| From | Eduardo <eduzea@gmail.com> |
|---|---|
| Date | 2011-04-07 12:05 +0000 |
| Subject | Re: WebMathematica and SVG graphics |
| Message-ID | <ink9ai$g9q$1@smc.vnet.net> |
Thanks to all for the useful replies. Does anyone know if this behavior Alexey describes (Mathematica connecting to http://www.w3.org/ to evaluate XML`SVG`GraphicsToSymbolicSVG or ImportString[..., "XML"]), can be modified or configured? Thanks and regards, Eduardo.
[toc] | [next] | [standalone]
| From | Alexey <lehin.p@gmail.com> |
|---|---|
| Date | 2011-04-08 08:13 +0000 |
| Message-ID | <inmg2g$pt1$1@smc.vnet.net> |
| In reply to | #1519 |
Eduardo <eduzea@gmail.com> wrote:
> Thanks to all for the useful replies.
>
> Does anyone know if this behavior Alexey describes (Mathematica connecting to http://www.w3.org/to evaluate XML`SVG`GraphicsToSymbolicSVG or ImportString[..., "XML"]), can be modified or configured?
>
> Thanks and regards,
>
> Eduardo.
For preventing Internet requests you can use option "ReadDTD"->False
though the result will be slightly different:
In[1]:=
xml1=ImportString[ExportString[Plot[x^4,{x,0,1}],"SVG"],"XML",
"ReadDTD"->False];
xml2=ImportString[ExportString[Plot[x^4,{x,0,1}],"SVG"],"XML"];
xml1===xml2
Complement[xml2,xml1]
AppendTo[xml1,"Valid"->True]===xml2
Out[3]= False
Out[4]= XMLObject[Document][Valid->True]
Out[5]= True
Interestingly, there is another related option in the Documentation:
"AllowRemoteDTDAccess". But with this option ImportString fails:
ImportString[ExportString[Plot[x^4,{x,0,1}],"SVG"],"XML",
"AllowRemoteDTDAccess"->False];
XML`Parser`XMLGetString::prserr: StyleBox[RuntimeException:Could not
open
DTD file'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'
atLine:1Character:99,MT]
Both these options absent in Mathematica 5.2.
Alexey
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web