l***y 发帖数: 25 | 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 | l***y 发帖数: 25 | 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 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 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
|
|