You can add an aspect automatically to a document based on its DOCTYPE or XML Schema by configuring an XML
schema predicate mapping bean.
In the following steps you will be creating and/or configuring Spring beans in a Spring context file. A
basic knowledge of Spring and the Spring Framework is required.
-
Open or create a new Spring context file.
-
Create an XML schema Predicate Mapping bean.
<bean id="samples.xmlSchemaPredicateMapping.troubleshooting" parent="rdf.xmlSchemaPredicateMapping.abstract">
<property name="xmlSchemaFilter" ref="samples.dtd.troubleshooting" />
<property name="predicate" value="{http://www.componize.com/model/samples/troubleshooting/1.0/}troubleshooting" />
</bean>
-
Restart the application server for your changes to take effect.
Whenever content of the given XML schema is written to the repository, the corresponding aspect will be
added to the Node automatically.