问题描述
我尝试将 SVG XML Schema 导入EMF,获取ecore中的SVG元模型.但是,由于架构无效,导入失败:确实,svg.xsd 引用 XMLSchema.dtd,它本身引用 datatypes.dtd,不存在!
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!
因此,我尝试从 svg 网站下载必要的文件(svg.xsd、XMLSchema.dtd、xlink.xsd, xml.xsd),以及缺少的 datatypes.dtd,来自 另一个位置.但是,在验证架构时,我不断收到很多错误,例如
Error: XSD: An attribute reference may not have a type
Error: XSD: An <all> content model may not be nested within another content model
有谁知道我在哪里可以找到有效的 svg XML Schema,或实例在有效 svg 中序列化的 svg ecore 元模型?
推荐答案
您提到的 SVG XML Schema 来自 svg 的旧工作草案.目前没有官方支持的 SVG 1.1 的 XML 模式.SVG Tiny 1.2 确实提供了官方的 RelaxNG 模式(仅适用于 SVG Tiny 1.2,不适用于所有 SVG 1.1).对于 SVG 1.1,有一个 DTD 可用,但没有 XML 架构.
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.
参见 以前的讨论,并随时通过发送电子邮件至 www-svg@w3.org 加入讨论.
See previous discussions and feel free to join in the discussion by sending email to www-svg@w3.org.
这篇关于我在哪里可以找到有效的 SVG XML 模式(用于生成 ecore)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!