W3C home > Mailing lists > Public > www-svg@w3.org > October 2005

RE: Validity Checking

From: Doug Schepers <doug@schepers.cc>
Date: Tue, 4 Oct 2005 01:28:19 -0400
To: "'www-svg'" <www-svg@w3.org>
Message-Id: <20051004052826.552CD149697@pillage.dreamhost.com>

Thanks, Chris. That was very helpful and informative. And normative.

Regards-
Doug

doug . schepers  @ vectoreal.com
www.vectoreal.com ...for scalable solutions.
 

Chris Lilley wrote:
| 
| On Monday, October 3, 2005, 10:27:55 PM, Doug wrote:
| 
| DS> Hi-
| 
| DS> I sent this to xml-dev@lists.xml.org, but got no reply, so I was 
| DS> hoping someone here could clarify.
| Your whole question hinges on "what does valid mean" and "is 
| valid the same as conformant". The answer to the second 
| question is 'no', and the answer to the first question is 'it 
| depends'.
| 
| 
| DS> I've been playing around with the <oXygen /> XML editor, 
| seeing how 
| DS> SVG-handy it is, and I've run into a question.
| 
| I use that editor as my main xml editor, for SVG and XHTML.
| 
| DS> I don't normally but DOCTYPE declarations in my SVG 
| files, since I 
| DS> declare the namespaces in the root
| 
| The two are unrelated - even if you have a DOCTYPE, you still 
| need to have namespace declarations in the instance to be 
| compliant SVG content.
| This is something that has always been the case for SVG Recs, 
| but was not the case in early pre-Rec SVG history.
| 
| DS> (and since it causes some
| DS> problems in script with import and parsing a file that 
| does have a 
| DS> DOCTYPE declaration).
| 
| really?
| 
| DS>  But the Oxygen editor says it's not valid if I don't 
| have one; in 
| DS> fact, it doesn't even recognize it as SVG.
| 
| oXygen can validate to a DTD, a W3C XML Schema, or to a 
| RelaxNG schema.
| If you don't have a DOCTYPE it can't find the DTD; if you 
| don't have an xsi:schemaLocation it can't find the W3C XML 
| Schema (unless you tell it where it is manually) and RelaxNG 
| does not even have a way to indicate the schema location in 
| the instance. oXygen gets around that one by adding an 
| oXygen-specific processing instruction that tells it where 
| the RelaxNG schema is.
| 
| DS> So, can anyone confirm or categorically deny that one needs the 
| DS> DOCTYPE declaration to have a valid SVG file?
| 
| To have one that is DTD valid, yes (but so what, he says 
| before Robin says it). To have conformant SVG content, no.
| 
| DS>  This is counter to what I have gleaned from the SVG Spec 
| (though I 
| DS> can't find a reference at the moment).
| 
| DS> Also, do I need a <?xml version="1.0" standalone="no"?> header,
| 
| If your XML is version 1.0
| AND
| your encoding is either UTF-8 or UTF-16
| 
| then you do not need an XML declaration (but you can still 
| have one and its probably good practice to state explicitly 
| what the version and encoding are).
| 
| If the encoding is anything else (Latin-1, etc) you *must* 
| have an xml declaration that says what the encoding is.
| 
| standalone is advisory and is only used for DTDs. 
| standalone="no" was used to indicate that the infoset 
| produced from parsing the external DTD subset would be 
| different to the infoset produced by not parsing the external 
| DTD subset.
| 
| You don't need it, its only a hint and it only relates to DTD 
| processing; also no software seems to make use of it and iits 
| undefined what it would do it it did make use of it.
| 
| DS> and if so, when? Oxygen doesn't care if I do or not, but 
| I just want 
| DS> to Do The Right Thing.
| 
| 
Received on Tuesday, 4 October 2005 05:29:37 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:31 GMT