Why nxs:stringList isn't resolve in my_schema.xsd ?
Hello,
Here is my_schema.xsd :
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://my_company/schemas/nuxeo/"
xmlns:enacCommon="http://my_company/schemas/nuxeo/"
xmlns:nxs="http://www.nuxeo.org/ecm/schemas/common/">
<xs:include schemaLocation="base.xsd" />
<xs:element name="intext" type="xs:string" />
<xs:element name="site" type="nxs:stringList" />
</xs:schema>
Eclipse dit : src-resolve.4.2: Error resolving component 'nxs:stringList'. It was detected that 'nxs:stringList' is in namespace 'http://www.nuxeo.org/ecm/schemas/common/', but components from this namespace are not referenceable from schema document 'file:///chemin_vers_mon_pluggin/src/main/ resources/schemas/my_schema.xsd'. If this is the incorrect namespace, perhaps the prefix of 'nxs:stringList' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///chemin_vers_mon_pluggin/src/main/resources/schemas/ docDessinSPCET.xsd'.
And in run, nuxeo server says : 2012-11-08 15:47:17,075 ERROR [org.nuxeo.ecm.core.schema.XSDLoader] Error: undefined simple or complex type 'nxs:stringList' 2012-11-08 15:47:17,075 ERROR [org.nuxeo.ecm.core.schema.TypeService] org.xml.sax.SAXParseException; systemId: file:/chemin_de_mon_installation/nuxeo-cap-5.6-tomcat-sdk/nxserver//schemas/docDessinSPCET.xsd; lineNumber: 8; columnNumber: 51; undefined simple or complex type 'nxs:stringList'
Someone has an idea ?
Thanks !
Your xmlns:nxs
must be the same as your targetNamespace
, as the xs:include
does not bring in the included file's namespace.
Sorry but i don't understand very well, I put the same xmlns:nxs and targetNamespace so for example :
targetNamespace="http://www.nuxeo.org/ecm/schemas/common/"
xmlns:nxs="http://www.nuxeo.org/ecm/schemas/common/">
But it seems that the include is bad ? I think that I have to modify the schemaLocation but how ? I have to import the file base.xsd into my pluggin from the sources of nuxeo 5.6 ? Or I have to modify the path to the file base.xsd ad if yes, with which path ?
<xs:include schemaLocation="which_path?/base.xsd" />
Of course, if I add the lines of the type's definition found in base.xsd of nuxeo 5.6, it's ok :
<xs:complexType name="stringList">
<xs:sequence>
<xs:element name="item" type="xs:string" minOccurs="0"
maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
Thansk for your response.