Lab 2 - Configure a new XML schema

During the lab, you will be defining a new XML schema for the troubleshooting DTDs.

  1. In the lab folder, create a new Spring context file named context.xml.
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/beans
      http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
    
    </beans>
  2. Open the context.xml file in your favorite editor.
  3. Create a new DTD bean.
  4. Add the following properties to the DTD bean as required:
    Property Type Mandatory Description
    label String Required The clear text label to be used when displaying the Document Type in a list.
    id String Required The root element name for the Document Type.
    publicId String Required The Document Type unique public ID.
    systemId String Required The Document Type system ID.
    <bean id="samples.dtd.troubleshooting" parent="xml.schema.dtd.abstract">
      <property name="label" value="Troubleshooting" />
      <property name="id" value="tsTroubleshooting" />
      <property name="publicId" value="-//OASIS//DTD DITA Troubleshooting Samples//EN" />
      <property name="systemId" value="http://www.componize.com/samples/dtd/troubleshooting.dtd" />
    </bean>
  5. Create a new XML Schema Filter Entry bean.
  6. Add the following properties to the XML Schema Filter Entry bean as required:
    Property Type Mandatory Description
    schema XmlSchemaDefinition or DocumentTypeDefinition Optional

    An XML schema reference that should be added to the filter.

    schemas Collection< XmlSchemaDefinition or DocumentTypeDefinition > Optional A list of XML schema references that should be added to the filter.
    registry XmlSchemaFilterRegistry Optional Reference to a XML schema filter registry. A value must be provided to either registry or registries.
    registries Collection <XmlSchemaFilterRegistry> Optional Collection of XML schema filter registries. A value must be provided to either registry or registries.
    <bean parent="xml.schema.filter.collection.entry">
      <property name="schema" ref="samples.dtd.troubleshooting" />
      <property name="registry" ref="dita.schemas.topic" />
    </bean>
  7. Save your changes.
  8. Deploy your files to the application server.
  9. Once the application server has started, connect to the Alfresco Share interface.
  10. Remove the Metadata & Link Management aspect from the troubleshooting-sample.dita file and then add it back again.
    Note: Metadata and links are extracted from files each time they are updated or when the Metadata & Link Management aspect is added. By removing and then adding the aspect back again, the metadata and links will be reextracted even though the content hasn't been changed.
The standard DITA Topic metadata (Title, Description, Id) should be extracted automatically.