08-06-2008 05:51 AM
<dumb:example>
<dumb:content>Alfresco content</dumb:content>
<dumb:text>Alfresco text</dumb:text>
</dumb:example>
08-06-2008 12:33 PM
<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>
08-07-2008 06:03 AM
08-07-2008 11:59 AM
02-22-2010 01:21 PM
OKHi!! Could you post the resulting files? Thanks in advance.
The mistake was to set the registry of XmlMetadataExtracter in wcm-xml-metadata-extracter-context.xml
I remove it and it works fine.
Problem solved
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.