Testing the Document Type Association
To test the new Document Type create an XML instance that is conforming with the Simple
Documentation Framework association rules. You will not specify an XML Schema location
directly in the document, using an xsi:schemaLocation
attribute; Oxygen XML Author will detect instead its associated document type and use the specified
schema.
<book xmlns="http://www.oxygenxml.com/sample/documentation" xmlns:abs="http://www.oxygenxml.com/sample/documentation/abstracts"> <title>My Technical Book</title> <section> <title>XML</title> <abs:def>Extensible Markup Language</abs:def> <para>In this section of the book I will explain different XML applications.</para> </section> </book>
When trying to validate the document there should be no errors. Now modify the
title
to title2
. Validate again. This time there should be
one error:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'title2'. One of '{"http://www.oxygenxml.com/sample/documentation":title}' is expected.
Undo the tag name change. Press on the Author button at the bottom of the editing area. Oxygen XML Author should load the CSS from the document type association and create a layout similar to this: