Non deterministic Schema ..

X-Application Version: 3.1.1
Tamino Version : 3.1.1
Platform : NT, Win2k, Solaris, …
WebContainer : Tomcat 4.0.1
JDK Version : 1.3.1
Forte for Java Community edition : 3.0

Hello,

I am using Tamino for Forte to generate basic jsp code and modifying the looks to suit the need, how ever, not every thing works fine the create.jsp throws a Xapplication run time error
with message non-deterministic schema.
The search form how ever works fine.


Following is the stack trace.
Exception is: < X-Application Runtime Exception >
Exception error message:

Stacktrace is:


<InvalidSchemaException: schema is non-deterministic
com.softwareag.xtools.xapplication.businessdocument.InvalidSchemaException
schema is non-deterministic
at com.softwareag.xtools.xapplication.businessdocument.ContentParser.parseParticle(ContentParser.java:253)

Appreciate any help i can get.

Regards,
Amit
:slight_smile:

Hi Amit,

it would be of help, if you could post your schema. By this we would be able to give you concrete advice and maybe show you a workaround.

From the error message you posted, I refer that most probably the schema contains a choice containing an optional element.

If this is the case just turn the optional element into a non optional one and it should work.

I hope this helped you.

In any case it would be good for further investigations if you could post the schema.

Cheers

Stefan Schwalm
Software AG, Darmstadt

Hello Stefan,

The Schema is appeneded below, thanks for your time.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema ino:docname=“irithcoll/entryschema” ino:id=“15” xmlns:tsd=“http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition” xmlns:xs=“XML Schema”>
xs:annotation
xs:documentationIrish Resources in the Humanities DTD for use in Tamino


</xs:documentation>
xs:appinfo
<tsd:schemaInfo name=“entryschema”>
<tsd:collection name=“irithcoll”/>
<tsd:doctype name=“entry”>
tsd:logical
tsd:contentclosed</tsd:content>
</tsd:logical>
</tsd:doctype>
tsd:adminInfotsd:versionTSD3</tsd:version>tsd:created2002-03-15T17:46:16.213-05:00</tsd:created>tsd:modified2002-03-15T17:46:16.213-05:00</tsd:modified></tsd:adminInfo></tsd:schemaInfo>
</xs:appinfo>
</xs:annotation>
<xs:element name=“entry”>
xs:complexType
xs:sequence
<xs:element ref=“title”/>
<xs:element ref=“URI”/>
<xs:element ref=“abstract”/>
<xs:element ref=“date_added”/>
<xs:element maxOccurs=“unbounded” minOccurs=“0” ref=“email”/>
<xs:element maxOccurs=“unbounded” minOccurs=“0” ref=“bibl”/>
<xs:sequence maxOccurs=“unbounded” minOccurs=“0”>
<xs:element maxOccurs=“unbounded” minOccurs=“0” ref=“subject”/>
<xs:element maxOccurs=“unbounded” minOccurs=“0” ref=“event”/>
<xs:element maxOccurs=“unbounded” minOccurs=“0” ref=“resource”/>
<xs:element maxOccurs=“unbounded” minOccurs=“0” ref=“era”/>
<xs:element maxOccurs=“unbounded” minOccurs=“0” ref=“person”/>
</xs:sequence>
</xs:sequence>
<xs:attribute name=“id” type=“xs:ID”/>
</xs:complexType>
</xs:element>
<xs:element name=“title” type=“xs:string”/>
<xs:element name=“URI” type=“xs:string”/>
<xs:element name=“abstract” type=“xs:string”/>
<xs:element name=“date_added” type=“xs:string”/>
<xs:element name=“email” type=“xs:string”/>
<xs:element name=“bibl” type=“xs:string”/>
<xs:element name=“subject”>
xs:complexType
<xs:attribute name=“type”>
xs:simpleType
<xs:restriction base=“xs:NMTOKEN”>
<xs:enumeration value=“archaeology”/>
<xs:enumeration value=“architecture”/>
<xs:enumeration value=“art”/>
<xs:enumeration value=“biographical”/>
<xs:enumeration value=“geography”/>
<xs:enumeration value=“history”/>
<xs:enumeration value=“irish_language”/>
<xs:enumeration value=“literature”/>
<xs:enumeration value=“music”/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name=“event”>
xs:complexType
<xs:attribute name=“type”>
xs:simpleType
<xs:restriction base=“xs:NMTOKEN”>
<xs:enumeration value=“1798”/>
<xs:enumeration value=“the_famine”/>
<xs:enumeration value=“1916”/>
<xs:enumeration value=“the_troubles”/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name=“resource”>
xs:complexType
<xs:attribute name=“type”>
xs:simpleType
<xs:restriction base=“xs:NMTOKEN”>
<xs:enumeration value=“journal”/>
<xs:enumeration value=“newspaper”/>
<xs:enumeration value=“archive_library”/>
<xs:enumeration value=“reference_work”/>
<xs:enumeration value=“assoc_org”/>
<xs:enumeration value=“theatre”/>
<xs:enumeration value=“museum”/>
<xs:enumeration value=“primary_source”/>
<xs:enumeration value=“gateway”/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name=“era”>
xs:complexType
<xs:attribute name=“date”>
xs:simpleType
<xs:restriction base=“xs:NMTOKEN”>
<xs:enumeration value=“ancient”/>
<xs:enumeration value=“mediaeval”/>
<xs:enumeration value=“renaissance”/>
<xs:enumeration value=“1700s”/>
<xs:enumeration value=“1800s”/>
<xs:enumeration value=“1900s”/>
<xs:enumeration value=“2000s”/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name=“person” type=“xs:string”/>
</xs:schema>

regards
Amit

Hi Amit,

the critical part in your schema is the following:

code:
  
<xs:element name=“entry”>
xs:complexType
xs:sequence
<xs:element ref=“title”/>
<xs:element ref=“URI”/>
<xs:element ref=“abstract”/>
<xs:element ref=“date_added”/>
<xs:element maxOccurs=“unbounded” minOccurs=“0” ref=“email”/>
<xs:element maxOccurs=“unbounded” minOccurs=“0” ref=“bibl”/>
<xs:sequence maxOccurs=“unbounded” minOccurs=“0”>
<xs:element maxOccurs=“unbounded” minOccurs=“0” ref=“subject”/>
<xs:element maxOccurs=“unbounded” minOccurs=“0” ref=“event”/>
<xs:element maxOccurs=“unbounded” minOccurs=“0” ref=“resource”/>
<xs:element maxOccurs=“unbounded” minOccurs=“0” ref=“era”/>
<xs:element maxOccurs=“unbounded” minOccurs=“0” ref=“person”/>
</xs:sequence>
</xs:sequence>
<xs:attribute name=“id” type=“xs:ID”/>
</xs:complexType>
</xs:element>

I don’t want to go into details here, but the schema as you defined it is not a valid XML schema. The section in the schema defintion where this is described can be found here: Constraints on Model Group Schema Components.

You can turn your schema defintion into a valid one by giving the nested sequence a name. I attached the adapted schema to this post (the name for the sequence is nestedSequence)

I hope I could help you.

Thank you for your contribution

Stefan Schwalm
Software AG, Darmstadt
entryNEW.tsd (3.84 KB)

Thanks Stefan,
yes schema was the problem, i overlooked it was generated by schema editor from a dtd.

Regards
Amit