ISO/IEC JTC 1/SC34 N0398
Title: |
The XML Topic Maps (XTM) Syntax |
Source: |
Lars Marius Garshol, Graham Moore, JTC1/SC34 |
Project: |
ISO 13250 |
Project editor: |
Steven R. Newcomb, Michel Biezunski, Martin Bryan |
Status: |
First committee draft |
Action: |
For review and comment |
Date: |
2003-04-03 |
Summary: |
|
Distribution: |
SC34 and Liaisons |
Refer to: |
|
Supercedes: |
|
Reply to: |
Dr. James David Mason |
This version:
Latest version:
Previous versions:
Authors:
Lars Marius Garshol , Ontopia mailto:larsga@ontopia.net
Graham Moore , Empolis mailto:gdm@empolis.co.uk
This specification defines the XML Topic Maps 1.1 (XTM) interchange syntax for topic maps, a syntax based on XML, XLink, and URIs. The allowed syntactical expressions in XTM documents are constrained using a DTD and prose, and their interpretation is defined using [SAM]. Note that this is only a syntax specification; what the syntax represents is defined by [SAM].
This specification will replace [XTM1.0] as the official definition of the XTM syntax once it is adopted by ISO as part of the revised ISO 13250 standard. For more information on this process, see [tm-guide].
This is $Revision: 1.19 $.
1 Introduction
2 Syntax
2.1 The
topicMap element
2.2 The
topic element
2.3 The
subjectIdentity element
2.4 The
baseName element
2.5 The
baseNameString element
2.6 The
variant element
2.7 The
variantName element
2.8 The
parameters element
2.9 The
scope element
2.10 The
instanceOf element
2.11 The
occurrence element
2.12 The
resourceData element
2.13 The
association element
2.14 The
member element
2.15 The
roleSpec element
2.16 The
topicRef element
2.17 The
subjectIndicatorRef element
2.18 The
resourceRef element
2.19 The
mergeMap element
3 Deserialization
3.1 Common
processing rules
3.1.1 Creating
a locator for an element
3.1.2 Creating
locator items
3.1.3 Creation
of new information items
3.1.4 Processing
external references
3.1.5 Merging
topic maps
3.2 The
topicMap element
3.3 The
topic element
3.4 The
subjectIdentity element
3.5 The
baseName element
3.6 The
baseNameString element
3.7 The
variant element
3.8 The
variantName element
3.9 The
parameters element
3.10 The
scope element
3.11 The
instanceOf element
3.12 The
occurrence element
3.13 The
association element
3.14 The
member element
3.15 The
topicRef element
3.16 The
subjectIndicatorRef element
3.17 The
resourceRef element
3.18 The
mergeMap element
4 Conformance
A References
B The
XTM 1.1 DTD
C A
RELAX-NG schema for XTM 1.1 (Non-Normative)
D A
XML Schema schema for XTM 1.1 (Non-Normative)
E Serialization
(Non-Normative)
F Differences
with XTM 1.0 (Non-Normative)
G Resolved
issues (Non-Normative)
XTM 1.1 is a syntax for the interchange of topic maps. The syntax is not designed to be extended or modified, although topic maps expressed in XTM may be embedded in other XML syntaxes. Other XML syntaxes that represent topic map information may well define mappings to the XTM syntax, however. Ease of human XTM authoring was not prioritized during the design of the syntax, and consequently it is not recommended to edit the syntax directly.
An XTM
topic map is a topic map serialized in XTM syntax as a topicMap
element with descendants. An XTM document is an XML document that contains one
or more XTM topic maps. In a process known as deserialization, the XTM topic
map is read by a topic map processor, which produces from it some representation
of the Standard Application Model, by following a procedure equivalent to the
one defined in 3
Deserialization. Note that if the same document contains multiple topicMap
elements the result will be a
separate SAM instance for each element.
The deserialization procedure is defined as a transformation that takes an element item from an XML Information Set [infoset] as input and produces a Standard Application Model instance as output. This specification does not concern itself with the means by which the XML Information Set used as input is produced. In most cases it will be produced by parsing an XML document, but other possibilities are specifically allowed, including architectural processing (as defined in [HyTime]) or XSLT transformations from other XML syntaxes.
This specification also provides informative guidance on how to serialize instances of the Standard Application Model to the XTM syntax.
Should the version number in the XTM namespace URI be changed?
This section defines the XTM syntax, using prose and a DTD. The full DTD can be found in B The XTM 1.1 DTD.
topicMap
elementThe topicMap
element is the root element of all XTM topic
maps. It acts as a container for the topic map, and can be either the document
element of an XML document, or it may be the root of a subtree inside an XML
document that contains more than just a single topic map. In both cases, the
input to the XTM deserialization process is the subtree contained by the topicMap
element.
The topicMap
element type is declared as follows:
<!ELEMENT topicMap ( topic | association | mergeMap )* > <!ATTLIST topicMap id ID #IMPLIED xmlns CDATA #FIXED 'http://www.topicmaps.org/xtm/1.0/' xmlns:xlink CDATA #FIXED 'http://www.w3.org/1999/xlink' xml:base CDATA #IMPLIED > |
The attributes have the following meanings:
id
A unique identifier for the topic map within the document. Used to refer to the topic map.
xml:base
An attribute used to override the base URI of the
document inside the topicMap
element, as specified in [XMLBase].
xmlns
This attribute declares the default namespace and sets it to the XTM namespace URI.
Attributes declared as #FIXED in the DTD can not be guaranteed to always be present in the XML document as parsed, either because there is no DOCTYPE declaration, or because the parser does not read the DTD. This affects both namespace and XLink parsing, which again affects the procedure used to recognize element types.
xmlns:xlink
This attribute declares the xlink
namespace prefix and sets it to
the XLink namespace URI [XLink].
Should the topicMap
element have a version
attribute?
topic
elementThe topic
element type is used to create topics, and acts as
a container and point of reference for topic information. The child elements of
the topic
element provide
some topic characteristic assignments, as well as other properties, while
association roles played by the topic are specified outside the topic
element.
The topic
element type is declared as follows:
<!ELEMENT topic ( instanceOf*, subjectIdentity?, ( baseName | occurrence )* ) > <!ATTLIST topic id ID #REQUIRED > |
The id
attribute provides a unique identifier for the topic, which
is used to refer to it.
subjectIdentity
elementThe subjectIdentity
element type may in its child elemets
contain formal declarations of the subject of the topic defined by the parent
element.
The subjectIdentity
element type is declared as follows:
<!ELEMENT subjectIdentity ( topicRef | resourceRef| subjectIndicatorRef )* > <!ATTLIST subjectIdentity id ID #IMPLIED > |
The id
attribute is ignored during deserialization.
baseName
elementThe baseName
element type is used to add topic names to the
topic created by the parent topic
element. The child elements of the baseName
element provide the property values of the topic name item.
The baseName
element type is declared as follows:
<!ELEMENT baseName ( instanceOf?, scope?, baseNameString, variant* ) > <!ATTLIST baseName id ID #IMPLIED > |
The id
attribute provides a unique identifier for the topic
name, which can be used to refer to it.
baseNameString
elementThe baseNameString
element type is used to provide the string
that makes up a base name.
The baseNameString
element type is declared as follows:
<!ELEMENT baseNameString ( #PCDATA ) > <!ATTLIST baseNameString id ID #IMPLIED > |
The id
attribute is ignored during deserialization.
variant
elementThe variant
element type is used to create a variant name of
a base name, and may also contain other variant names with scopes that are
supersets of the scope of that of the containing variant name.
The variant
element type is declared as follows:
<!ELEMENT variant ( parameters, variantName?, variant* ) > <!ATTLIST variant id ID #IMPLIED > |
The id
attribute provides a unique identifier for the variant
name, which is used to refer to it.
variantName
elementThe variantName
element type is used to contain the element
that specifies the information resource that is the actual variant name.
The variantName
element type is declared as follows:
<!ELEMENT variantName ( resourceRef | resourceData ) > <!ATTLIST variantName id ID #IMPLIED > |
The id
attribute is ignored during deserialization.
parameters
elementThe parameters
element type is used to specify the scope of a
variant name, in addition to the scope it inherits from its parent topic name
or variant name.
The parameters
element type is declared as follows:
<!ELEMENT parameters ( topicRef | resourceRef | subjectIndicatorRef )+ > <!ATTLIST parameters id ID #IMPLIED > |
The id
attribute is ignored during deserialization.
scope
elementThe scope
element type is used throughout XTM to indicate the
scope of a topic characteristic assignment.
The scope
element type is declared as follows:
<!ELEMENT scope ( topicRef | resourceRef | subjectIndicatorRef )+ > <!ATTLIST scope id ID #IMPLIED > |
The id
attribute is ignored during deserialization.
instanceOf
elementThe instanceOf
element type is used throughout XTM to
indicate the type of the construct represented by its parent element. The type
is always a topic, indicated by the child element.
The instanceOf
element type is declared as follows:
<!ELEMENT instanceOf ( topicRef | resourceRef | subjectIndicatorRef ) > <!ATTLIST instanceOf id ID #IMPLIED > |
The id
attribute is ignored during deserialization.
occurrence
elementThe occurrence
element type is used to assign an occurrence
to a the topic defined by the parent element.
The occurrence
element type is declared as follows:
<!ELEMENT occurrence ( instanceOf?, scope?, ( resourceRef | resourceData ) ) > <!ATTLIST occurrence id ID #IMPLIED > |
The id
attribute is used to refer to the occurrence.
resourceData
elementThe resourceData
element type is used to provide an
information resource in the form of a string contained within the XTM document.
This information resource may be either a variant name or an occurrence.
The resourceData
element type is declared as follows:
<!ELEMENT resourceData ( #PCDATA ) > <!ATTLIST resourceData id ID #IMPLIED > |
The id
attribute is ignored during deserialization.
Issue (xtm-resourcedata-markup):
Should we extend the content model
of resourceData
to allow
arbitrary markup within the element, and require implementations to be able to
represent this?
association
elementThe association
element type is used to express associations
between topics. The member
child elements provide the association role players of the association.
The association
element type is declared as follows:
<!ELEMENT association ( instanceOf?, scope?, member+ ) > <!ATTLIST association id ID #IMPLIED > |
The id
attribute is used to refer to the association.
member
elementThe member
element type is used to add one or more players of
the same association role type to the association created by the association
parent element.
The member
element type is declared as follows:
<!ELEMENT member ( roleSpec?, ( topicRef | resourceRef | subjectIndicatorRef )* ) > <!ATTLIST member id ID #IMPLIED > |
The id
attribute is ignored during deserialization.
Should the id
attribute of member
be ignored? This makes it
impossible to reify association roles in XTM. On the other hand, member
elements do not necessarily map
to a single association role item.
roleSpec
elementThe roleSpec
element type is used to specify the association
role type played by the association player contained in the member
parent element.
The roleSpec
element type is declared as follows:
<!ELEMENT roleSpec ( topicRef | resourceRef | subjectIndicatorRef ) > <!ATTLIST roleSpec id ID #IMPLIED > |
The id
attribute is ignored during deserialization.
topicRef
elementThe topicRef
element type is used throughout XTM to refer to
a topic, either within the same XML document or externally. The signficance of
the reference depends on the context.
The topicRef
element type is declared as follows:
<!ELEMENT topicRef EMPTY> <!ATTLIST topicRef id ID #IMPLIED xlink:href CDATA #REQUIRED xlink:type NMTOKEN #FIXED 'simple' > |
The attributes have the following meanings:
id
This attribute is ignored during deserialization.
xlink:href
Contains the URI that is the topic reference. This URI must have a fragment identifier and must be what [XPointer] calls a shorthand pointer (formerly barename).
Issue (xtm-topicref-notatopic):
Is it an error for a topicRef
element to refer to an element
that is not a topic
element?
What if the topicRef
element refers to a topic in an
external resource where the topicMap element is not the document element. Is
that an error? What if there is more than one topicMap element?
subjectIndicatorRef
elementThe subjectIndicatorRef
element type is used throughout XTM
to refer to a subject indicator. The signficance of the reference depends on
the context.
The subjectIndicatorRef
element type is declared as follows:
<!ELEMENT subjectIndicatorRef EMPTY> <!ATTLIST subjectIndicatorRef id ID #IMPLIED xlink:href CDATA #REQUIRED xlink:type NMTOKEN #FIXED 'simple' > |
The attributes have the following meanings:
id
This attribute is ignored during deserialization.
xlink:href
Contains the URI of the subject indicator being referred to.
resourceRef
elementThe resourceRef
element type is used throughout XTM to refer
to an information resource. The signficance of the reference depends on the
context.
The resourceRef
element type is declared as follows:
<!ELEMENT resourceRef EMPTY> <!ATTLIST resourceRef id ID #IMPLIED xlink:href CDATA #REQUIRED xlink:type NMTOKEN #FIXED 'simple' > |
The attributes have the following meanings:
id
This attribute is ignored during deserialization.
xlink:href
Contains the URI of the information resource being referred to.
mergeMap
elementThe mergeMap
element type is used throughout XTM to refer to
external topic maps that are to be merged into the topic map that contains the mergeMap
element. The child elements of
the mergeMap
element specify
topics to be added to the scopes of all topic characteristic assignments in the
topic map to be merged in.
The mergeMap
element type is declared as follows:
<!ELEMENT mergeMap ( topicRef | resourceRef | subjectIndicatorRef )* > <!ATTLIST mergeMap id ID #IMPLIED xlink:type NMTOKEN #FIXED 'simple' xlink:href CDATA #REQUIRED > |
The attributes have the following meanings:
id
This attribute is ignored during deserialization.
xlink:type
This attribute declares the mergeMap
element to be a simple XLink
element.
xlink:href
This attribute contains the URI that refers to the topic
map to be merged into the current topic map. It must refer either to a topicMap
element, or to an XTM document.
If it has a fragment identifier that identifier must be what [XPointer]
calls a shorthand pointer (formerly barename).
Issue (xtm-mergemap-reference):
Is it an error if a mergeMap
element refers to an XML
document that contains multiple topicMap
elements without providing a disambiguating fragment reference?
This section defines how instances of the XTM syntax are deserialized into instances of the Standard Application Model [SAM].
The input to the deserialization process is:
·
An element item as defined by [infoset],
representing a topicMap
element. In most cases this will be the document element, but in cases where
the topicMap
element is
embedded in other XML syntaxes applications may select one element item and use
it as the input to the deserialization process. The means by which this element
item is chosen are beyond the scope of this specification. It is an error if
this element item is not valid according to the DTD given in B
The XTM 1.1 DTD.
· An absolute URI. This is the URI from which the XML document was retrieved, known as the document URI. This URI must always be provided, as it is necessary in order to assign the source locators of the information items created during deserialization. If the XML document was not read from any particular URI the application is responsible for providing a URI it considers suitable.
Deserialization is done by processing each element item in the input subtree of the XML Information Set in document order. For each element item encountered the operations specified in the subsection labelled "Processing" inside the section about that element type are performed.
An input element item matches a
section in this document when the [namespace name] property is set to "http://www.topicmaps.org/xtm/1.0/"
,
and the [local name] matches the element type name given in that section.
Elements that do not match any section are ignored.
Note:
The definition of the string type in SAM requires that all strings created during deserialization be represented using Unicode Normalization Form C. This means that processors are required to apply normalization before making strings available to the application.
Issue (xtm-namespace-support):
The text as specified here requires that XTM processors do XML Namespace processing. Is that acceptable? XTM 1.0 seems to imply that namespace processing is optional. Also, proper namespace processing allows the use of different namespace prefixes, which break straight DTD validation.
Unknown elements are ignored in order to ensure forwards compatibility, but this means DTD compliance cannot be required. Which is more important?
This section defines common processing rules used throughout this specification. These rules are referenced from the sections they apply to.
The URI of an element is computed
by first concatenating the "#"
character and the value of the [normalized value] property of the attribute
item in the [attributes] property of that element item whose [local name]
property is set to "id"
.
This yields a relative URI that is then resolved to an absolute URI by using
the URI found in the [base URI] property of the element item as the base URI.
RFC 2396, section 4.2, specifies that URI references of the form "" and "#fragment" are resolved relative to the URI of the current entity. Should XTM should follow this?
Finally, a locator item is created,
with its [notation] property set to "URI"
and the URI in its [reference] property.
Creation of a locator item from an element information item in the XML Infoset is done by:
·
locating the attribute information item in the
element's [attributes] property whose [namespace name] property is set to the
XLink namespace URI and whose [local name] property is set to "href"
,
·
the value of the attribute information item's
[normalized value] property is unescaped by replacing %HH
escape sequences with the characters
they represent, and the resulting character sequence is decoded from UTF-8 to a
sequence of abstract Unicode characters,
· the resulting string is turned into an absolute URI by resolving it against the URI in the [base URI] property of the element information item, and
·
finally a locator item is created with its [notation]
property set to "URI"
and its [reference] property set to the URI produced by the previous step.
Ed. Note:
Dependency on the xtm-same-doc-refs issue here.
Whenever a new information item is created, those of its properties which have set values are set to the empty set, while the other properties are initialized to null.
The URI to the external information resource is resolved and the result is parsed with an XML parser according to [XML] to produce an XML Information Set according to [infoset]. It is an error if the information resource cannot be retrieved or if the result is not a well-formed XML document.
Note:
Unfortunately, the parsing of XML documents may yield different XML Information Sets depending on whether a validating or a non-validating XML parser is used and also on which parser is used, even if the parser is fully conformant. For interoperability it is recommended not to use XML features that different XML parsers may interpret differently.
The XML Information Set is then traversed to find element items that match section 3.2 The topicMap element and for each element item found a SAM instance is built using the procedure in 3 Deserialization with the element item and the URI of the information resource as input. The SAM instances are then returned as the result of processing.
A topic map item B loaded from an external reference can be merged into another topic map item A currently being deserialized by:
· Adding all topic items in B's [topics] property to A's [topics] property.
· Adding all association items in B's [associations] property to A's [associations] property.
Ed. Note:
This punts on typing, scoping, and role playing topics.
topicMap
elementThe topicMap
element causes a topic map item to be created.
If the topicMap
element has an id
attribute a locator item is created,
as defined in 3.1.1
Creating a locator for an element, and added to the [source locators]
property of the topic map item.
If the topicMap
element has an xml:base
attribute this does not affect
the Standard Application Model instance being built, except insofar as it
modifies the input XML Information Set.
topic
elementThe topic
element causes a topic item to be created and
inserted into the [topics] property of the topic map item.
The id
attribute causes a locator item to be created, as
defined in 3.1.1
Creating a locator for an element, and added to the [source locators]
property of the topic item.
subjectIdentity
elementThe subjectIdentity
element has no direct effect on the
information set, but changes the interpretation of the child elements. The
child elements are processed as follows:
·
If there is a resourceRef
child, a locator item is produced according to the procedure described in 3.1.2
Creating locator items. That locator item is then added to the [subject
addresses] property of the topic item created by the parent topic
element.
·
For every subjectIndicatorRef
child, a locator item is produced according to the procedure described in 3.1.2
Creating locator items. That locator item is then added to the [subject
identifiers] property of the topic item created by the parent topic
element.
·
For every topicRef
child a topic item is produced according to the rules of 3.15
The topicRef element. That topic item is then merged with the topic
item created from the parent topic
element according to the rules of the
Standard Application Model, 4.1 Merging topics.
If the subjectIdentity
element has an id
attribute that attribute is ignored.
baseName
elementThe baseName
element causes a base name item to be created,
and added to the [base names] property of the topic item created by the parent topic
element.
If the baseName
element has an id
attribute a locator item is created,
as defined in 3.1.1
Creating a locator for an element, and added to the [source locators]
property of the base name item.
baseNameString
elementThe information items in the
[children] property of the baseNameString
element are traversed, and for each character information item the Unicode
character specified by the [character code] property is added to the [value]
property of the base name item created by the parent baseName
element.
If the baseNameString
element has an id
attribute that attribute is ignored.
variant
elementThe variant
element causes a variant item to be created and
added to the [variants] property of the base name item created by its baseName
ancestor.
If the variant
element has an id
attribute a locator item is created,
as defined in 3.1.1
Creating a locator for an element, and added to the [source locators]
property of the variant item.
The [scope] property is initialized
to the value of the [scope] property of the variant or base name item created
by the parent element (which will be either a baseName
element or a variant
element).
Note:
It is here assumed that the scope of the parent element has already been processed, which it will have been, so long as the document is valid.
variantName
elementThe variantName
element has no direct effect on the
information set being produced, but changes the interpretation of its child
element. The child element is processed as follows:
·
If the child element is a resourceRef
element a locator item is produced from it
following the procedure in 3.1.2
Creating locator items. This locator item is set as the value of the
[resource] property of the new variant item.
·
If the child element is a resourceData
element the information items in the
[children] property of the element item are traversed, and for each character
information item the Unicode character specified by the [character code]
property is added to the [value] property of the variant item created by the
parent variant
element.
If the variantName
element has an id
attribute that attribute is ignored.
parameters
elementThe parameters
element has no direct effect on the
information set being produced, but changes the interpretation of its child
elements. Each topicRef
, resourceRef
, and subjectIndicatorRef
child element is
processed according to the rules for that element type to produce a topic item.
These topic items are gathered into a set that is assigned as the value of the
[scope] property of the variant item produced by the parent element.
If the parameters
element has an id
attribute that attribute is ignored.
scope
elementThe scope
element has no direct effect on the information set
being produced, but changes the interpretation of its child elements. Each topicRef
, resourceRef
, and subjectIndicatorRef
child element is processed according to the rules for that element type to
produce a topic item. These topic items are gathered into a set that is
assigned as the value of the [scope] property of the information item produced
by the parent element.
If the scope
element has an id
attribute that attribute is ignored.
instanceOf
elementThe instanceOf
element has no direct effect on the
information set being produced, but changes the interpretation of its child
elements. The exact interpretation depends on the parent element of the instanceOf
element, however.
Regardless of what parent element
the instanceOf
element is
found in, the child element produces a topic item. If it is a topicRef
element the procedure in 3.15
The topicRef element is followed; if it is a resourceRef
element the procedure in 3.17
The resourceRef element is followed; if it is a subjectIndicatorRef
element the
procedure in 3.16
The subjectIndicatorRef element is followed.
If the parent element is a baseName
, occurrence
, or association
element, the produced topic item is set as the value of the [type] property of
the information item produced by the parent element.
If the parent element is a topic
element a new association item is
created, with two association role items in its [association roles] property.
The topic item representing the type-instance association type (described in The Standard
Application Model, 5.1 The type-instance relationship) is set as the value
of its [type] property.
The first association role item has its [type] property set to the topic item representing the class role in the same association (see the section referenced above), while the [role playing topic] property is set to the topic produced by the child element.
The second association role item has its [type] property set to the topic item representing the instance role in the same association (see the section referenced above), while the [role playing topic] property is set to the topic produced by the parent element (that is, the current topic).
If the instanceOf
element has an id
attribute that attribute is ignored.
occurrence
elementThe occurrence
element causes an occurrence item to be
created, and added to the [occurrences] property of the topic item created by
the parent topic
element.
If the occurrence
element has an id
attribute a locator item is created,
as defined in 3.1.1
Creating a locator for an element, added to the [source locators]
property of the occurrence item.
If the occurrence
element has a resourceData
child element the
information items in the [children] property of that element item are
traversed, and for each character information item the Unicode character
specified by the [character code] property is added to the [value] property of
the occurrence item created by the parent occurrence
element.
If the occurrence
element has a resourceRef
child element a locator item
is produced from it according to the rules of 3.1.2
Creating locator items. This locator is set as the value of the
[resource] property of the new occurrence item.
association
elementThe association
element causes an association item to be
created, and added to the [association] property of the topic map item.
If the association
element has an id
attribute a locator item is created,
as defined in 3.1.1
Creating a locator for an element, and added to the [source locators]
property of the association item.
member
elementThe member
element does not have any direct impact on the
information set being created, but affects the processing of its descendant
elements.
For each topicRef
, resourceRef
, and subjectIndicatorRef
child of the member
element
a topic item is produced according to the rules for its element type. An
association role item is created, and this topic item is then set as the value
of its [role playing topic] property. The association role item is then added
to the [association roles] property of the association item.
If the member
element has no topicRef
, subjectIndicatorRef
, or resourceRef
children a new association role item is
created anyway. A new topic item is created and set as the value of its [role
playing topic] property, and the association role item is then added to the
[association roles] property of the association item.
If the member
element has a roleSpec
child element, which again has
a topicRef
, resourceRef
, or subjectIndicatorRef
child element, a
topic item is produced according to the rules for its element type. That topic
item is then set as the value of the [type] property of each association role
item produced above.
If the member
element no roleSpec
child element a new topic item
is created and set as the value of the [type] property of each association role
item produced above.
If the member
element has an id
attribute its value is ignored.
topicRef
elementThe topicRef
element always produces a topic item, as described
below. How the topic item is used depends on the context in which the topicRef
element appears, and is
described in the part of this document describing the processing of the topicRef
element's parent element.
From the topicRef
element a locator item is
produced according to the rules in 3.1.2
Creating locator items. If the topic map processor has not already
processed the information resource referred to by the URI (as identified by the
part of the URI before the fragment identifier) that information resource is
processed using this URI (as described in 3.1.4
Processing external references) to find a set of SAM model instances.
It is an error if there is not exactly one SAM model instance. That SAM model
instance is then merged with the one being built following the procedure in 3.1.5
Merging topic maps.
If the information set has a topic
item whose [subject identifiers] or [source locators] properties contain a
locator item equal to the one produced above that topic item is the one
produced by this topicRef
element.
If no such topic item exists, a
topic item is created, and the locator item added to its [source locators]
property. That topic item is then the one produced by this topicRef
element.
If the topicRef
element has an id
attribute that attribute is ignored.
subjectIndicatorRef
elementThe subjectIndicatorRef
element produces a topic item, as
described below. How the topic item is used depends on the context in which the
subjectIndicatorRef
element
appears, and is described in the part of this document describing the
processing of the subjectIndicatorRef
element's parent element.
From the subjectIndicatorRef
element a locator
item is produced according to the rules in 3.1.2
Creating locator items. If the information set has a topic item whose
[subject identifiers] or [source locators] properties contain a locator item
equal to the one produced above that topic item is the one produced by this subjectIndicatorRef
element.
If no such topic item exists, a
topic item is created, and the locator item added to its [subject identifiers]
property. That topic item is then the one produced by this subjectIndicatorRef
element.
If the subjectIndicatorRef
element has an id
attribute that attribute is ignored.
resourceRef
elementThe resourceRef
element produces a topic item, as described
below. How the topic item is used depends on the context in which the resourceRef
element appears, and is
described in the part of this document describing the processing of the resourceRef
element's parent element.
From the resourceRef
element a locator item is
produced with according to the rules in 3.1.2
Creating locator items. If the information set has a topic item whose
[subject addresses] property contains a locator item equal to the one produced
above that topic item is the one produced by this resourceRef
element.
If no such topic item exists, a
topic item is created, and the locator item add to its [subject addresses]
property. That topic item is then the one produced by this resourceRef
element.
If the resourceRef
element has an id
attribute that attribute is ignored.
mergeMap
elementAn absolute URI is produced from
the mergeMap
element's xlink:href
attribute, following the
procedure in 3.1.2
Creating locator items. If the information resource referred to by that
URI has already been processed nothing further is done. If it has not a set of
SAM instances is produced as described in 3.1.4
Processing external references. After this there are two possibilities:
· If the URI has a fragment identifier the SAM instance whose topic map item has the corresponding locator item in its [source locators] property is chosen. It is an error if there is no such SAM instance.
· If the URI has no fragment identifier it is an error if the set of SAM instances does not have a single member. That member is then chosen.
For each topicRef
, resourceRef
, and subjectIndicatorRef
child element of the mergeMap
element a topic item produced is produced as described in the section for that
element type and added to the [scope] property of every information item in the
SAM instance produced above. Finally, the SAM instance is merged into the
current SAM instance, following the procedure described in 3.1.5
Merging topic maps.
If the mergeMap
element has an id
attribute that attribute is ignored,
as is the value of its xlink:type
attribute.
Issue (xtm-mergemap-and-topicref):
What is the correct behaviour if a topicRef
to an external document occurs
first, followed by a mergeMap
with added themes?
A topic map processor conforms to this specification provided that it meets all the requirements given below.
·
The topic map processor must reject information
resources which are not well-formed XML from deserialization, as well as XML
documents where the topicMap
elements and descendants do not conform to the XTM 1.1 DTD.
· The topic map processor must reject all XTM topic maps which cause SAM constraints to be violated during deserialization.
· The topic map processor must detect all errors defined in this Technical Specification and reject all XTM topic maps which have such errors.
· For all XTM topic maps which are not rejected the topic map processor must build a representation that is isomorphic to the SAM instance created by the procedure given in 3 Deserialization.
ISO 10744:1997, Information processing — Text and office systems — Hypermedia/Time-based Structuring Language (HyTime).
XML Information Set, J. Cowan and R. Tobin, editors. World Wide Web Consortium. 24 October 2001.
The Standard Application Model for Topic Maps, G. Moore and L. M. Garshol (authors), ISO SC34/WG3.
Guide to the topic map standardization process, Lars Marius Garshol, 2002-06-23, ISO/IEC JTC1 SC34/N0323.
Extensible Markup Language (XML) 1.0 (Second Edition), T. Bray, J. Paoli, C.M. Sperberg-McQueen, and E. Maler, editors. World Wide Web Consortium, W3C Recommendation 6 October 2000.
XML Base, World Wide Web Consortium. February 2000. J. Marsh, editor.
XML Linking Language (XLink) Version 1.0, World Wide Web Consortium. 27 June 2001. S. DeRose, E. Maler, and D. Orchard, editors.
XPointer Framework, World Wide Web Consortium. 25 March 2003. P. Grosso, E. Maler, J. Marsh, N. Walsh, editors.
XML Topic Maps (XTM) 1.0 Specification, TopicMaps.Org, 2001.
<!-- ....................................................................... --> <!-- XML Topic Map DTD .................................................... --> <!-- XML Topic Map (XTM) DTD, Version 1.1 This is XTM, an XML interchange syntax for ISO 13250 Topic Maps. Use this URI to identify the default XTM namespace: "http://www.topicMaps.org/xtm/1.0/" Used to identify the XLink namespace: "http://www.w3.org/1999/xlink" --> <!-- topicMap: Topic Map document element ........................ --> <!ELEMENT topicMap ( topic | association | mergeMap )* > <!ATTLIST topicMap id ID #IMPLIED xmlns CDATA #FIXED 'http://www.topicmaps.org/xtm/1.0/' xmlns:xlink CDATA #FIXED 'http://www.w3.org/1999/xlink' xml:base CDATA #IMPLIED > <!-- topic: Topic element ....................................... --> <!ELEMENT topic ( instanceOf*, subjectIdentity?, ( baseName | occurrence )* ) > <!ATTLIST topic id ID #REQUIRED > <!-- instanceOf: Points to a Topic representing a class .......... --> <!ELEMENT instanceOf ( topicRef | resourceRef | subjectIndicatorRef ) > <!ATTLIST instanceOf id ID #IMPLIED > <!-- subjectIdentity: Subject reified by Topic ................... --> <!ELEMENT subjectIdentity ( topicRef | resourceRef | subjectIndicatorRef )* > <!ATTLIST subjectIdentity id ID #IMPLIED > <!-- topicRef: Reference to a Topic element ...................... --> <!ELEMENT topicRef EMPTY > <!ATTLIST topicRef id ID #IMPLIED xlink:type NMTOKEN #FIXED 'simple' xlink:href CDATA #REQUIRED > <!-- subjectIndicatorRef: Reference to a Subject Indicator ....... --> <!ELEMENT subjectIndicatorRef EMPTY > <!ATTLIST subjectIndicatorRef id ID #IMPLIED xlink:type NMTOKEN #FIXED 'simple' xlink:href CDATA #REQUIRED > <!-- baseName: Base Name of a Topic .............................. --> <!ELEMENT baseName ( instanceOf?, scope?, baseNameString, variant* ) > <!ATTLIST baseName id ID #IMPLIED > <!-- baseNameString: Base Name String container .................. --> <!ELEMENT baseNameString ( #PCDATA ) > <!ATTLIST baseNameString id ID #IMPLIED > <!-- variant: Alternate forms of Base Name ....................... --> <!ELEMENT variant ( parameters, variantName?, variant* ) > <!ATTLIST variant id ID #IMPLIED > <!-- variantName: Container for Variant Name ..................... --> <!ELEMENT variantName ( resourceRef | resourceData ) > <!ATTLIST variantName id ID #IMPLIED > <!-- parameters: Processing context for Variant .................. --> <!ELEMENT parameters ( topicRef | resourceRef | subjectIndicatorRef )+ > <!ATTLIST parameters id ID #IMPLIED > <!-- occurrence: Resources regarded as an Occurrence ............. --> <!ELEMENT occurrence ( instanceOf?, scope?, ( resourceRef | resourceData ) ) > <!ATTLIST occurrence id ID #IMPLIED > <!-- resourceRef: Reference to a Resource ........................ --> <!ELEMENT resourceRef EMPTY > <!ATTLIST resourceRef id ID #IMPLIED xlink:type NMTOKEN #FIXED 'simple' xlink:href CDATA #REQUIRED > <!-- resourceData: Container for Resource Data ................... --> <!ELEMENT resourceData ( #PCDATA ) > <!ATTLIST resourceData id ID #IMPLIED > <!-- association: Topic Association ............................. --> <!ELEMENT association ( instanceOf?, scope?, member+ ) > <!ATTLIST association id ID #IMPLIED > <!-- member: Member in Topic Association ......................... --> <!ELEMENT member ( roleSpec?, ( topicRef | resourceRef | subjectIndicatorRef )* ) > <!ATTLIST member id ID #IMPLIED > <!-- roleSpec: Points to a Topic serving as an Association Role .. --> <!ELEMENT roleSpec ( topicRef | resourceRef | subjectIndicatorRef ) > <!ATTLIST roleSpec id ID #IMPLIED > <!-- scope: Reference to Topic(s) that comprise the Scope ........ --> <!ELEMENT scope ( topicRef | resourceRef | subjectIndicatorRef )+ > <!ATTLIST scope id ID #IMPLIED > <!-- mergeMap: Merge with another Topic Map ...................... --> <!ELEMENT mergeMap ( topicRef | resourceRef | subjectIndicatorRef )* > <!ATTLIST mergeMap id ID #IMPLIED xlink:type NMTOKEN #FIXED 'simple' xlink:href CDATA #REQUIRED > <!-- end of XML Topic Map (XTM) 1.1 DTD --> |
<?xml version="1.0" encoding="UTF-8"?> <!-- ............................................................. --> <!-- XML Topic Maps 1.1 ......................................... --> <!-- XML Topic Map (XTM) 1.1 This is an informative RELAX-NG schema for the XTM 1.1 syntax, to be published as part of ISO 13250. --> <!-- ............................................................. --> <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:xlink="http://www.w3.org/1999/xlink" ns="http://www.topicmaps.org/xtm/1.0/" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> <!-- topicMap: Topic Map document element ........................ --> <define name="topicMap"> <element name="topicMap"> <ref name="attlist.topicMap"/> <zeroOrMore> <choice> <ref name="topic"/> <ref name="association"/> <ref name="mergeMap"/> </choice> </zeroOrMore> </element> </define> <define name="attlist.topicMap" combine="interleave"> <optional> <attribute name="id"> <data type="ID"/> </attribute> </optional> <optional> <attribute name="xml:base"> <data type="anyURI"/> </attribute> </optional> </define> <!-- topic: Topic element ........................................ --> <define name="topic"> <element name="topic"> <ref name="attlist.topic"/> <zeroOrMore> <ref name="instanceOf"/> </zeroOrMore> <optional> <ref name="subjectIdentity"/> </optional> <zeroOrMore> <choice> <ref name="baseName"/> <ref name="occurrence"/> </choice> </zeroOrMore> </element> </define> <define name="attlist.topic" combine="interleave"> <attribute name="id"> <data type="ID"/> </attribute> </define> <!-- instanceOf: Points To a Topic representing a class .......... --> <define name="instanceOf"> <element name="instanceOf"> <ref name="attlist.instanceOf"/> <choice> <ref name="topicRef"/> <ref name="resourceRef"/> <ref name="subjectIndicatorRef"/> </choice> </element> </define> <define name="attlist.instanceOf" combine="interleave"> <optional> <attribute name="id"> <data type="ID"/> </attribute> </optional> </define> <!-- subjectIdentity: Subject reified by Topic ................... --> <define name="subjectIdentity"> <element name="subjectIdentity"> <ref name="attlist.subjectIdentity"/> <zeroOrMore> <choice> <ref name="topicRef"/> <ref name="resourceRef"/> <ref name="subjectIndicatorRef"/> </choice> </zeroOrMore> </element> </define> <define name="attlist.subjectIdentity" combine="interleave"> <optional> <attribute name="id"> <data type="ID"/> </attribute> </optional> </define> <!-- topicRef: Reference to a Topic element ...................... --> <define name="topicRef"> <element name="topicRef"> <ref name="attlist.topicRef"/> <empty/> </element> </define> <define name="attlist.topicRef" combine="interleave"> <optional> <attribute name="id"> <data type="ID"/> </attribute> </optional> <optional> <attribute name="xlink:type" a:defaultValue="simple"> <value type="NMTOKEN">simple</value> </attribute> </optional> <attribute name="xlink:href"> <data type="anyURI"/> </attribute> </define> <!-- subjectIndicatorRef: Reference to a Subject Indicator ....... --> <define name="subjectIndicatorRef"> <element name="subjectIndicatorRef"> <ref name="attlist.subjectIndicatorRef"/> <empty/> </element> </define> <define name="attlist.subjectIndicatorRef" combine="interleave"> <optional> <attribute name="id"> <data type="ID"/> </attribute> </optional> <optional> <attribute name="xlink:type" a:defaultValue="simple"> <value type="NMTOKEN">simple</value> </attribute> </optional> <attribute name="xlink:href"> <data type="anyURI"/> </attribute> </define> <!-- baseName: Base Name of a Topic .............................. --> <define name="baseName"> <element name="baseName"> <ref name="attlist.baseName"/> <optional> <ref name="instanceOf"/> </optional> <optional> <ref name="scope"/> </optional> <ref name="baseNameString"/> <zeroOrMore> <ref name="variant"/> </zeroOrMore> </element> </define> <define name="attlist.baseName" combine="interleave"> <optional> <attribute name="id"> <data type="ID"/> </attribute> </optional> </define> <!-- baseNameString: Base Name String container .................. --> <define name="baseNameString"> <element name="baseNameString"> <ref name="attlist.baseNameString"/> <text/> </element> </define> <define name="attlist.baseNameString" combine="interleave"> <optional> <attribute name="id"> <data type="ID"/> </attribute> </optional> </define> <!-- variant: Alternate forms of Base Name ....................... --> <define name="variant"> <element name="variant"> <ref name="attlist.variant"/> <ref name="parameters"/> <optional> <ref name="variantName"/> </optional> <zeroOrMore> <ref name="variant"/> </zeroOrMore> </element> </define> <define name="attlist.variant" combine="interleave"> <optional> <attribute name="id"> <data type="ID"/> </attribute> </optional> </define> <!-- variantName: Container for Variant Name ..................... --> <define name="variantName"> <element name="variantName"> <ref name="attlist.variantName"/> <choice> <ref name="resourceRef"/> <ref name="resourceData"/> </choice> </element> </define> <define name="attlist.variantName" combine="interleave"> <optional> <attribute name="id"> <data type="ID"/> </attribute> </optional> </define> <!-- parameters: Processing context for Variant .................. --> <define name="parameters"> <element name="parameters"> <ref name="attlist.parameters"/> <oneOrMore> <choice> <ref name="topicRef"/> <ref name="resourceRef"/> <ref name="subjectIndicatorRef"/> </choice> </oneOrMore> </element> </define> <define name="attlist.parameters" combine="interleave"> <optional> <attribute name="id"> <data type="ID"/> </attribute> </optional> </define> <!-- occurrence: Resources regarded as an Occurrence ............. --> <define name="occurrence"> <element name="occurrence"> <ref name="attlist.occurrence"/> <optional> <ref name="instanceOf"/> </optional> <optional> <ref name="scope"/> </optional> <choice> <ref name="resourceRef"/> <ref name="resourceData"/> </choice> </element> </define> <define name="attlist.occurrence" combine="interleave"> <optional> <attribute name="id"> <data type="ID"/> </attribute> </optional> </define> <!-- resourceRef: Reference to a Resource ........................ --> <define name="resourceRef"> <element name="resourceRef"> <ref name="attlist.resourceRef"/> <empty/> </element> </define> <define name="attlist.resourceRef" combine="interleave"> <optional> <attribute name="id"> <data type="ID"/> </attribute> </optional> <optional> <attribute name="xlink:type" a:defaultValue="simple"> <value type="NMTOKEN">simple</value> </attribute> </optional> <attribute name="xlink:href"> <data type="anyURI"/> </attribute> </define> <!-- resourceData: Container for Resource Data ................... --> <define name="resourceData"> <element name="resourceData"> <ref name="attlist.resourceData"/> <text/> </element> </define> <define name="attlist.resourceData" combine="interleave"> <optional> <attribute name="id"> <data type="ID"/> </attribute> </optional> </define> <!-- association: Topic Association ............................. --> <define name="association"> <element name="association"> <ref name="attlist.association"/> <optional> <ref name="instanceOf"/> </optional> <optional> <ref name="scope"/> </optional> <oneOrMore> <ref name="member"/> </oneOrMore> </element> </define> <define name="attlist.association" combine="interleave"> <optional> <attribute name="id"> <data type="ID"/> </attribute> </optional> </define> <!-- member: Member in Topic Association ......................... --> <define name="member"> <element name="member"> <ref name="attlist.member"/> <optional> <ref name="roleSpec"/> </optional> <zeroOrMore> <choice> <ref name="topicRef"/> <ref name="resourceRef"/> <ref name="subjectIndicatorRef"/> </choice> </zeroOrMore> </element> </define> <define name="attlist.member" combine="interleave"> <optional> <attribute name="id"> <data type="ID"/> </attribute> </optional> </define> <!-- roleSpec: Points to a Topic serving as an Association Role .. --> <define name="roleSpec"> <element name="roleSpec"> <ref name="attlist.roleSpec"/> <choice> <ref name="topicRef"/> <ref name="resourceRef"/> <ref name="subjectIndicatorRef"/> </choice> </element> </define> <define name="attlist.roleSpec" combine="interleave"> <optional> <attribute name="id"> <data type="ID"/> </attribute> </optional> </define> <!-- scope: Reference to Topic(s) that comprise the Scope ........ --> <define name="scope"> <element name="scope"> <ref name="attlist.scope"/> <oneOrMore> <choice> <ref name="topicRef"/> <ref name="resourceRef"/> <ref name="subjectIndicatorRef"/> </choice> </oneOrMore> </element> </define> <define name="attlist.scope" combine="interleave"> <optional> <attribute name="id"> <data type="ID"/> </attribute> </optional> </define> <!-- mergeMap: Merge with another Topic Map ...................... --> <define name="mergeMap"> <element name="mergeMap"> <ref name="attlist.mergeMap"/> <zeroOrMore> <choice> <ref name="topicRef"/> <ref name="resourceRef"/> <ref name="subjectIndicatorRef"/> </choice> </zeroOrMore> </element> </define> <define name="attlist.mergeMap" combine="interleave"> <optional> <attribute name="id"> <data type="ID"/> </attribute> </optional> <optional> <attribute name="xlink:type" a:defaultValue="simple"> <value type="NMTOKEN">simple</value> </attribute> </optional> <attribute name="xlink:href"> <data type="anyURI"/> </attribute> </define> <start> <choice> <ref name="topicMap"/> </choice> </start> </grammar> |
<?xml version="1.0" encoding="UTF-8"?> <!-- Draft W3C XML Schema for XTM 1.1. First version created by Max Voskob using XML Spy. This version slightly modified by Lars Marius Garshol. TODO: - edit XLink support into same file - make it use XTM namespace - update with latest changes - make XLink attributes fixed - type xlink:href with anyURI - baseNameString and resourceData look strange - verify that it is correct - see what can be done to make schema closed (i.e: outlaw extensions) - add xml:base --> <xs:schema xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/> <!-- topicMap ........................................................... --> <xs:element name="topicMap"> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="topic"/> <xs:element ref="association"/> <xs:element ref="mergeMap"/> </xs:choice> <xs:attribute name="id" type="xs:ID"/> </xs:complexType> </xs:element> <!-- topic .............................................................. --> <xs:element name="topic"> <xs:complexType> <xs:sequence> <xs:element ref="instanceOf" minOccurs="0" maxOccurs="unbounded"/> <xs:element ref="subjectIdentity" minOccurs="0"/> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="baseName"/> <xs:element ref="occurrence"/> </xs:choice> </xs:sequence> <xs:attribute name="id" type="xs:ID" use="required"/> </xs:complexType> </xs:element> <!-- instanceOf ......................................................... --> <xs:element name="instanceOf"> <xs:complexType> <xs:choice> <xs:element ref="topicRef"/> <xs:element ref="resourceRef"/> <xs:element ref="subjectIndicatorRef"/> </xs:choice> <xs:attribute name="id" type="xs:ID"/> </xs:complexType> </xs:element> <!-- subjectIdentity .................................................... --> <xs:element name="subjectIdentity"> <xs:complexType> <xs:sequence> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="topicRef"/> <xs:element ref="resourceRef"/> <xs:element ref="subjectIndicatorRef"/> </xs:choice> </xs:sequence> <xs:attribute name="id" type="xs:ID"/> </xs:complexType> </xs:element> <!-- topicRef ........................................................... --> <xs:element name="topicRef"> <xs:complexType> <xs:attribute name="id" type="xs:ID"/> <xs:attribute ref="xlink:type"/> <xs:attribute ref="xlink:href" use="required"/> </xs:complexType> </xs:element> <!-- subjectIndicatorRef ................................................ --> <xs:element name="subjectIndicatorRef"> <xs:complexType> <xs:attribute name="id" type="xs:ID"/> <xs:attribute ref="xlink:type"/> <xs:attribute ref="xlink:href" use="required"/> </xs:complexType> </xs:element> <!-- baseName ........................................................... --> <xs:element name="baseName"> <xs:complexType> <xs:sequence> <xs:element ref="instanceOf" minOccurs="0"/> <xs:element ref="scope" minOccurs="0"/> <xs:element ref="baseNameString"/> <xs:element ref="variant" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="id" type="xs:ID"/> </xs:complexType> </xs:element> <!-- baseNameString ..................................................... --> <xs:element name="baseNameString"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="id" type="xs:ID"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <!-- variant ............................................................ --> <xs:element name="variant"> <xs:complexType> <xs:sequence> <xs:element ref="parameters"/> <xs:element ref="variantName" minOccurs="0"/> <xs:element ref="variant" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="id" type="xs:ID"/> </xs:complexType> </xs:element> <!-- variantName ........................................................ --> <xs:element name="variantName"> <xs:complexType> <xs:choice> <xs:element ref="resourceRef"/> <xs:element ref="resourceData"/> </xs:choice> <xs:attribute name="id" type="xs:ID"/> </xs:complexType> </xs:element> <!-- parameters ......................................................... --> <xs:element name="parameters"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element ref="topicRef"/> <xs:element ref="resourceRef"/> <xs:element ref="subjectIndicatorRef"/> </xs:choice> <xs:attribute name="id" type="xs:ID"/> </xs:complexType> </xs:element> <!-- occurrence ......................................................... --> <xs:element name="occurrence"> <xs:complexType> <xs:sequence> <xs:element ref="instanceOf" minOccurs="0"/> <xs:element ref="scope" minOccurs="0"/> <xs:choice> <xs:element ref="resourceRef"/> <xs:element ref="resourceData"/> </xs:choice> </xs:sequence> <xs:attribute name="id" type="xs:ID"/> </xs:complexType> </xs:element> <!-- resourceRef ........................................................ --> <xs:element name="resourceRef"> <xs:complexType> <xs:attribute name="id" type="xs:ID"/> <xs:attribute ref="xlink:type"/> <xs:attribute ref="xlink:href" use="required"/> </xs:complexType> </xs:element> <!-- resourceData ....................................................... --> <xs:element name="resourceData"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="id" type="xs:ID"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <!-- association ........................................................ --> <xs:element name="association"> <xs:complexType> <xs:sequence> <xs:element ref="instanceOf" minOccurs="0"/> <xs:element ref="scope" minOccurs="0"/> <xs:element ref="member" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="id" type="xs:ID"/> </xs:complexType> </xs:element> <!-- member ............................................................. --> <xs:element name="member"> <xs:complexType> <xs:sequence> <xs:element ref="roleSpec" minOccurs="0"/> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="topicRef"/> <xs:element ref="resourceRef"/> <xs:element ref="subjectIndicatorRef"/> </xs:choice> </xs:sequence> <xs:attribute name="id" type="xs:ID"/> </xs:complexType> </xs:element> <!-- roleSpec ........................................................... --> <xs:element name="roleSpec"> <xs:complexType> <xs:choice> <xs:element ref="topicRef"/> <xs:element ref="resourceRef"/> <xs:element ref="subjectIndicatorRef"/> </xs:choice> <xs:attribute name="id" type="xs:ID"/> </xs:complexType> </xs:element> <!-- scope .............................................................. --> <xs:element name="scope"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element ref="topicRef"/> <xs:element ref="resourceRef"/> <xs:element ref="subjectIndicatorRef"/> </xs:choice> <xs:attribute name="id" type="xs:ID"/> </xs:complexType> </xs:element> <!-- mergeMap ........................................................... --> <xs:element name="mergeMap"> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="topicRef"/> <xs:element ref="resourceRef"/> <xs:element ref="subjectIndicatorRef"/> </xs:choice> <xs:attribute name="id" type="xs:ID"/> <xs:attribute ref="xlink:type"/> <xs:attribute ref="xlink:href" use="required"/> </xs:complexType> </xs:element> </xs:schema> |
This section provides information on how to serialize SAM instances using the XTM syntax. The main text of this specification already provides the constraints necessary to ensure interoperability, but as serialization is not entirely straightforward, this section provides additional guidance for implementors.
Ed. Note:
Needs to be written.
This section lists the differences between XTM 1.1 and XTM 1.0. The differences are:
·
The instanceOf
element is now allowed inside the baseName
element.
·
The resourceRef
element is now allowed inside the parameters
,
instanceOf
, and roleSpec
elements.
Ed. Note:
Complete list.
Resolutions to the issues listed below have been proposed by the authors, but not approved by the committee. They are documented here for reference.
Does XTM allow full XPointer references, or only bare names?
Is whitespace allowed in the xlink:href
attribute? If it is allowed,
how is it interpreted? If it is not allowed, what action is taken when it is
found?
Issue (xtm-where-resourceref):
Should resourceRef
be allowed in roleSpec
, instanceOf
and parameters
?
Should we retain the id
attribute on element types which do
not represent something that can be reified?
What version number should we give the updated XTM syntax?
Which schema should be the normative schema?
Should all or some element types
which have xlink:href
attributes also be given an xlink:actuate
attribute? If so, what should the legal range of values be?
Issue (xtm-xmlbase-everywhere):
Should the xml:base
attribute be allowed on every
non-empty element type?
Issue (xtm-subjectidentity-children):
Should multiple resourceRef
elements be allowed inside subjectIdentity
?
Issue (xtm-variantname-deprecate):
Should the variantName
element type be deprecated,
and the content model of variant
be adjusted to make it redundant?
Issue (xtm-parameters-deprecate):
Should the parameters
element type be deprecated
and replaced by scope
?
Should the XSDL and RELAX-NG
schemas declare xlink:href
attributes to be of type URI?
Is it an error for a topicRef
element to refer to a
non-existing topic?
Issue (xtm-topicref-fragment):
Is the URI given in the xlink:href
attribute (of topicRef
elements) required to have a
fragment identifier?