The help file is organized as follows:
XML from RDF wizard uses instances annotated with Semantic XML (SXML) triples to transform them to an XML document. In order to comply with an XML Schema, these instances could be defined against classes and properties that were imported from the XML Schema using the Import XSD wizard.
In order to run the wizard, first open an ontology. Then, invoke the importer by selecting the target folder for the XML file that will be generated from the ontology. Right-click the selected folder and pick Export -> TopBraid Composer -> XML from RDF to display the wizard page as shown in the following:
The wizard page has two fields. Enter the target XML filename in the Output file name field. The file name doesn't need to end with an .xml extension. Enter the QName of the root SXML instance in the Root instance field. The XML exporter engine takes this instance and walks down the triples from it to generate the XML tree. This field supports auto-complete using Ctrl + Space
.
As an example, save and open the ontology simple-catalog.ttl, which contains an XSD import from simple-catalog.xsd and an SXML mapping from simple-catalog-instance.xml. Run the XML from RDF exporter to export the SXML triples to an XML file using the options shown in the above dialog. You can compare the result against simple-catalog-instance.xml and validate it against simple-catalog.xsd using an XSD validator for XML.
RDF Constructs | XML Constructs |
---|---|
Instances of owl:Class resources |
Elements |
sxml:tag values or sxml:element values |
Element names |
If sxml:tag is specified on a class, then the properties annotated with sxml:isAttribute annotation in restrictions of the class. If sxml:tag is not specified, then datatype properties. In each case, if it is an object property, then it should have sxml:tag value or if it is a datatype property, then it should have an sxml:attribute value.
|
Attributes |
Object properties that are not annotated with sxml:isAttribute annotation.
|
Children elements |
dtype:value property value or a datatype property value with no sxml:isAttribute annotation.
|
Text content |
An instance of a subclass of dtype:EnumeratedValue with dtype:value value.
|
Text content |
Root instance with properties for prefix declarations and schema location |
Root instance with xmlns: prefix declarations and xsi:schemaLocation
|
The following are limitations for now:
sxml:order
is limited to restrictions within the same class, but not across the class hierarchy.These limitations will be incrementally addressed in future releases.