|
-
Sep 15th, 2004, 03:41 AM
#1
Thread Starter
Fanatic Member
XSD question: Optional Elements...
I have the following XSD code:
Code:
<xs:element name="Job" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Element1" type="xs:string"/>
<xs:element name="Element2" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
I'm trying to make the first element compulsory and the second element optional. But when I validate documents against this schema that do not contain <Element2>, I get a validation error claiming that a required element is missing...
Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment. 
-
Sep 15th, 2004, 03:53 AM
#2
Thread Starter
Fanatic Member
Oh, don't worry...it does seem to work now...
Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|