Step 7: Testing the Framework Customization
To test the new framework
customization, create an XML instance that conforms with the association rules that you
specified in your framework customization. You will not specify an XML Schema
location directly in the document, using an xsi:schemaLocation
attribute.
Instead, Oxygen XML Editor will detect 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
as error.
Invalid content was found starting with element
'title2'. One of '{"http://www.oxygenxml.com/sample/documentation":title}'
is expected.
Undo the tag name change, go to Author mode, and Oxygen XML Editor should load the CSS from the document type association and create a layout similar to this: