Jump to content
AJBM

[Resolvido] XSD: definir limite mínimo para data

Recommended Posts

AJBM

Boas!

Eu tenho que fazer isto,Year – admites valores apenas a partir do ano de 1950, e não sei como fazer, para já tenho isto

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Song">
	<xs:complexType>
		<xs:sequence>
			<xs:element name= "Title">
				<xs:simpleType>
					<xs:restriction base="xs:string">
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name= "Year">
				<xs:simpleType>
					<xs:restriction base="xs:date">
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name= "Artist">
				<xs:simpleType>
					<xs:restriction base="xs:string">
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
</xs:element>
</xs:schema>

ja consegui :thumbsup:

<xs:minInclusive value="1950-01-01"></xs:minInclusive>

  • Vote 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.