|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
recursive use tag doesn´t work in batik - in Firefox 3.5 it´s okhi,
i have an svg file which looks very similar like the one at the end of this message. when i load this with Firefox 3.5 everything looks like expected. But Batik only displays the file in the first use tag. The use tags inside the first one are ignored. Can anyone help me out of this ? <?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg version="1.2" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1849" height="2340" > <g transform="translate(0.0,2340) scale(1,-1)" style="overflow:visible;color:#000000;fill:none;stroke:currentColor;stroke-width:0.07"> <g transform="translate(100,100)"> <g transform="rotate(90,0,0) translate(0,-300)"> <use xlink:href="file:/C:/file1.svg" x="0" y="0"> <use xlink:href="file:/C:/file2.svg" x="0" y="0" transform="translate(8,232) rotate(0,0,0)"> <use xlink:href="file:/C:/file3.svg" x="0" y="0" transform="translate(130,-10) rotate(0,0,0)"/> </use> </use> </g> </g> </g> </svg> |
|
|
Re: recursive use tag doesn´t work in batik - in Firefox 3.5 it´s okHi Olaf,
> i have an svg file which looks very similar like the one at the end of this > message. > when i load this with Firefox 3.5 everything looks like expected. It's awkward to me that it works in Firefox, as far as I know the use element [1] should be empty and therefore no child content is expected... :-| > But Batik only displays the file in the first use tag. The use tags inside > the first > one are ignored. Can anyone help me out of this ? Just remove the nesting from your use elements. Basically, change those <use> <use> <use/> </use> </use> To something like: <use/> <use/> <use/> Hope this helps, Helder [1] http://www.w3.org/TR/SVG/struct.html#UseElement --------------------------------------------------------------------- To unsubscribe, e-mail: batik-users-unsubscribe@... For additional commands, e-mail: batik-users-help@... |
|
|
Re: recursive use tag doesn´t work in batik - in Firefox 3.5 it´s okHi Olaf,
Olaf Raether <o.raether@...> wrote on 10/21/2009 10:26:58 AM: > when i load this with Firefox 3.5 everything looks like expected. > But Batik only displays the file in the first use tag. The use tags inside > the first one are ignored. Can anyone help me out of this ? As Helder mentions the problem is the nested use elements. If you check the SVG standard it doesn't allow the use element to contain other graphical elements (http://www.w3.org/TR/SVG/struct.html#UseElement): <!ENTITY % SVG.use.content "(( %SVG.Description.class; )*, ( %SVG.Animation.class; %SVG.use.extra.content; )*)" > <!ELEMENT %SVG.use.qname; %SVG.use.content; > So a use element can have desc/title/metadata and animation elements as children. In fact you will get a validation error in Batik if you enable using a validating XML parser (and add appropriate DTD, etc): The content of element type "use" must match "(((desc,((title,metadata?)|(metadata,title?))?)|(title,((desc,metadata?)|(metadata,desc?))?)|(metadata,((desc,title?)|(title,desc?))?))?,(animate|set|animateMotion|animateColor|animateTransform)*)". |
|
|
Re: recursive use tag doesn´t work in batik - in Firefox 3.5 it´s oki modified my code and then it works - thanks.
i guess FF is a little bit more tolerant than batik - or incorrect, i don´t know. Modified file: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg version="1.2" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1849" height="2340" > <g transform="translate(0.0,2340) scale(1,-1)" style="overflow:visible;color:#000000;fill:none;stroke:currentColor;stroke-width:0.07"> <g transform="translate(100,100)"> <g transform="rotate(90,0,0) translate(0,-300)"> <g> <use xlink:href="file:/C:/file1.svg" x="0" y="0"/> <g transform="translate(8,232) rotate(0,0,0)"> <use xlink:href="file:/C:/file2.svg" x="0" y="0"/> <g transform="translate(90,-22) rotate(0,0,0)"> <use xlink:href="file:/C:/file3.svg" x="0" y="0"/> </g> </g> </g> </g> </g> </svg> |
|
|
Re: recursive use tag doesn´t work in batik - in Firefox 3.5 it´s okHi Olaf,
> i modified my code and then it works - thanks. Glad to know. :-) > i guess FF is a little bit more tolerant than batik - or incorrect, i don´t > know. It's not a matter of tolerance, it's a matter of conformance to the specification. ;-) I created a reduced test case and was about to file an issue in the Mozilla bug tracker when I noticed this fixed post Firefox 3.5 (tested with 3.6b1pre and 3.7a1pre nightly builds), so just wait until the next release or get a nightly build! :-) I'm attaching the reduced test case anyway, in case anyone wants to take a look or bumps into the same issue again. Regards, Helder --------------------------------------------------------------------- To unsubscribe, e-mail: batik-users-unsubscribe@... For additional commands, e-mail: batik-users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |