Hi! I’m currently working on a project where I have one schema and one pretty big .xml-file i want to import. Dunno if I’m doing something wrong, but i was hoping that each root-child-element (each -element, that is) would become it’s own instance with it’s own unique ID. Currently this only results in only one instance (cause of the doctype in the schema I guess) and if I query this datapool, and want to pick out every -element, they all have ino:id=1 This is my schema file, which I defined with my topics-collection in Tamino.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!--W3C Schema generated by XMLSpy v2005 rel. 3 U (http://www.altova.com)--> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tsd="http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:annotation> <xs:appinfo> <tsd:schemaInfo name="Topic_schema"> <tsd:collection name="topics" /> <tsd:doctype name="topicregistry"> <tsd:logical> <tsd:content>closed</tsd:content> </tsd:logical> </tsd:doctype> </tsd:schemaInfo> </xs:appinfo> </xs:annotation> <xs:element name="topic"> <xs:complexType> <xs:sequence> <xs:element ref="name"/> <xs:element ref="folionr" minOccurs="0" maxOccurs="unbounded"/> <xs:element ref="supercathegory" minOccurs="0"/> <xs:element ref="also" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="topicregistry"> <xs:complexType> <xs:sequence> <xs:element ref="topic" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="folionr" type="xs:string"/> <xs:element name="name" type="xs:string"/> <xs:element name="also" type="xs:string"/> <xs:element name="supercathegory" type="xs:string"/> </xs:schema>
This is an example of some of my .xml-file
<topicregistry> <topic> <name>almisse</name> <folionr>115</folionr> </topic> <topic> <name>allmuen</name> <folionr>75b</folionr> <folionr>80b</folionr> <folionr>100</folionr> <folionr>100b</folionr> <folionr>107</folionr> <folionr>107b</folionr> <folionr>115</folionr> <folionr>125</folionr> </topic> </topicregistry>
(the names have been translated into english, so any errors may be attributed to that, both schema and xml-file validates and is well-formed) Hope someone can help me