首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >重新定义attributeGroup本身有什么效果吗?

重新定义attributeGroup本身有什么效果吗?
EN

Stack Overflow用户
提问于 2012-03-22 18:54:50
回答 1查看 216关注 0票数 0

XHTML basic1.1 (xhtml-basic11-modules-1.xsd file)的XML schema包含这样的重新定义:

代码语言:javascript
复制
<xs:redefine schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-image-1.xsd">
    <xs:annotation>
        <xs:documentation>
    Image module

    Elements defined here:
      * img
        </xs:documentation>
        <xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_imagemodule"/>
    </xs:annotation>
    <xs:attributeGroup name="xhtml.img.attlist">
        <xs:attributeGroup ref="xhtml.img.attlist">
            <xs:annotation>
                <xs:documentation>
            Original Image Attributes (in Image Module)
         </xs:documentation>
            </xs:annotation>
        </xs:attributeGroup>
    </xs:attributeGroup>
</xs:redefine>

这与简单地包含图像模块有什么不同吗?在我看来,它不会改变任何事情,但我不是XML Schema专家。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-03-25 07:05:20

我最初的回答是:

包括图像模块在内的

会将其中定义的所有内容都添加到模式中,而使用xsd:redefine时,只会导入attributeGroup xhtml.img.attlist

但事实并非如此-引用的模式中的所有内容都包含在内,因此答案似乎是没有理由使用该xsd:redefine

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9820866

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档