Redian新闻
>
Help: Several questions on XML
avatar
Help: Several questions on XML# XML - WWW明日之星
l*y
1
1. Is there any kind of "polymorphism" in XML like
in Java? Can type substitution do this?
2. Having defined an XML schema(*.xsd), How can I
validate my XML instance file using any XML parser?
I am using SAX parser.
3. And given a *.xsd file, if I want to define any
instance file, I can use the global element and
global attribute. Can I directly use the global types
(either simple or complex) defined in the schema?
Maybe the questions are trivial or not well stated, but
your help will be highly
avatar
l*y
2

Or I want to get the answer for a simple version of this: If I want to write
a schma named test2.xsd which includes all the elements defined in test1.xsd
and defined some more elements, but test2.xsd has changed the annotations of
the elements in test1.xsd, leaving the names and types unchanged. Now, can I
just simply import the namespace of test1.xsd in test2.xsd and only define the
extra elements? The changes on annotations will not make any difference in
using the schemas. Is that correct?

【在 l***y 的大作中提到】
: 1. Is there any kind of "polymorphism" in XML like
: in Java? Can type substitution do this?
: 2. Having defined an XML schema(*.xsd), How can I
: validate my XML instance file using any XML parser?
: I am using SAX parser.
: 3. And given a *.xsd file, if I want to define any
: instance file, I can use the global element and
: global attribute. Can I directly use the global types
: (either simple or complex) defined in the schema?
: Maybe the questions are trivial or not well stated, but

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。