cancel
Showing results for 
Search instead for 
Did you mean: 

Do XML Schema imports in .xsd files have significance to Nuxeo?

Steven_Huwig1
Star Contributor
Star Contributor

I have a doctype in a Nuxeo extension like this:

<doctype name="CreativeWork" extends="File">
  <schema name="common" />
  <schema name="dublincore"/>
  <schema name="CreativeWork"/>
</doctype>

And an XML schema like this:

<?xml version="1.0" ?>
<xs:schema targetNamespace="http://schema.org/CreativeWork"
           xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:import namespace="http://schema.org/Thing" schemaLocation="Thing.xsd"/>
    ...

where the xs:import refers to another schema in the package.

My schemas and doctypes are available in Nuxeo—I checked by using nuxeo-doctypes-io—but I do not see any indication that the fields in Thing.xsd are available to documents with the CreativeWork doctype.

My guess is that Nuxeo does nothing with xs:import, and that if I wish to structure my custom document types like this, it should be done by adding the parent schemas to the doctype declaration. Is this guess correct?

1 ACCEPTED ANSWER

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

Hi,

Yes you can proceed like this, support of xs:import was added quite recently, it may not be supported depending on your version (added in 5.7.1, see NXP-10984).

If you're using Nuxeo 5.8, maybe it's configuration problem and the tests at the end of this commit could help? https://github.com/nuxeo/nuxeo-core/commit/c0687f3f0f94bae834eaa5e199ec9c495ab299fc

View answer in original post

4 REPLIES 4

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

Hi,

Yes you can proceed like this, support of xs:import was added quite recently, it may not be supported depending on your version (added in 5.7.1, see NXP-10984).

If you're using Nuxeo 5.8, maybe it's configuration problem and the tests at the end of this commit could help? https://github.com/nuxeo/nuxeo-core/commit/c0687f3f0f94bae834eaa5e199ec9c495ab299fc

Thanks again for your quick answer. I'm working on 5.8 and 5.9, so I'll check my work again to see if I made a mistake or misinterpreted what I was seeing.

@anahide-tchertchian

Hi,