I tried importing the SVG XML Schema into EMF, to obtain the SVG metamodel in ecore. However, the import failed due to the schema not being valid: indeed, svg.xsd references XMLSchema.dtd, which itself references datatypes.dtd, which does not exist!
Consequently, I tried downloading the necessary files from the svg website (svg.xsd, XMLSchema.dtd, xlink.xsd, xml.xsd), and the missing datatypes.dtd, from another location. However, I keep getting many errors when validating the schema, e.g.
Error: XSD: An attribute reference may not have a type
Error: XSD: An <all> content model may not be nested within another content model
and so on.
Does anyone know where I could find a valid svg XML Schema, or an svg ecore metamodel whose instances are serialized in valid svg?
XML schema is a language which is used for expressing constraint about XML documents. There are so many schema languages which are used now a days for example Relax- NG and XSD (XML schema definition). An XML schema is used to define the structure of an XML document.
An XML Schema describes the structure of an XML document, just like a DTD. An XML document with correct syntax is called "Well Formed". An XML document validated against an XML Schema is both "Well Formed" and "Valid".
The SVG XML Schema you refer to is from an old working draft of svg. There's currently no officially supported XML schema for SVG 1.1. SVG Tiny 1.2 does provide an official RelaxNG schema (which is only for SVG Tiny 1.2, not for all of SVG 1.1). For SVG 1.1 there's a DTD available, but no XML schema.
See previous discussions and feel free to join in the discussion by sending email to [email protected].
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With