(waves generally) On Friday, September 16, 2005, 8:02:36 PM, Thomas wrote:
TD> Jonathan Watt wrote: >> How about you only set the namespace for documents that have an SVG 1.0 >> doctype and a root 'svg' tag? TD> The namespace is already by the DTD if it references the SVG 1.0 TD> doctype. Its a #FIXED declaration in the DTD. That means, if the attribute value is supplied, it has to be the correct value. So that, if someone uses the DTD for validation, and they mistype the URI of the SVG namespace, they get a validation error. Its not there as a default attribute. It *used* to be, in SVG 1.0 up to Last Call or CR... checks ... We changed that due to CR feedback. We previously allowed validating, or non-validating but external DTD subset fetching, processors to infer it from the DTD. However, fetching the external DTD subset is optional, and content should not make assumptions about what the processor does there. Instead, we said it *had* to be put in the instance. Compare the 1.0 CR http://www.w3.org/TR/2000/CR-SVG-20001102/struct.html#NewDocumentOverview with the 1.0 Rec http://www.w3.org/TR/2001/REC-SVG-20010904/struct.html#NewDocumentOverview where we added (note the use of must) In all cases, for compliance with the "Namespaces in XML" Recommendation [XML-NS], an SVG namespace declaration must be provided so that all SVG elements are identified as belonging to the SVG namespace. The following are possible ways to provide a namespace declaration. An xmlns attribute without a namespace prefix could be specified on an 'svg' element, which means that SVG is the default namespace for all elements within the scope of the element with the xmlns attribute: <svg xmlns="http://www.w3.org/2000/svg"...> <rect .../> </svg> If a namespace prefix is specified on the xmlns attribute (e.g., xmlns:svg="http://www.w3.org/2000/svg"), then the corresponding namespace is not the default namespace, so an explicit namespace prefix must be assigned to the elements: <svg:svg xmlns:svg="http://www.w3.org/2000/svg"...> <svg:rect .../> </svg:svg> Namespace prefixes can be specified on ancestor elements (illustrated in the above example). For more information, refer to the "Namespaces in XML" Recommendation [XML-NS]. >>> [...] it looks like SVG 1.2 won't have a DTD produced for it I >>> suppose this would allow this "stricter" behaviour, either way. >> >> I think setting the namespace for new 1.2 content would be bad. It would be bad for 1.0, 1.1, or 1.2. I was surprised to see that Batik was non-conformant in this area - presumably because of the amount of older content out there (the famous "0303-stylable" DTD that Illustrator 9 used, for example). >> I think >> a 1.0 doctype should be required before doing this. TD> Well most/all of this discussion is about behavior when there TD> is no doctype, essentially a bare XML file: TD> <svg ...> TD> The only slightly odd thing is that the only reliable way in TD> this case to know that it is a 1.2 document is to check the 'version' TD> element on the outermost 'svg' element. Yes, the combination of the svg namespace, the version attribute, and the baseProfile attribute tells you what you are dealing with (eg SVG 1.2 Tiny). TD> So in some sense we will TD> treat this as an 'svg' element (by default in the 'svg' namespace) Why by default? What happens when the Sonic Valve Gasket markup language is styled with sXBL to create SVG? TD> until we notice that it is a "1.2" svg document at which point TD> we will refuse to render it (in other words we decide it isn't TD> an 'svg' document only after confirming that it is an svg 1.2 TD> document). This accomplishes the desired task (moving people TD> to always specifying the namespace) but from a pure logic perspective TD> is pretty ugly :/. >> Perhaps a 1.1 doctype too if you want to break with the standards >> for compatibility with existing content. TD> Why do you say Batik will "break with standards" if it treats TD> an SVG document with no namespace decl referring to the SVG 1.1 TD> DTD? Such content is non-conformant, as it fails to implement a conformance clause, specified with a must, in section 5.1.1 of the SVG 1.0 Recommendation. TD> I'm fairly certain the DTD does provide the xmlns decl. It does, but for validation (checking in case it is wrong) TD> Certainly, an implementation is free to read and follow the DTD TD> (even if DTD's are ugly ;). It is (and they are), but we moved default values for namespaces out of the DTD. -- Chris Lilley mailto:[EMAIL PROTECTED] Chair, W3C SVG Working Group W3C Graphics Activity Lead Co-Chair, W3C Hypertext CG --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]