www.altova.com
Previous  Top  Next

Defining the Properties


In this section you will define three properties to hold metadata information about documents. These properties are taken from the Dublin Core vocabulary for defining document metadata. They are the dc:date, dc:language, and dc:format properties. In this section, you will create the dc:date property as a datatype property with a range of the XML Schema datatype date, and the dc:language and dc:format datatypes as object datatypes with ranges, respectively of the Languages and OutputFormats classes. Create these three properties as follows:

 

1.In the Properties Overview, click the Add New button to create an entry for a new datatype property. Name the property dc:date.
2.Repeat this step twice to create two more properties, but create both as object properties: dc:language and dc:format. The Properties Overview should now look like this:

 

ss_tut_odl_props_oview_1

 

3.Click the Detail View button of the dc:date property.
4.In the Detail View of the dc:date property, right-click the property box, select Domain, and set the Domain to the doc:Document class. Right-click the property box, select Range, then right-click the Range connector and select Add XML Schema Datatype (screenshot below). (The Add Data Range option creates an enumeration of data values (literals).)

 

ss_tut_odl_date_add_xsd

 

Set the range to xsd:date. (If required, double-click in the Datatype box to get a list of available datatypes.) The Detail View should now look like this:

 

ss_tut_odl_detailview_date

 

5.Set the domain and range for the dc:language and dc:format similarly. Set the domains of both to the doc:Document class, the range of dc:language to the doc:Languages class, and the range of dc:format to the doc:OutputFormats class.

 

Note:When the domain of a property is set to the Document class, all subclasses of the Document class are also implicitly in the domain of that property. Consequently, the PrintManual, WebPage, EnglishWebPage, and GermanWebPage classes are also in the domain of properties that have their domain set to the Document class.

 


Previous  Top  Next

© 2008 Altova