Am I right in thinking that...
1) in <redefine> I can either extend OR restrict a type but not both?
2) in <redefine> it's not possible to change a type from say
<xs:string> to <xs:integer>?
3) if I have schema1.xsd with
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefa ult="qualified"
targetNamespace ="http://www.cs.man.ac.u k/cnc/schema/gcf"
xmlns="http://www.cs.man.ac.u k/cnc/schema/gcf"
attributeFormDe fault="unqualif ied">
<xs:complexTy pe name="pname">
<xs:sequence>
<xs:element name="first" type="xs:intege r" />
<xs:element name="last" type="xs:string " />
</xs:sequence>
</xs:complexType>
<xs:element name="customer" type="pname" />
</xs:schema>
and then schema2.xsd redefines 'pname' viz:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefa ult="qualified"
targetNamespace ="http://www.cs.man.ac.u k/cnc/schema/gcf"
xmlns="http://www.cs.man.ac.u k/cnc/schema/gcf"
attributeFormDe fault="unqualif ied">
<xs:redefine schemaLocation= "redefined.xsd" >
<xs:complexTy pe name="pname">
<xs:complexCont ent>
<xs:extension base="pname">
<xs:sequence>
<xs:element name="country" />
</xs:sequence>
</xs:extension>
</xs:complexConte nt>
</xs:complexType>
</xs:redefine>
<xs:element name="author" type="pname" />
</xs:schema>
am I right in thinking that type 'pname' then has three child
elements, 'first', 'last' and 'country'? and therefore that 'author'
has these 3 fields? In which case, why does XMLspy (version 4.4) only
show 'author' with the original 2 fields? Is there a free equilavent
to XMLspy (particularly for graphical representation of schema)?
Many thanks!
Michael Bane
http://www.cs.man.ac.uk/~bane