将属性应用于多个元素 [英] Applying attributes to more than one element

查看:93
本文介绍了将属性应用于多个元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果可以将单个ATTLIST应用于XML中的多个元素?实际上,我想知道是否有任何机制来定义全局属性。如果不可能,有哪些替代解决方案?

解决方案

是的,这是可能的。看一下这篇文章:公共属性 [ ^ ]



Quote:

提供一组属性,可以放在文档类型中的所有或大多数元素上。


If this is possible to have a single ATTLIST that applies to more than one element in XML? In fact, I want to know if there is any mechanism to define global attributes. If it's not possible, what are the alternative solutions?

解决方案

Yes, it is possible. Take a look at this article: Common Attributes[^]

Quote:

Provide a set of attributes that can be placed on all, or most, elements in the document type.


这篇关于将属性应用于多个元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆