An apparent batik failure

On Dec 20, 2005, at 10:02 PM, Cameron McCormack wrote:

>
> Hi Ray.
>
> Ray Whitmer:
>> My own recent experience with Batik was very negative.  When I edited
>> documents with inkscape and tried to get Batik to accept them, I had
>> to remove every xml namespace declaration and prefix use before I
>> could get it to work.  I wouldn't therefore even count Batik until it
>> can parse XML documents with xml namespace declarations and usages of
>> xml:space, for example, in them (and I think there were other things
>> broken as well).  I have no experience with ASV6.
>
> If you have specific examples of where you think Batik is broken could
> you please file a bug report or send mail to one of the mailing lists
> (or reply here) so it could be fixed, thanks.  I haven't had any
> problems loading namespace well-formed documents in Batik.

There is one simple example of well-formed xml being rejected because  
of the xml namespace declaration.  I cannot duplicate the sequence of  
things that caused inkscape to place the xmlns:xml declaration into  
the document header.  It is even possible I was editing a drawing  
from an older version or even slightly possible that I had added it  
myself trying to overcome errors being reported on the xml:space  
attributes.  I found internet archives of others who had experienced  
such problems as well.

This time, to try to dup the error, I manually added the xmlns:xml,  
which is legal according to section 3 of http://www.w3.org/TR/2004/ 
REC-xml-names11-20040204/ and is not disallowed by the 1.0 namespaces  
declaration.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
    xmlns:svg="http://www.w3.org/2000/svg"
    xmlns="http://www.w3.org/2000/svg"
    xmlns:xml="http://www.w3.org/XML/1998/namespace"
    id="svg2"
    height="1052.3622"
    width="744.09448"
    y="0.0000000"
    x="0.0000000"
    version="1.0">
   <defs
      id="defs3" />
   <g
      id="layer1">
     <text
        xml:space="preserve"
        id="text1291"
        style="font-size:144.00000;font-style:normal;font- 
variant:normal;font-weight:normal;font- 
stretch:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke- 
width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke- 
opacity:1.0000000;font-family:Bitstream Vera Sans;text- 
anchor:start;writing-mode:lr-tb"
        y="235.21933"
        x="97.14286"><tspan
          id="tspan1293"
          y="235.21933"
          x="97.14286">Test</tspan></text>
   </g>
</svg>

There were other stranger errors that I am not able to reproduce  
right now with this simple test graphic, but it was a many-hour  
ordeal getting a more-complex inkscape svg graphic to work in batik.   
I do not have a good test environment or samples set up for it right  
now.  Let me know if this does not fail for you. For what it is  
worth, the w3c validator at http://jiggles.w3.org/svgvalidator/  
failed in the same cases (failed so badly reasonable validation  
errors were not reported, so I do not consider it a properly-working  
validator).

In this particular test case, it is producing Illegal Namespace  
prefix: "xml", which should have been legal according to section 3 of  
http://www.w3.org/TR/2004/REC-xml-names11-20040204/ (which particular  
declaration I believe is compatible with the 1.0 namespaces spec,  
even if it is less-explicit).

I hope you can understand why I would be reluctant to compare the  
behavior of any batik DOM with this particular failure to accept the  
legal explicit xmlns:xml declaration.

Ray Whitmer

Received on Wednesday, 21 December 2005 14:31:28 UTC