Where can I find a valid SVG XML Schema (for ecore generation)?

浪子不回头ぞ 提交于 2019-12-18 05:57:06

问题


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?


回答1:


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 www-svg@w3.org.



来源:https://stackoverflow.com/questions/3510986/where-can-i-find-a-valid-svg-xml-schema-for-ecore-generation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!