finally simple xml (camera.xsd resides on com/xml):
I'm getting this error message when trying to validate the xml file.
error: src-resolve: Cannot resolve the name 'nikon:body' to a(n) 'type definition' component.
Can someone please help me out ?
Joined: Jan 18, 2011
To make it works, there are changes on each of the document.
 sample xml
[1.1] The body node and its children are lived in the namespace of http://www.nikon.com. As such they are living in http://www.camera.org namespace which is clearly not the intention. I set it up with a default namespace attached to body, that requires less labour and clearer. If you want an explicit prefix, you've to declared it in the root or at the body and then qualify the names body and description with the prefix.
[2.1] The line referring to the body is clearly problematic. In the Nikon.xsd, there is no type named nikon:body scripted as a top element. It is only of that kind of structure that you can refer a type with type="nikon:body".
[2.2] Besides, the top level element is xsl:element of name "body" in the Nikon.xsd. Hence, to refer to that construction, in the camera.xsd with xsl:import, you should use "ref" attribute with the fully qualified name rather than anything else, like this.
[3.1] And then in the schema describing http://www.nikon.com namespace, you have to explicitly define the elementFormDefault attribute as qualified. The reason is more subtle. It is because, without, the child elements (such as xsd:element @name="description") hidden in the top element (xsd:element @name="body") would have some trouble in determining the namespace they are living in.
With the above changes, the setup would be working as intended.