V
vardan
Hi everyone. I have couple problems with xsd file i'm trying to
create.
first question. is it possible to restrict year input to current year?
I mean i don't want to put
<xs:restriction base="xs:integer">
<xs:minInclusive value="1900" />
<xs:maxInclusive value="2007" />
second question. is it possible to make one of elements required or
optional depending on the value of the previous element? I realize i
can use "choice" indicator with 2 different elements, but may be there
is another way to do it.
thirs question is related to second. Is it possible to restrict the
value of the element to the value of the one of previous elements.
like
<xs:element name="id" minOccurs="1" type="xs:integer" />
....
<xs:element name="anotherId" minOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:integer">
<the value of 'anotherId' must be only one of values
entered in 'id' element>
</xs:restriction>
</xs:simpleType>
</xs:element>
sorry, if questions sound stupid. i'm new in xml schema.
may be the only way to fix this issues is to deal with them when
parsing xml docs.
thanks in advance for any help.
create.
first question. is it possible to restrict year input to current year?
I mean i don't want to put
<xs:restriction base="xs:integer">
<xs:minInclusive value="1900" />
<xs:maxInclusive value="2007" />
. is there any way to put getdate() or now() type functions.
second question. is it possible to make one of elements required or
optional depending on the value of the previous element? I realize i
can use "choice" indicator with 2 different elements, but may be there
is another way to do it.
thirs question is related to second. Is it possible to restrict the
value of the element to the value of the one of previous elements.
like
<xs:element name="id" minOccurs="1" type="xs:integer" />
....
<xs:element name="anotherId" minOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:integer">
<the value of 'anotherId' must be only one of values
entered in 'id' element>
</xs:restriction>
</xs:simpleType>
</xs:element>
sorry, if questions sound stupid. i'm new in xml schema.
may be the only way to fix this issues is to deal with them when
parsing xml docs.
thanks in advance for any help.