Configuring an XML schema predicate mapping

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.

  1. Open or create a new Spring context file.
  2. 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="{}troubleshooting" />
  3. 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.