As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<dumb:example> <dumb:content>Alfresco content</dumb:content> <dumb:text>Alfresco text</dumb:text> </dumb:example>
<model name="dumb:dumbmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0"> <!– Optional meta-data about the model –> <description>Dumb Model</description> <author></author> <version>1.0</version> <imports> <!– Import Alfresco Dictionary Definitions –> <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/> <!– Import Alfresco Content Domain Model Definitions –> <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/> </imports> <!– Introduction of new namespaces defined by this model –> <!– NOTE: The following namespace custom.model should be changed to reflect your own namespace –> <namespaces> <namespace uri="dumb.model" prefix="dumb"/> </namespaces> <types> <type name="dumb:example"> <title>Example model</title> <parent>cm:content</parent> <properties> <property name="dumb:resume"> <title>Resume</title> <type>d:text</type> <mandatory>true</mandatory> </property> </properties> </type> </types> </model>
<bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap"> <property name="models"> <list> <value>alfresco/model/defaultCustomModel.xml</value> <value>alfresco/model/customModel.xml</value> <value>alfresco/model/dumbExampleModel.xml</value> </list> </property> </bean>
<config evaluator="node-type" condition="dumb:example"> <property-sheet> <show-property name="dumb:resume" display-label-id="resume" ignore-if-missing="false" /> </property-sheet> </config>
… <bean id="extracter.xml.sample.AlfrescoModelMetadataExtracter" class="org.alfresco.repo.content.metadata.xml.XPathMetadataExtracter" parent="baseMetadataExtracter" init-method="init" > <property name="mappingProperties"> <bean class="org.springframework.beans.factory.config.PropertiesFactoryBean"> <property name="properties"> <props> <prop key="namespace.prefix.d">http://www.alfresco.org/model/dictionary/1.0</prop> <prop key="resume">d:text</prop> </props> </property> </bean> </property> <property name="xpathMappingProperties"> <bean class="org.springframework.beans.factory.config.PropertiesFactoryBean"> <property name="properties"> <props> <prop key="namespace.prefix.dumb">dumb.model</prop> <prop key="resume">/dumb:example/resume/text()</prop> </props> </property> </bean> </property> </bean> <bean id="extracter.xml.sample.selector.XPathSelector" class="org.alfresco.repo.content.selector.XPathContentWorkerSelector" init-method="init"> <property name="workers"> <map> <entry key="/dumb:example"> <ref bean="extracter.xml.sample.AlfrescoModelMetadataExtracter" /> </entry> </map> </property> </bean> …
<?xml version="1.0" encoding="UTF-8"?> <dumb:example xmlns:alf="http://www.alfresco.org" xmlns:chiba="http://chiba.sourceforge.net/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:mla="http://www.alfresco.org/alfresco/mla" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <dumb:resume>resume</dumb:resume> </dumb:example>
OKThe mistake was to set the registry of XmlMetadataExtracter in wcm-xml-metadata-extracter-context.xmlI remove it and it works fine.Problem solved