Hello,
i am tryimg to make working example of schema object reference for few days but no success… i started with example described in documentation - collaboration…
(…taminodoc/advconc/DocumentComposition.htm)
Since the schema editor shipped with tamino needs a lot of patience to use, i downloaded last XML spy from altova. But even after enabling tamino there is no trace of collectionRef or nodeRefoperator propreties… so i have to use shipped editor or even worse - regular text editor…
So as a first step i tried to make the working collaboration schema.
in the doc there is only small fragment, so i tried this:
<?xml version = "1.0" encoding = "UTF-8"?>
<xs:schema xmlns:tsd = “http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition” xmlns:xs = “XML Schema”>
xs:annotation
xs:appinfo
<tsd:schemaInfo name = “collaboration”>
<tsd:collection name = “encyclopedia”></tsd:collection>
<tsd:doctype name = “collaboration”>
tsd:logical
tsd:contentclosed</tsd:content>
</tsd:logical>
</tsd:doctype>
tsd:adminInfo
tsd:created2004-09-01T11:11:32.232+01:00</tsd:created>
tsd:modified2004-09-01T11:11:32.232+01:00</tsd:modified>
tsd:versionTSD4</tsd:version>
tsd:server4.1.4.1</tsd:server>
</tsd:adminInfo>
</tsd:schemaInfo>
</xs:appinfo>
</xs:annotation>
<xs:element name = “collaboration”>
xs:complexType
xs:sequence
<xs:element name = “name” type = “xs:NMTOKEN”></xs:element>
xs:choice
<xs:element name = “performedAt”>
xs:complexType
xs:all
<xs:element name = “location” type = “xs:normalizedString”></xs:element>
<xs:element name = “time” type = “xs:dateTime”></xs:element>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name = “period”>
xs:complexType
xs:sequence
<xs:element name = “from” type = “xs:date”></xs:element>
<xs:element name = “to” type = “xs:date”></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
<xs:element name = “jazzMusician”>
<xs:attribute name = “ID” type = “xs:NMTOKEN” use = “required”>
tsd:physical
tsd:native
tsd:index
</tsd:standard/>
</tsd:index>
tsd:objectRef
tsd:collectionRefencyclopedia</tsd:collectionRef>
<tsd:accessPredicate operator = “=”>
tsd:nodeRefjazzMusician/@ID</tsd:nodeRef>
</tsd:accessPredicate>
</tsd:objectRef>
</tsd:native>
</tsd:physical>
</xs:attribute>
</xs:element>
<xs:element name = “result” type = “xs:NMTOKEN” minOccurs = “0” maxOccurs = “unbounded”></xs:element>
</xs:sequence>
<xs:attribute name = “type” use = “required”>
xs:simpleType
<xs:restriction base = “xs:NMTOKEN”>
<xs:enumeration value = “jamSession”></xs:enumeration>
<xs:enumeration value = “project”></xs:enumeration>
<xs:enumeration value = “band”></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
When trying to validate schema i get error:
s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than xs:appinfo and xs:documentation. Saw ‘encyclopedia’.
s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than xs:appinfo and xs:documentation. Saw ‘jazzMusician/@ID’.
s4s-elt-must-match: The content of ‘jazzMusician’ must match (annotation?, (simpleType | complexType)?, (unique | key | keyref)*)).
The screen for physycal propreties in docs is also bit different than the one in schema editor…
Does anyone has some experience of using this approach (static references) especialy concerning updates (i should do this by the mid tier app.)
and maintaing the consistency of ID-s through in an application?
Regards, Pavel
va-s!
#API-Management#webMethods#Tamino