Element include the same element

I have a problem with loading data on tamino.

My Tamino Schema Definition contain an element division that include the same element division.

When i load an xml document on the database i have this error :

  <?xml version="1.0" encoding="windows-1252" ?> 
- <ino:response xmlns:ino="http://namespaces.softwareag.com/tamino/response2" xmlns:xql="http://metalab.unc.edu/xql/">
- <ino:message ino:returnvalue="0">
  <ino:messageline>document processing started</ino:messageline> 
  </ino:message>
- <ino:message ino:returnvalue="7740">
  <ino:messagetext ino:code="INOXDE7740">(cvc-complex-type.2.4): element child error</ino:messagetext> 
  <ino:messageline>Line 30, Column 62: Line 30, Column 62: [element "division" in element "division"]</ino:messageline> 
  </ino:message>
  </ino:response>



Can anyone say me if it’s possible to do this with the TSD Format ?

Thank you

Hello ramalho,

could you please post the schema and an example document for this problem?

Thanks,
Trevor.

The Tamino Schema Def :

[code]
<xs:complexType name=“Container”>
xs:choice
<xs:element name=“division” type=“gdb:Container” maxOccurs=“unbounded”/>
<xs:element name=“article” type=“gdb:Article” maxOccurs=“unbounded”/>
</xs:choice>
<xs:attribute name=“id”/>
<xs:attribute name=“title”/>
<xs:attribute name=“name” type=“xs:string” use=“required”/>
</xs:complexType>

Here the complexType “Container” contain an other element with the same type.


And an example of an xml :

  	
<division name=“title” title="Titre pr

Hello ramalho,

could you please post the full Tamino schema definition?

Thanks,
Trevor.

The TSD File :

[code]

<?xml version = "1.0" encoding = "UTF-8"?>

<xs:schema targetNamespace = “http://www.admin.ch/2004/GDBML” elementFormDefault = “qualified” xmlns:gdb = “http://www.admin.ch/2004/GDBML” xmlns:tsd = “http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition” xmlns:xs = “XML Schema”>
xs:annotation
xs:appinfo
<tsd:schemaInfo name = “LexSchema”>
<tsd:collection name = “Lex”></tsd:collection>
<tsd:doctype name = “gdb:laws”>
tsd:logical
tsd:contentclosed</tsd:content>
</tsd:logical>
</tsd:doctype>
</tsd:schemaInfo>
</xs:appinfo>
</xs:annotation>
xs:annotation
xs:documentation
===============================================================
CH-Gesetzesdatenbank XML Schema 1.0.2

	Namespace = http://www.admin.ch/2004/GDBML

	For further information, see: http://www.eif.ch/projets/CH-Gesetzesdatenbank

	Copyright (c) 2004 Mario Ramalho, MISL, All Rights Reserved.
	===============================================================
	</xs:documentation>

</xs:annotation>
<xs:element name = “laws”>
xs:annotation
xs:documentationRoot element of a law document</xs:documentation>
</xs:annotation>
xs:complexType
xs:sequence
<xs:element name = “head”>
xs:complexType
<xs:attribute name = “RS” type = “xs:int” use = “required”></xs:attribute>
<xs:attribute name = “title” type = “xs:string” use = “required”></xs:attribute>
<xs:attribute name = “abbreviation” type = “xs:string”></xs:attribute>
<xs:attribute name = “adoptiondate” type = “xs:date” use = “required”></xs:attribute>
<xs:attribute name = “conclusiondate” type = “xs:date”></xs:attribute>
<xs:attribute name = “ratificationdate” type = “xs:date”></xs:attribute>
<xs:attribute name = “entrydate” type = “xs:date”></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name = “preamble”>
xs:complexType
xs:sequence
<xs:element name = “writers” type = “xs:string” maxOccurs = “unbounded”></xs:element>
<xs:element name = “reference” maxOccurs = “unbounded”></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name = “body” type = “gdb:Body”></xs:element>
<xs:element name = “finalprovisions”></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
xs:annotation
xs:documentation
====================== Complex Type Definition ==========================
</xs:documentation>
</xs:annotation>
<xs:complexType name = “Container”>
xs:choice
<xs:element name = “division” type = “gdb:Container” maxOccurs = “unbounded”></xs:element>
<xs:element name = “article” type = “gdb:Article” maxOccurs = “unbounded”></xs:element>
</xs:choice>
<xs:attribute name = “id”></xs:attribute>
<xs:attribute name = “title”></xs:attribute>
<xs:attribute name = “name” type = “xs:string” use = “required”></xs:attribute>
</xs:complexType>
<xs:complexType name = “Body”>
xs:choice
<xs:element name = “division” type = “gdb:Container” maxOccurs = “unbounded”></xs:element>
<xs:element name = “article” type = “gdb:Article” maxOccurs = “unbounded”></xs:element>
</xs:choice>
</xs:complexType>
<xs:complexType name = “Article”>
xs:annotation
xs:documentation
====================== Article Definition ============================
Sample of article (french) :
Art. 641 A.El

Hello ramalho,

I think that the problem you are encountering is related to your document rather than your schema.
I was able to insert the following document into the schema that you posted:

[code]
<gdb:laws xmlns:gdb=“http://www.admin.ch/2004/GDBML”>
<gdb:head RS=“007” title=“title” adoptiondate=“2004-05-28” />
gdb:preamble
gdb:writers/
gdb:reference/
</gdb:preamble>
gdb:body
<gdb:division name=“title” title="Titre pr

Thank you!

That’s it…

Mario Ramalho