xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Hardy <vincent.ha...@sun.com>
Subject Re: Fw: W3C "valid" SVG documents
Date Thu, 23 Jan 2003 17:55:52 GMT
Hello Jane,

OK, my mistake. I was aware of a validator effort, but I did not know it 
was online, sorry for the confusion.

To get back to your question, could you say what error message you get 
from the validator? In your message, you indicated that the issue came 
from the 'extra' attributes you got after loading and then outputing 
your document. What method do you use to write out your document? The 
extra values are attributes which take their default value (e.g., 
contentScriptType) or namespace declaration. These should not cause a 
problem, but they seem to, so the error message would help.

Vincent.

Jane Singer wrote:
> On this page they claim it validates SVG:
> http://validator.w3.org/whatsnew.html
> 
> ----- Original Message -----
> From: "Vincent Hardy" <vincent.hardy@sun.com>
> To: "Batik Users" <batik-users@xml.apache.org>
> Sent: Wednesday, January 22, 2003 10:19 PM
> Subject: Re: Fw: W3C "valid" SVG documents
> 
> 
> 
>>Hello Jane,
>>
>>The W3C validator is for CSS, HTML or Links validation and I do not
>>think they'll operate on SVG files. The SVGDocumentFactory creates a DOM
>>conformant objects. If you are trying to mix DOM nodes from two
>>different implementations, then you will run into issues.
>>
>>Vincent.
>>
>>Jane Singer wrote:
>>
>>>I
>>>[I sent a copy of this yesterday to the list, and still don't see it.
>>
> Sorry
> 
>>>if it arrives twice.]
>>>
>>>I typed that </xml> end tag into the example by mistake, it is not in
>>
> the
> 
>>>document.
>>>
>>>I guess my general question is, are the documents created by the
>>>org.apache.batik.dom.svg.SVGDocumentFactory valid W3C svg documents?
>>> I'm having a lot of trouble combining W3C component with those created
>>
> by
> 
>>>batik and others. It seems most of my problems have to do with the order
>>
> I
> 
>>>list things in the classpath.
>>>Jane
>>>
>>>
>>>>----- Original Message -----
>>>>From: "Vincent Hardy" <vincent.hardy@sun.com>
>>>>To: "Batik Users" <batik-users@xml.apache.org>
>>>>Sent: Wednesday, January 15, 2003 7:52 AM
>>>>Subject: Re: W3C "valid" SVG documents
>>>>
>>>>
>>>>
>>>>
>>>>>Hello Jane,
>>>>>
>>>>>Try your file without the trailing </xml>. It should work better.
>>>>>Vincent.
>>>>>
>>>>>Jane Singer wrote:
>>>>>
>>>>>
>>>>>>Hello,
>>>>>>
>>>>>>I'm creating an SVG file by importing a basic SVG document (along
with
>>>>>
>>>a
>>>
>>>
>>>>lot
>>>>
>>>>
>>>>>>of <def> elements), then appending various graphic, text and
use
>>>>>
>>>>elements,
>>>>
>>>>
>>>>>>using the various defs.
>>>>>>
>>>>>>I created the file like this:
>>>>>>
>>>>>>File file = new File("F:\\input_output\\basic_document.svg");
>>>>>>   try {
>>>>>>         String uri = file.toURL().toString();
>>>>>>         SVGDocumentFactory df  =
>>>>>>         new SAXSVGDocumentFactory
>>>>>>         ("org.apache.crimson.parser.XMLReaderImpl");
>>>>>>
>>>>>>         SVGdoc =  df.createDocument(uri);
>>>>>>       } catch (java.io.IOException ioe) {
>>>>>>       ioe.printStackTrace();
>>>>>>   }
>>>>>>
>>>>>>The imported file has a structure like this:
>>>>>>
>>>>>><?xml version="1.0" encoding="UTF-8" standalone="no"?>
>>>>>><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
>>>>>>"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
>>>>>><svg width="600" height="800" viewBox="-10 30 120 80"  >
>>>>>>
>>>>>><defs>
>>>>>>.
>>>>>>.
>>>>>>.
>>>>>></defs>
>>>>>></svg>
>>>>>></xml>
>>>>>>
>>>>>>However, when I try to validate the document at the W3C site
>>>>>>(http://validator.w3.org/check), I get an error. The problem is an
>>>>>
>>>>element
>>>>
>>>>
>>>>>>that gets inserted right before the defs element:
>>>>>><svg contentScriptType="text/ecmascript"
>>>>>>    xmlns:xlink="http://www.w3.org/1999/xlink" width="600"
>>>>>>zoomAndPan="magnify"
>>>>>>    contentStyleType="text/css" viewBox="-10 30 120 80" height="800"
>>>>>>    preserveAspectRatio="xMidYMid meet"
>>>>>
>>>>xmlns="http://www.w3.org/2000/svg"
>>>>
>>>>
>>>>>>    version="1.0">
>>>>>>
>>>>>>I'm not sure how this gets inserted. The document validates fine when
>>>>>
>>>I
>>>
>>>
>>>>>>remove it. What is going on?
>>>>>>
>>>>>>(I am also getting errors when I try to view it in JSVGCanvas, which
>>>>>
>>>is
>>>
>>>
>>>>why
>>>>
>>>>
>>>>>>I thought to validate it.)
>>>>>>
>>>>>>Thanks for any tips.
>>>>>>
>>>>>>Jane
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>---------------------------------------------------------------------
>>>>>>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
>>>>>
>>>>>
>>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>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
>>
>>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message