Hi Sophia,
 
your schema is good and unmarshall should not produce exceptions.
Which version are you using? It is 0.9.3 try the CVS version, it should have
contain validation improvements.
 
Arnaud
-----Original Message-----
From: �ڽ��� [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 20, 2001 11:00 PM
To: [EMAIL PROTECTED]
Subject: [castor-dev] could you make my schema right???

I'd like to translate DTD to Schema...for using Castor.
 
so, I translated like below...
 
--------DTD--------
<!ELEMENT HTTP (Get | Post)+>
 
--------SCHEMA--------
    <xsd:element name="HTTP" minOccurs="1">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:choice minOccurs="1" maxOccurs="unbounded">
              <xsd:element name="Get" type="GetLink"/>
              <xsd:element name="Post" type="PostLink"/>
            </xsd:choice>
          </xsd:sequence> 
        </xsd:complexType>
      </xsd:element>
 
 
I have generated source code from xml schema using Castor.
and I got problem to using th source...
 
I think the DTD means,
<HTTP>
    <Get/>      -----------(1)
</HTTP>
 
or
 
<HTTP>
    <Post/>    -----------(2)
</HTTP>
 
or
 
<HTTP>
    <Get/>
    <Post/>
</HTTP>
 
but when I unmarshal (1) or (2) xml file, I got the exception...
that is Get and Post, both of them required field...
Did I make wrong Schema???
 
anybody help me...
 
 
regard,
sophia

Reply via email to