xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jane Singer" <jsin...@cc.huji.ac.il>
Subject W3C "valid" SVG documents
Date Mon, 13 Jan 2003 18:41:28 GMT

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

          SVGdoc =  df.createDocument(uri);
        } catch (java.io.IOException ioe) {

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"
<svg width="600" height="800" viewBox="-10 30 120 80"  >


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"
     contentStyleType="text/css" viewBox="-10 30 120 80" height="800"
     preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg"

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.


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

View raw message