Error with Loading simple xml data

Hello,

I defined a schema withe the schema editor:


<?xml version = "1.0" encoding = "UTF-8"?>
<xs:schema xmlns:xs = “http://www.w3.org/2001/XMLSchema” xmlns:tsd = “http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition”>
xs:annotation
xs:appinfo
<tsd:schemaInfo name = “GlassSchema”>
<tsd:collection name = “Glass”></tsd:collection>
<tsd:doctype name = “Glass”>
tsd:logical
tsd:contentopen</tsd:content>
</tsd:logical>
tsd:physical</tsd:physical>
</tsd:doctype>
tsd:adminInfo
tsd:versionTSD3</tsd:version>
tsd:created2002-11-19T10:42:45.465+01:00</tsd:created>
tsd:modified2002-11-19T10:42:45.465+01:00</tsd:modified>
</tsd:adminInfo>
</tsd:schemaInfo>
</xs:appinfo>
</xs:annotation>
<xs:element name = “Glass”>
xs:complexType
<xs:choice minOccurs = “0” maxOccurs = “unbounded”>
<xs:element name = “ID”>
xs:annotation
xs:appinfo
tsd:elementInfo
tsd:physical
tsd:native
tsd:index
tsd:standard</tsd:standard>
</tsd:index>
</tsd:native>
</tsd:physical>
</tsd:elementInfo>
</xs:appinfo>
</xs:annotation>
<xs:complexType mixed = “true”></xs:complexType>
</xs:element>
<xs:element name = “Washed”>
xs:annotation
xs:appinfo
tsd:elementInfo
tsd:physical
tsd:native
tsd:index
tsd:standard</tsd:standard>
</tsd:index>
</tsd:native>
</tsd:physical>
</tsd:elementInfo>
</xs:appinfo>
</xs:annotation>
<xs:complexType mixed = “true”></xs:complexType>
</xs:element>
<xs:element name = “Capacity”>
xs:annotation
xs:appinfo
tsd:elementInfo
tsd:physical
tsd:native
tsd:index
tsd:standard</tsd:standard>
</tsd:index>
</tsd:native>
</tsd:physical>
</tsd:elementInfo>
</xs:appinfo>
</xs:annotation>
<xs:complexType mixed = “true”></xs:complexType>
</xs:element>
<xs:element name = “NBar”>
xs:annotation
xs:appinfo
tsd:elementInfo
tsd:physical
tsd:native
tsd:index
tsd:standard</tsd:standard>
</tsd:index>
</tsd:native>
</tsd:physical>
</tsd:elementInfo>
</xs:appinfo>
</xs:annotation>
<xs:complexType mixed = “true”></xs:complexType>
</xs:element>
<xs:element name = “NbreTirage”>
xs:annotation
xs:appinfo
tsd:elementInfo
tsd:physical
tsd:native
tsd:index
tsd:standard</tsd:standard>
</tsd:index>
</tsd:native>
</tsd:physical>
</tsd:elementInfo>
</xs:appinfo>
</xs:annotation>
<xs:complexType mixed = “true”></xs:complexType>
</xs:element>
<xs:element name = “Brand”>
xs:annotation
xs:appinfo
tsd:elementInfo
tsd:physical
tsd:native
tsd:index
tsd:standard</tsd:standard>
</tsd:index>
</tsd:native>
</tsd:physical>
</tsd:elementInfo>
</xs:appinfo>
</xs:annotation>
<xs:complexType mixed = “true”></xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>


After I wanted to store a simple record in the database with interactive Interface:

<?xml version="1.0" encoding="ISO-8859-1"?>

127
1
3
1
12
Heineken



But the following message appear:

<?xml version="1.0" encoding="iso-8859-1" ?>
- <ino:response xmlns:ino=“http://namespaces.softwareag.com/tamino/response2” xmlns:xql=“http://metalab.unc.edu/xql/”>
- <ino:message ino:returnvalue=“0”>
ino:messagelinedocument processing started</ino:messageline>
</ino:message>
<ino:object ino:collection=“Glass” ino:doctype=“Glass” ino:id=“1” />
- <ino:message ino:returnvalue=“8718”>
<ino:messagetext ino:code=“INOXPE8718”>Document incomplete</ino:messagetext>
</ino:message>
</ino:response>

All the required data are indicated in the xml but program says it’s incomplete… What’s the problem?

Hope someone helps me!
Dave

Dave Vuistiner
HEVs, Sion / Switzerland

Hi Dave,

What’s strange about your problem is that you get an ino:id and an error INOXPE8718 in the same response. Can you run a query and see the stored document (eg http://localhost/tamino/db/Glass?_XQL=Glass[@ino:id=1]). If so, what elements of the document are missing (if any).

I tried unsuccessfully to repro your problem on Tamino 3114 and 3121 - they both worked fine.

Can you please post the exact schema you are using (please attach your tsd file) and the exact xml instance (attached as a file), and tell us what version of Tamino you use on which platform.

Many thanks

Your schema defines an element as “NBar”,
while your document instance has an element “Nbar”.

Well spotted Finn (I missed that), but the schema also defines open content (tsd:contentopen</tsd:content> ) so shouldn’t this content still be valid? If I change the doctype to closed content I get error:

<ino:messagetext ino:code=“INOXDE7732”>(cvc-model-group.2):invalid choice</ino:messagetext>
ino:messagelineLine 6, Column 1: [element “Nbar” in element “Glass”]</ino:messageline>

if I try to store the instance, and no instance is stored. So we’re not there yet?

OK - I missed THAT point !
I can repro if I make an XML-file with the original doc. and then copy this again, and afterwards removes the end tag .
I.e. two docs and the last one with missing end tag - then I get the message:

<?xml version="1.0" encoding="iso-8859-1" ?>
- <ino:response xmlns:ino=“http://namespaces.softwareag.com/tamino/response2” xmlns:xql=“http://metalab.unc.edu/xql/”>
- <ino:message ino:returnvalue=“0”>
ino:messagelinedocument processing started</ino:messageline>
</ino:message>
<ino:object ino:collection=“Glass” ino:doctype=“Glass” ino:id=“2” />
- <ino:message ino:returnvalue=“8718”>
<ino:messagetext ino:code=“INOXPE8718”>Document incomplete</ino:messagetext>
</ino:message>
</ino:response>

I try to change Nbar to NBar but it still the same problem.

I’ve attached my schema and my XML instance.

Thanks.

Dave Vuistiner
HEVs, Sion / Switzerland
GlassSchema.tsd (4.06 KB)

XML instance

Dave Vuistiner
HEVs, Sion / Switzerland
Glass.xml (203 Bytes)

I’ve found with with help of the last reply message: In the end of the XML file was a space char (or anything else). After the removing of this, it works. Strange no? Does the loader not remove automatically this type of char?

Dave Vuistiner
HEVs, Sion / Switzerland