Please post general comments to the LTSC-XML discussion list
Thanks, Tyde Richards
Emerging XML technologies such as namespace declarations, RDF or XML-Data will clearly play an important role in future XML-based metadata applications. My goal was to determine how much of the LOM specification could be represented using only the existing XML recommendation from the W3C. It is available here here.
I developed two DTDs in which there is a one-to-one mapping between the data elements defined in the LOM specification and element types declared in the DTD.
The first DTD consists only of XML element type declarations. It does not attempt to represent the "data type", "obligation" and "list"(occurrence) properties defined in the LOM specification. Two pieces of semantic information can be inferred from an approach that only uses element type declarations. First, you can infer if an element type is "mandatory" or "optional" (but not "conditional" or "notAllowed"). Second, you can infer if an element type can occur once or more than once (but not if is an ordered list).
The DTD is available here.
A small compliant metadata document is available here.
The second DTD represents the "data type", "obligation" and "list" (occurrence) properties defined in the LOM specification. This is done by associating three "role attributes" with the element type declarations: Dtype, Obligation and List.
In most cases, the values for these attributes are invariant for a particular element type. These are declared as "#FIXED" so that a parser can infer their value from the DTD rather than requiring that they be explicitly declared in a metadata document. In cases where an element type can occur in multiple contexts, such as the "Date" element type, it may be necessary to explicitly provide an attribute value because it cannot be unambiguously inferred.
Attributes are declared using "parameter entities"defined near the beginning of the DTD. These provide short-hand "macros" that simplify authoring.
The DTD is available here.
A small compliant metadata document is available here. Notice that some elements have declared attribute values.
I used a Java parser available free from IBM here.
This requires the Java JDK 1.1 available free from JavaSoft here.
I used the parser with an MS-DOS command line interface that looks like:
C:\xml4J>jre -cp xml4j.jar trlx -d metadata.xml
The important parameter in the command line arcana is metadata.xml. This is the name of the metatdata document to be parsed.
The document begins with the lines:
<?xml version="1.0" encoding='UTF-8'?> <!DOCTYPE LTSCMetadata SYSTEM "somedtd.xml">
somedtd.xml is the name of the file containing the XML declarations that define the "grammar" for the LTSCMetadata document type. The parser loads the "grammar" and uses it to validate the metadata.xml document.