Page 1 of 1

XML Schema Library Manager - Error

Posted: Tue Jan 07, 2014 2:12 pm
by Maximus_Jack
Hi
I tired to import few xsd files with the schema library manager , after it has been imported and validated, i'm seeing a lot of error as
"sch-props-correct.2: A schema cannot contain two global components with the same name; this schema contains two occurrences of ',Classification'."

I tried searching, but couldn't find any solution, any insights on this?

thanks
MJ

Posted: Tue Jan 07, 2014 2:44 pm
by josh.guffey
Consolidate the xsd files into a zip file and import the zip file as a "schema bundle". This should fix the issue assuming your xsd files have correct syntax.

Posted: Tue Jan 07, 2014 2:51 pm
by Maximus_Jack
Hi,
Thanks for your response

Tried that, but still facing the same error

thanks
MJ

Posted: Tue Jan 07, 2014 7:05 pm
by eostic
Hard to say --- as the previous poster suggests, sometimes strange errors in the library manager are simply because not "all" the required XSD's have been imported. Be sure you have all the parts and pieces.

Quite often, however, the problem is that the schema is indeed invalid. You might want to try running it thru xmlSpy or Oxygen XML or other XML Schema Design tools or various and sundry xsd validation web sites that you can find.

Ernie

Posted: Wed Jan 08, 2014 8:40 am
by Maximus_Jack
Hi
i'm sure, i have imported the entire list, is there any other way to approach this issue?

thanks
MJ

Posted: Wed Jan 08, 2014 8:45 am
by chulett
Work with whomever gave you the xsd, it sounds like it may actually be invalid.

Posted: Wed Jan 08, 2014 1:15 pm
by eostic
I can only guess at the moment, but it would sound like there might be conflicting namespaces among the documents for some of the global elements? ...or that the global elements are repeated? I haven't encountered this so I can't talk about a pattern, but in huge zip files I've imported, one generally sees a single xsd in there with the "global" things.....each of the other xsd's reference that one for such items that go across all of them.

Maybe this collection is repeating things that should otherwise be in a separate xsd that is included by all the others.... ?

Ernie

Posted: Wed Jan 08, 2014 4:00 pm
by Maximus_Jack
Hi All
I think i have figured it with some trial and error, before building a XML schema library, i think the first thing to do is to identify the XML schema flow,
i painstakingly found the schema flow of all the files and i created separate library for each particular tree, seems like a XML library is in place :) ,

how i found the XML schema flow is, i copied all the xsd's to unix and grep'ed for "Include" / "Import" in the xsd's, and i found the flow, is there any other tool out there to find the XML schema flow?

thanks
MJ

Posted: Wed Jan 08, 2014 10:17 pm
by eostic
There may be some good web-ware free tools out there......I use Oxygen XML, which is very complete, and I know folks who speak highly of XML Spy...not sure if either can figure out the problem you ran into, but they likely would be able to identify issues with conflicting elements.

Ernie