You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Cory Sanoy <Co...@smarttech.com> on 2002/08/20 21:41:13 UTC

Bug in transcoder.

I checked the bugs database and this does not seem to be listed. The problem
is with the transcoder. When transcoding a document with a style tag:

<style type="text/css"> 

the transcoder inserts xml:space tags into the style element:

<style xml:space="preserve" type="text/css" xml:space="preserve">

when the document is parsed back in via:  

    StringReader reader = new StringReader(docString);
    String parser = XMLResourceDescriptor.getXMLParserClassName();
    SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
    Document document = f.createDocument(uRI, reader);

The parser throws an exception complaining that xml:space is defined more
than once.

To get arround the problem I simple replace the erroneous style element with
the original style element and the parser works correctly.

Is there a better way of doing this? Perhaps I should be using a different
parser??

/Cory

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


Re: Bug in transcoder.

Posted by Vincent Hardy <vi...@sun.com>.
Cory,

Could you send more details telling us what you are doing exactly with 
the transcoders?

Thanks,
Vincent.

Cory Sanoy wrote:
> I checked the bugs database and this does not seem to be listed. The problem
> is with the transcoder. When transcoding a document with a style tag:
> 
> <style type="text/css"> 
> 
> the transcoder inserts xml:space tags into the style element:
> 
> <style xml:space="preserve" type="text/css" xml:space="preserve">
> 
> when the document is parsed back in via:  
> 
>     StringReader reader = new StringReader(docString);
>     String parser = XMLResourceDescriptor.getXMLParserClassName();
>     SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
>     Document document = f.createDocument(uRI, reader);
> 
> The parser throws an exception complaining that xml:space is defined more
> than once.
> 
> To get arround the problem I simple replace the erroneous style element with
> the original style element and the parser works correctly.
> 
> Is there a better way of doing this? Perhaps I should be using a different
> parser??
> 
> /Cory
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 



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