How to add some fields to dublincore.xsd
I'm trying to add some fields to dublincore.xsd but without success. I created two files and copied them under nxserver/config folder The files contain: dublincore.xsd
<xs:schema
targetNamespace="http://www.nuxeo.org/ecm/schemas/dublincore/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:nxs="http://www.nuxeo.org/ecm/schemas/dublincore/">
<xs:element name="note" type="xs:string" default="TEST"/>
<xs:element name="noteExtended" type="xs:string" default="TEST"/>
</xs:schema>
and extension point extend-dublincore-config.xml
<?xml version="1.0"?>
<component name="org.nuxeo.ecm.core.CoreExtensions.override">
<require>org.nuxeo.ecm.core.schema.TypeService</require>
<extension target="org.nuxeo.ecm.core.schema.TypeService" point="schema">
<schema name="dublincore" src="schemas/dublincore.xsd" />
</extension>
</component>
What's wrong? The fields in a REST AP are not visible
I think you should not touch dublincore as a core schema and add a new scheme attached to your document types. dublincore.xsd schema override is not suggested as it is used on dc:modified, creation etc. Why do not you follow the proposed way, declare another schema and attached it to anywhere you like.
Hi,
Schemas are not overridden by default, and you indeed need to make sure your contribution is deployed after the default one (and you do not need the require on the target extension point “org.nuxeo.ecm.core.schema.TypeService” as it is implicitly required).
Here's a sample configuration (not tested):
<?xml version="1.0"?>
<component name="org.nuxeo.ecm.core.CoreExtensions.override">
<require>org.nuxeo.ecm.core.CoreExtensions</require>
<extension target="org.nuxeo.ecm.core.schema.TypeService" point="schema">
<schema name="dublincore" src="schemas/dublincore.xsd" override="true" />
</extension>
</component>
2016-11-04 17:44:39,012 ERROR [localhost-startStop-1] [org.nuxeo.ecm.core.storage.FulltextConfiguration] Ignoring unknown property 'dc:title' in fulltext configuration: title 2016-11-04 17:44:39,012 ERROR [localhost-startStop-1] [org.nuxeo.ecm.core.storage.FulltextConfiguration] Ignoring unknown property 'dc:description' in fulltext configuration: description 2016-11-04 17:44:39,018 ERROR [localhost-startStop-1] [org.nuxeo.ecm.core.schema.PrefetchInfo] Prefetch field or schema 'dc:title' not found 2016-11-04 17:44:39,018 ERROR [localhost-startStop-1] [org.nuxeo.ecm.core.schema.PrefetchInfo] Prefetch field or schema 'dc:description' not found 2016-11-04 17:44:39,018 ERROR [localhost-startStop-1] [org.nuxeo.ecm.core.schema.PrefetchInfo] Prefetch field or schema 'dc:created' not found 2016-11-04 17:44:39,018 ERROR [localhost-startStop-1] [org.nuxeo.ecm.core.schema.PrefetchInfo] Prefetch field or schema 'dc:modified' not found 2016-11-04 17:44:39,018 ERROR [localhost-startStop-1] [org.nuxeo.ecm.core.schema.PrefetchInfo] Prefetch field or schema 'dc:lastContributor' not found 2016-11-04 17:44:39,018 ERROR [localhost-startStop-1] [org.nuxeo.ecm.core.schema.PrefetchInfo] Prefetch field or schema 'dc:creator' not found 2016-11-04 17:44:39,024 ERROR [localhost-startStop-1] [org.nuxeo.ecm.core.schema.PrefetchInfo] Prefetch field or schema 'dc:title' not found 2016-11-04 17:44:39,024 ERROR [localhost-startStop-1] [org.nuxeo.ecm.core.schema.PrefetchInfo] Prefetch field or schema 'dc:modified' not found
and server does not start