Schema not found Error when loading XML File

Hi there, I defined a Schema in my Tamino DB, but now when I try to load an XML into the defined Collection i get an error message like this:

I cannot understand this, since the Doctype of the Schema is named “Mpeg7”. I changed the Schema Tag of the XML file a little bit so it refers to the right schema in the database, it looks like this:

and the first few lines of the Schema look like this:

so I really don’t get it, why this error occurs… i would attach the files but i cannot upload more data anymore… thanks, hauke

Hi, this very much looks like a namespace issue: it seems that the document you are trying to store does not properly define teh mpeg7 namespace as its default namespace regards Harald

Hi the answer is pretty simple: the (1) expanded QName of your document’s root element must match the (2) expanded QName of the doctype. Your data indicate that (1) = {}Mpeg7 // no URI as there is no xmlns="…" (2) = {urn:mpeg:mpeg7:schema:2001}Mpeg7 // because of xmlns:mpeg7 = “urn:mpeg:mpeg7:schema:2001” Hence, they do not match Regards Uli

Ok, that’s true. That couldn’t work. So now I got the same problem as I had before. The Namespace Poblem:

can you tell me how I can make the data type xsi:type available for this document? I tell you breifly how I defined the Schema: I did it like Trevor Ford suggested in this thread: http://tamino.forums.softwareag.com/viewtopic.php?t=3542 I took the provided Schema called xsi where the the attribute “type” was declared and defined it in my database. Then I defined the Mpeg7 Schema with the following lines at the top of the Schema:

and now when I try to load an XML File (with following lines in the begin of the document) into the DB I get this namespace error (datatype not declared):

this is how the MPEG-7 annotation tool provides the document, i haven’t modified anything to be sure not do any mistakes again. so the stated schema location is not correct. i would be so grateful, if you could tell me what i have to modify to be able to load this document into my db… thanks, hauke

Hi the document fragment <?xml version="1.0" encoding="iso-8859-1"?> references a type with QName {urn:mpeg:mpeg7:schema:2001}ContentEntityType Hence, there should be a schema which - has targetNamespace=“urn:mpeg:mpeg7:schema:2001” - contains a definition of a global type named “ContentEntityType” Regards Uli

i know. this “ContentEntityType” is declared in the Mpeg7 schema with the namespace “urn:mpeg:mpeg7:schema:2001”. and the attribute “type” is declared in another schema named “xsi” with the namespace “http://www.w3.org/2001/XMLSchema-instance” so therefore i tried to change the namespace declarations of the document which i want to upload like this:

the xsi schema is defined in the same collection. but somehow it doesn’t seem as if this xsi:type is available for this document. the error is the same. is that this right way to “import” the namespace for this document? is there a way that i can send you my schema and xml file, so you could have closer look at them…i am a little bit desperate? thanks, Hauke

Hi (1) you do not need a separate schema for the xsi:type attribute - the xsi-attributes are hardcoded into the Tamino validator (2) may be there is a bug with the default namespace to be used for the value of xsi:type in Tamino 4.2 - you might / should have a try with Tamino 4.4 which should do much better (3) you may upload your schemas / documents into the community Regards Uli

ok. i found out that the schema cannot work with the instance because there are some elements not declared which are used in the instance. this schema seems to be out of date… therefore i want to create a new one with the schema editor, but this is really complicated, since the tool freezes everytime i want to convert a specific schema into TSD. when I am using the command line tool i get an error message: Exception in Thread “main” java.lang.OutOfMemoryError so I am not able to convert the schema… i attached a .rar archive with the corresponding files. the one that makes the trouble is the file: mds-2001.xsd is there another way how to convert it without this error? thanks, hauke

I’m not aware of another method of conversion - however, when switching to Tamino 4.4 you probably won’t need any conversion at all.

Thanks for your help, I try to get that new Version. I am currently working on the starterkit version, since this is for a poject in connection with my final thesis at the Universtity. I got in touch with your agent for Universities to get a Test Version of the new 4.4 release. But it pobably takes a while. Since I am a little bit stressed out because of the project deadline I don’t have much time to lose. Do you think you could have a look at this file an try to convert it for me so I could work on that schema? I’m really desperate and can’t continue my work anymore…I would be so grateful. cheers Hauke

We’ve been hitting a similar problem with xsi:type (in Tamino 4.4). After a day experimenting, we can only get xsi:type to be recognized if the type is defined in the same namespace and the same schema document as the type it is restricting. All other combinations (different namespace or different schema document) give “Schema not found” in relation to the type named in xsi:type.

Hi Michael,

assume element has a reference via xsi:type to a derived type, DT.
Could it be that for DT defined in another namespace / schema, that the
schema was not “visible” via within the scope of the schema used for validation of ?

If not: please provide sample schemas if possible.

Best regards
Uli