xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas DeWeese <Thomas.DeWe...@Kodak.com>
Subject Re: svg attributes removed during parsing
Date Sun, 03 Apr 2005 17:39:37 GMT
Hi Fredik,

Fredrik.Medby.Hagen@idi.ntnu.no wrote:

> I'm having problem with attributes being removed during the svg-as-xml to
> SVGDocument parsing-process. The code below is used to create the
> SVGDocument from a String containing the svg in xml format. The attribute
> "marker-end" for tag "path" is lost (it isn't there when I serialize and
> print the SVGDocument) (example below).

    I can assure you that we don't randomly eat attributes ;)

    I would simply the document so you can make sure that
you don't have something silly like two copies of the
same element that might be confused when you serialize.

    Also the order of attributes might change so when you
write it out the marker-end attribute might be after the
'd' attribute which could be large.

> <path marker-end=\"url(#triangel)\" d=\"M 50 50 L 70 120\"/>

> Text when serializing and printing the SVGDocument:
> ---------------------------------------------------
> ...
> <path d=\"M 50 50 L 70 120\"/>

> Parse code:
> -----------
> SAXSVGDocumentFactory ssdf = new
> SAXSVGDocumentFactory(XMLResourceDescriptor.getXMLParserClassName());
> anSVGDocument = (SVGDocument)ssdf.createSVGDocument(null,new
> StringReader(xmlSvg));

    I don't see anything wrong here.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message