You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by de...@apache.org on 2004/11/15 01:24:58 UTC

cvs commit: xml-batik/samples/tests/spec12/structure/opera/multires - New directory

deweese     2004/11/14 16:24:58

  xml-batik/samples/tests/spec12/structure/opera/multires - New directory

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


Re: Another example of failure Java SAX and SVG files

Posted by engineering <en...@energycontrolsystems.com>.
The attached file is compressed so rename it to caraminha.svgz.

On Mon, 2004-11-29 at 11:16, Alice Cavallo wrote:
> Thomas,
> 
> Running the same class for the attached SVG file that by the way I can
> not read in any editor (i get only special characters), gives me the
> following msg:
> 
> org.xml.sax.SAXParseException: Content is not allowed in prolog.
> 
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 
> 	at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
> 
> 	at javax.xml.parsers.SAXParser.parse(SAXParser.java:281)
> 
> 	at drawtool.ParseSVG.main(ParseSVG.java:154)
> 
> I don't remember anymore which application I used to generate this SVG
> file.
> 
> Thanks,
> Alice
> 
> ______________________________________________________________________
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-dev-help@xml.apache.org
-- 
Stan Dickerson
Product Development Engineer
Energy Control Systems
2940 Cole Court
Norcross, GA 30071

1-800-648-0970
770-448-0651
770-446-1319 fax


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


Another example of failure Java SAX and SVG files

Posted by Alice Cavallo <me...@media.mit.edu>.
Thomas,

Running the same class for the attached SVG file that by the way I can
not read in any editor (i get only special characters), gives me the
following msg:

org.xml.sax.SAXParseException: Content is not allowed in prolog.

	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

	at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)

	at javax.xml.parsers.SAXParser.parse(SAXParser.java:281)

	at drawtool.ParseSVG.main(ParseSVG.java:154)

I don't remember anymore which application I used to generate this SVG
file.

Thanks,
Alice

Re: Java SAX and SVG files

Posted by Alice Mello <me...@media.mit.edu>.
Tonny,

I was not successful in installing any of the converters you suggested 
on my laptop under XP.

As soon as I have more time, I will try again.

Thanks,
Alice


Tonny Kohar wrote:
> Hi,
> 
>>Do you suggest any free-ware that converts jpg to svg and  conform to
>>the SVG DTD? 
> 
> 
> Maybe you could try
> - PoTrace
> - AutoTrace
> - Delinate - front end for PoTrace and Autotrace
> 
> All those available at sourceforge.net
> 
> Regards
> Tonny Kohar



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


Re: Java SAX and SVG files

Posted by Tonny Kohar <to...@kiyut.com>.
Hi,
> Do you suggest any free-ware that converts jpg to svg and  conform to
> the SVG DTD? 

Maybe you could try
- PoTrace
- AutoTrace
- Delinate - front end for PoTrace and Autotrace

All those available at sourceforge.net

Regards
Tonny Kohar
-- 
Sketsa 
SVG Graphics Editor
http://www.kiyut.com



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


Re: Java SAX and SVG files

Posted by Thomas DeWeese <Th...@Kodak.com>.
Alice Cavallo wrote:

> I set factory.setValidating(false); 
> than the the SAx Parser gave me the right reading of the SVG file. But
> the error (below) showed up at the end. 

    I get this error if I have two <?xml ...> lines in my
Document.  As to your other sample file that was a gzip
compressed SVG file (it should have .svgz as it's extension).

> Hopufully when I add this class to my tool it won't make the 
> whole sapplication  crash.

    Well, hopefully you are catching exceptions and notifying the
user when problems are encountered.

> Do you suggest any free-ware that converts jpg to svg and  conform to
> the SVG DTD? 

   I've played with AutoTrace it did a decent job.  You might check
out:
	http://www.gy.com/Computer/CAD_and_CAM/Raster_to_Vector/

> I think the example I am using was a SVG created by WebDwarf V2.
> Error: 
> 
> org.xml.sax.SAXParseException: The processing instruction target
> matching "[xX][mM][lL]" is not allowed.




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


Re: Java SAX and SVG files

Posted by Alice Cavallo <me...@media.mit.edu>.
Thank you Thomas,

I set 
factory.setValidating(false); 
than the the SAx Parser gave me the right reading of the SVG file. But
the error (below) showed up at the end. Hopufully when I add this
class to my tool it won't make the whole sapplication  crash.
Do you suggest any free-ware that converts jpg to svg and  conform to
the SVG DTD? 
I think the example I am using was a SVG created by WebDwarf V2.
Error: 

org.xml.sax.SAXParseException: The processing instruction target
matching "[xX][mM][lL]" is not allowed.

	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

	at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)

	at javax.xml.parsers.SAXParser.parse(SAXParser.java:281)

	at drawtool.ParseSVG.main(ParseSVG.java:154)


Quoting Thomas DeWeese <Th...@Kodak.com>:

> Hi Alice,
> 
> Alice Cavallo wrote:
> 
> > I am trying to read and process SVG files from a Java
> application.
> > I am trying to use SAX, but there is some characters that are
> not
> > understood by SAX.
> > For example, the only way SaxParser could read properly the SVG
> file
> > (without any error and outputing the right information) was
> after
> > removing the following comment line :
> > 
> >  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
> > "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
> 
>     This probably indicates that the document doesn't conform to
> the SVG DTD.  Seeing the errors would help confirm this.
> 
> > Can I really read SVG using SaxParser? 
> 
>     Yes, this is exactly what Batik does.
> 
> > Any advice? 
> 
>     Either turn of validation or fix your content so it conforms
> to
> the DTD.
> 
> > I do need a generic
> > method to read any given SVG file and parse the tags and
> attributes.
> 
>     You could look at the Batik
> batik.dom.svg.SAXSVGDocumentFactory
> 
> > Thank you so much and I hope you all had good holidays (for the
> > american crew).
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-dev-help@xml.apache.org
> 




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


Re: Java SAX and SVG files

Posted by Thomas DeWeese <Th...@Kodak.com>.
Hi Alice,

Alice Cavallo wrote:

> I am trying to read and process SVG files from a Java application.
> I am trying to use SAX, but there is some characters that are not
> understood by SAX.
> For example, the only way SaxParser could read properly the SVG file
> (without any error and outputing the right information) was after
> removing the following comment line :
> 
>  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
> "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">

    This probably indicates that the document doesn't conform to
the SVG DTD.  Seeing the errors would help confirm this.

> Can I really read SVG using SaxParser? 

    Yes, this is exactly what Batik does.

> Any advice? 

    Either turn of validation or fix your content so it conforms to
the DTD.

> I do need a generic
> method to read any given SVG file and parse the tags and attributes.

    You could look at the Batik batik.dom.svg.SAXSVGDocumentFactory

> Thank you so much and I hope you all had good holidays (for the
> american crew).


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


Java SAX and SVG files

Posted by Alice Cavallo <me...@media.mit.edu>.
Hello all,

I am trying to read and process SVG files from a Java application.
I am trying to use SAX, but there is some characters that are not
understood by SAX.
For example, the only way SaxParser could read properly the SVG file
(without any error and outputing the right information) was after
removing the following comment line :

 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">

Can I really read SVG using SaxParser? Any advice? I do need a generic
method to read any given SVG file and parse the tags and attributes.

Thank you so much and I hope you all had good holidays (for the
american crew).

Alice

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