What I would really like to be able to do is have some mechanism like xsd complexType that I could then create a restriction on.
So in xml schema I know I can do something like this,
<xs:complexType name="codedValueDef">
<xs:annotation>
<xs:documentation> Defines that attributes used for coded values </xs:documentation>
</xs:annotation>
<xs:attribute name="code" use="required"/>
<xs:attribute name="codeSystem" use="required"/>
<xs:attribute name="displayName" use="required"/>
</xs:complexType>
And then use it more then once like so within the same schema.
<xsd:element name=”value” type="core:codedValueDef">
<xs:complexType >
<xs:complexContent >
<xs:restriction >
<xs:attribute name="codeSystem" use="require" fixed="111111"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xsd:element name=”value2” type="core:codedValueDef">
<xs:complexType >
<xs:complexContent >
<xs:restriction >
<xs:attribute name="codeSystem" use="require" fixed="222222"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:element>
Is there any way to do something similar to this in relax?
Thanks
Rob
On 7/1/09 1:05 AM, "MURATA Makoto (FAMILY Given)" <EB2M-MRT@...> wrote:
One way to overcome the problem is to use <define> as children of
<include>.
<include href="common.atts.rng>
<define name="foo">...</define>
....
</include>
Here this define statement overrides the define stantement in
common.atts.rng having the name "foo".
Cheers,
Makoto