- From: <klawrenc@us.ibm.com>
- Date: Mon, 3 Apr 2000 13:31:53 -0500
- To: sdickson@savagesoftware.com (Steve Dickson)
- cc: www-svg@w3.org
>Some clarification please. Is it considered valid to embed entity >references within path and transform data? I'm thinking along the >following lines: > ><!ENTITY line "L 200 200"> ><!ENTITY trans "translate(100, 200)"> > ><svg width="640" height="480"> > <g transform = "&trans; rotate(30)"> > <path d = "M 400 400 &line; M 300 300 &line; z"/> > </g> ></svg> > >Can anyone point me to the relevant parts of the SVG/DOM specs that either >preclude or sanction these types of constructs? Failing that, can the >working group clarify whether this use of entity references is legal? Hello, This is really an XML question not an SVG question. As long as the XML processor uses an XML parser that expands entity references then it will never see the pre-expanded parameter entities. So yes, as a general rule, what you are trying should work. I took your example and made a "full" SVG file out of it and ran it through our SVGView viewer to check for errors and everything was fine (with the entities). Here is that file: <?xml version="1.0" standalone="no"?> <!DOCTYPE svg SYSTEM "svg-20000303-stylable.dtd" [ <!ENTITY line "L 200 200"> <!ENTITY trans "translate(100, 200)"> ]> <svg width="640" height="480"> <g transform = "&trans; rotate(30)"> <path d = "M 400 400 &line; M 300 300 &line; z"/> </g> </svg> Regards Kelvin Lawrence IBM
Received on Monday, 3 April 2000 14:51:13 UTC