How to add some fields to dublincore.xsd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-04-2016 11:34 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-04-2016 11:41 AM
You may need to require org.nuxeo.ecm.core.CoreExtensions in your contribution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-04-2016 11:46 AM
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>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-04-2016 12:45 PM
These errors are displyed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-04-2016 01:03 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2016 02:59 AM
Resolved. I have created a new schema called "extra" and added it to Picture and File type
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2016 03:47 AM
Well i am glad to hear that! That's is the best way and nuxeo compliant.
