EKM provides schema files for all files that you define
using XML. These XML Schema Definition (XSD) files describe the structure
or "grammar" that an XML document must adhere to. Schema definitions
provide the building blocks that enable you to write valid XML configuration
files for use in EKM. For more information on how to read schema
files, refer to: http://www.w3.org/TR/xmlschema-0.
XSD files are contained in the EKM_HOME/schema folder and are identified by the .xsd extension.
Important: EKM_HOME is the directory where the EKM server
application is installed.
Figure 14.1: Partial Listing of units.xsd Schema Definition shows the partial
listing for units.xsd, the XML schema definition
(XSD) that is used for defining units in EKM. The complete listing
is provided in the EKM_HOME/schema folder.
Figure 14.1: Partial Listing of units.xsd Schema Definition
<?xml version="1.0" encoding="UTF-8"?> targetNamespace="http://www.ansys.com/ekm/units" xmlns:ekmUnits="http://www.ansys.com/ekm/units"> <xsd:complexType name="Unit"> <xsd:attribute name="name" type="xsd:string" use="required" /> <xsd:attribute name="multFactor" type="xsd:double" use="required" /> <xsd:attribute name="addFactor" type="xsd:double" use="optional" /> </xsd:complexType> <xsd:complexType name="Quantity"> <xsd:sequence> <xsd:element name="unit" type="ekmUnits:Unit" maxOccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> <xsd:complexType name="Quantities"> <xsd:sequence> <xsd:element name="quantity" type="ekmUnits:Quantity" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="UnitSystemQuantity"> <xsd:attribute name="name" type="xsd:string" use="required" /> <xsd:attribute name="unit" type="xsd:string" use="required" /> </xsd:complexType>
EKM also supplies a default Units.xml file that contains some predefined units, quantities, and unit systems.
The schema listing in Figure 14.1: Partial Listing of units.xsd Schema Definition show
that the units file consists of a root element named units and has the following child elements:
quantities: contains a list
of quantity element as children. Each quantity element has a list of units elements as children.
unitSystems. This has a list
of unitSystem element as children. Each unitSystem element has a list of quantity elements as children.
Figure 14.2: Partial Listing of Units.xml shows a partial listing
of the Units.xml file. The complete listing
can be found in the EKM_HOME/conf folder
in your EKM server setup, or in the /Administration/Configuration folder in the EKM repository.
Figure 14.2: Partial Listing of Units.xml
<?xml version="1.0" encoding="UTF-8"?> <ekmUnits:units xmlns:ekmUnits="http://www.ansys.com/ekm/units" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ansys.com/ekm/units ../schema/units.xsd"> <quantities> <quantity name="forcePerArea"> <unit name="N/m2" multFactor="1.000000"/> <unit name="lbf/ft2" multFactor="47.890000"/> <unit name="dyn/cm2" multFactor="0.100000"/> </quantity> <quantity name="massTransferRate"> <unit name="kgmol/m3-s" multFactor="1.000000"/> <unit name="kgmol/cm3-s" multFactor="1000000.000000"/> <unit name="kgmol/ft3-s" multFactor="35.314725"/> </quantity> <quantity name="force"> <unit name="N" multFactor="1.000000"/> <unit name="dyn" multFactor="0.000010"/> <unit name="kgf" multFactor="9.806805"/> <unit name="tonf" multFactor="9964.129140"/> <unit name="lbf" multFactor="4.448200"/> <unit name="ozf" multFactor="0.278020"/> <unit name="pdl" multFactor="0.138260"/> </quantity> <quantity name="energy"> <unit name="J" multFactor="1.000000"/> <unit name="kgf-m" multFactor="9.806800"/> <unit name="erg" multFactor="0.000000"/> <unit name="kWh" multFactor="3600000.000000"/> <unit name="BTU" multFactor="1055.040000"/> <unit name="hp-h" multFactor="2684500.000000"/> <unit name="ft-lbf" multFactor="0.135600"/> <unit name="kcal" multFactor="4186.800000"/> <unit name="cal" multFactor="4.186800"/> </quantity>