|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Loop in Schema defination
I have a XML structure where an element has two forms occuring at two levels.
<Collection> <MyObject> <DisplayTitle> Title Level 1 </DisplayTitle> <SubCollection> <MyObject> <DisplayTitle> Title Level 2 </DisplayTitle> </MyObject> <MyObject> ..... </MyObject> <MyOtherObject> Some Information </MyOtherObject> </SubCollection> </MyObject> <MyObject> ...... </MyObject> </Collection> If I define a schema for this structure I get two forms for MyObject: At Level 1 <xsd:element name="MyObject"> <xsd:complexType> <xsd:sequence> <xsd:element ref="DisplayTitle"/> <xsd:element ref="SubCollection" minOccurs='0' maxOccurs='1'/> </xsd:sequence> </xsd:complexType> </xsd:element> At Level 2 <xsd:element name="MyObject"> <xsd:complexType> <xsd:sequence> <xsd:element ref="DisplayTitle"/> </xsd:sequence> </xsd:complexType> </xsd:element> This causes the parser to fail. Suggestions please Chennaikar |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Loop in Schema defination |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|