XML Europe 2004 logo

Modular Information: Using XInclude to Support Re-Use for Authoring and Production

Abstract

XML was originally intended primarily to support the authoring and production of technical documents and this is still an important application of XML. While there are many compelling reasons to use XML for technical documents, such as the ability to produce many different output and deliverable forms from a single set of source files, the ability to re-use the same information object among several units of publication is a particularly important one because of its implications for increased information accuracy and reduced authoring and translation costs. Except for the weak and dangerous external parsed entity mechanism, the XML specification provides no direct support for re-using information objects. Thus, authoring support and production systems must provide that support themselves. Often this is done using proprietary or purpose-built mechanisms, such as those provided by typical XML-aware content management systems. However, the W3C's XML Inclusions (XInclude) specification provides a basic mechanism that standardizes the way that XML information components are linked in order to establish use-by-reference (re-use) relationships. This simple mechanism is relatively easy to implement using most XML processing technologies (XSLT, Java, etc.). The use of XInclude provides a standard, generic, non-proprietary facility for creating and managing compound documents.

This paper first discusses the basic technical and practical aspects of XML information re-use. It then describes basic approaches for using XInclude in typical authoring support and document production systems to create and manage technical documents organized as compound documents that include re-used components. Discusses some ways that the base XInclude specification can be extended to better support the needs of technical document authoring, in particular, the use of specialized element types in place of the standard xi:include element type. In addition to the practicalities of implementing XInclude in XML editors and processing tools, the paper also discusses information management issues raised by the use of shared information objects and outlines information management policies and work practices that can be used to address these issues. Finally, the paper discusses, in general terms, real authoring support and production systems that use these techniques for managing use-by-reference.

Keywords


Table of Contents

1. Introduction: Re-Use and Technical Document Authoring
1.1. Business Drivers For and Costs Of Re-Use
1.2. Re-Use Is Hard And Hard For Writers
1.3. Terminology
1.4. Re-Use and Content Management
2. The XInclude Facility
3. Integrating XInclude With Authoring Document Types
3.1. Specializing The xi:include Element
3.2. Reference Type Constraints
3.3. Authoring Non-Use-By-Reference Hyperlinks
4. Re-Use and XML Authoring
4.1. Point and Click Reference Target Selection
4.2. Reflection of TItles at The Point of Reference
5. Re-Use and Rendition Generation
6. Conclusions
Bibliography
Biography

1. Introduction: Re-Use and Technical Document Authoring

The focus of this paper is on the authoring and production of technical documents, by which I mean primarily documents that support the performance by humans of specific tasks, such as the operation of computer software and hardware, repair, assembly, and test of complex machinery, or the use of consumer electronics. Typical examples include software user manuals, technical training materials, aircraft manuals, military technical orders, and so on. Documents of this type tend to reflect the following requirements and business constraints:

  • They represent an unavoidable business cost and usually do not produce any direct offsetting revenue.

  • They have relatively simple presentation forms.

  • There is a high degree of commonality between different instances of the things being documented. For example, different models of products within the same product family may have many features and implementing components in common or the same subprocedures may occur in different high-level procedures.

  • Different information types may share the same content, such as sharing conceptual information between user manuals and technical training materials.

  • Product, and therefore document, life cycles are very short, making documentation development a gating factor in product release. This is typical of low-cost consumer electronics such as mobile phones, portable music players, and personal computer peripherals.

  • Product, and therefore document, life cycles are very long, making long-term maintenance of the document source a requirement. This is typical of aircraft and other big-ticket capital investments such as large-scale printing presses where the expected service life is twenty years or more.

  • Documents may be tailored to narrow classes of product or possibly to individual product instances, greatly increasing the number of distinct configurations of a single logical manual. For example, aircraft maintenance manuals may be tailored to specific airlines or aircraft service vendors or, ideally, to specific aircraft tail numbers. These manuals may need to be updated over time to reflect the specific service history of a given product instance, such as operational environment, upgrades and engineering changes applied, and so on.

  • Documents may be translated into thirty or more national languages. This is especially true for consumer electronics and enterprise computer software systems. This also increases the number of distinct versions of the same logical unit of publication.

These requirements also exist to one degree or another in technical documentation that is not product documentation, such as legal publishing and scientific, technical, and medical (STM) publishing, but these business domains tend to be driven more by repurposing than re-use, that is, the publishing of otherwise independent information objects in different packages, rather than the composition of interdependent information objects into distinct units of publication. Thus re-use for authoring is less of a concern, if a concern at all, as new information packages tend to be constructed as a final packaging step, rather than as an initial authoring activity. However, the underlying technology required is, or can be, the same, and the basic information and content management issues and requirements are the same in both business domains.

And of course, use-by-reference of XML elements may be of value in XML processing scenarios that have nothing to do with technical documentation. However, in those scenarios the use and implementation of XInclude or similar transclusion mechanisms is essentially a data processing issue and not an authoring or information management issue. As this paper and others demonstrate, the implementation of XInclude as part of an XML data process poses no particular technical challenges and can be done by any competent programmer using almost any XML processing technology, including XSLT[XSLT], SAX[SAX], and XML-DOM[XML-DOM].

The challenges with re-use in general, and therefore with XInclude in particular, are the information management and workflow issues that arise when you have large systems of interdependent information objects developed by disparate but interacting groups of people over long life cycles. These challenges are entirely a product of authoring as an ongoing activity. Many enterprises that use XML for technical documentation are starting to realize that there is significant potential business advantage in the re-use of common information components. However, the advantage of re-use comes with a cost.

One purpose of this paper is to explore both the value of use-by-reference and its potential costs so that enterprises can make fully-informed decisions about how to address their requirements for information re-use. This paper then focuses on XInclude as a standard enabling technology that provides an attractive technical framework for implementing use-by-reference in the most general and sustainable way. This paper also serves to distinguish “true use-by-reference”, as typified by XInclude, from the use of XML external parsed entities (and their equivalents), which is essentially “use by copy”.

1.1. Business Drivers For and Costs Of Re-Use

The above stated characteristics of technical documents tend to drive the following business goals:

  • Minimize the time required to develop information objects (meet business time constraints)

  • Minimize the labor cost required to develop information objects (limit cost of documentation)

  • Maximize the scope of potential re-use of a given information object (limit redundant information development)

For businesses where there are serious legal liability and safety issues, such as aircraft manuals, additional business goals include:

  • Provide a record of the evolution of every information object over time. For example, if an error is introduced into a repair procedure, being able to determine when that error was first introduced, what information objects it was propagated to, and what publications it has been used in.

  • The ability to recreate any version in time of any unit of publication produced. For example, be able to recreate the manual for a specific aircraft model current at a specific point in time.

While these two additional requirements could be of valuable in any business, the cost of satisfying them is quite high because of the necessary sophistication of information management systems that can manage the sheer number of versions and dependency links. Thus they are usually only set as system requirements when the potential cost of not having them is high, as is the case for safety critical equipment. The short service life cycle of most consumer products means that there is little need to maintain more than a few year's worth of old versions and it may be sufficient in many cases to simply keep offline archives of source files and delivered renditions as they are produced.

From these requirements and goals it should be clear that the ability to do effective re-use of information objects is a major component of any sophisticated technical documentation authoring and management strategy. Other strategy components include the production of many delivery forms from a single XML source (“single sourcing”), the use of standards such as XSLT, XSL-FO, and SVG to reduce the cost of producing documents in many national languages, and so on.

While re-use has obvious and compelling value, it is important to caution that true and wide-ranging re-use is hard, often harder than most people realize it will be.

1.2. Re-Use Is Hard And Hard For Writers

Re-use is hard for at least two reasons. First, the technology infrastructure required to make re-use practical for authors is non-trivial and must be implemented carefully and thoroughly. Second, it requires document authors to work collaboratively and often under greater time pressure than they are used to or would prefer. It often requires them to be much more aware of the details of how the source is constructed and how to work with versioning systems in sophisticated ways. That is, writers have to be aware of both how to do re-use appropriately and how to do it correctly using their tools, and do it in close cooperation with other writers under strict time and budget pressures.

As a technical writer by training and practice I know that these are pressures that many technical writers do not like and do not necessarily adapt to well. Many, if not most, technical writers are essentially creative, introverted people who like to work more or less in isolation, focusing on the words they are writing and how they are presented without much concern with how those words actually get stored and processed in their computer. Any XML-based documentation system changes that simply by breaking the direct connection between what you type and what you see. Most first-generation XML system do not change the typical one-document, one writer development process. Most writers can adapt to this type of environment, especially once they see how structured document authoring can in fact make their job easier.

However, any re-use-based documentation system completely breaks this way of working, forcing writers to be information engineers much more than creative writers. This can be a severe and jarring change for many writers. Implementors of such systems must be sensitive to the potential cultural resistance and work practice disruption, as well as the fact that you are, in absolute terms, making writers' jobs harder at the same time that you are making them more productive and efficient. That is, it is always the case that labor saving devices mean that fewer people can do more work, which means that the people left to do the work always have, as individuals, more work to do. This is certainly true for re-use-enabling authoring and production systems. While fewer authors can produce more published products more quickly, the intellectual skills and effort required to do so are greater than before because the actual work activity has become more sophisticated and complex.

1.3. Terminology

There is no well-established terminology for re-use in the technical documentation domain. In this paper and in my professional practice I use the following terminology.[1] Also, see Figure 1.

bounded object set (BOS)

The finite set of source documents that comprise the members of a compound document. In XML, the members of the bounded object set are the XML documents involved, as represented by the XML files that contain the document elements of those documents, and do not reflect any external parsed entities those XML documents may use.

Note that the effective content of a compound document may not include all the content of all the members of the bounded object because the effective content is defined by the use-by-reference relationships which may address subcomponents of any given BOS member.

Thus, the BOS reflects the storage-object-level dependencies among the members of a compound document as implied by the use-by-reference relationships in the BOS members themselves. For example, if document A has three XInclude links to document B, that implies a single dependency relationship between document A and document B. Because BOS relationships are between storage objects they can be maintained purely in the storage object layer of an information management system.

compound document

A source document composed of one or more source files. In XML, a compound document is one composed of one or more distinct XML documents (as opposed to a single XML document composed of multiple external parsed entities). Compound documents are defined semantically via hyperlinks, i.e., XInclude links, HyTime value reference links, or similar semantic constructs. Because they are associated via hyperlinks, the members of a compound document do not have any direct syntactic dependencies on each other, although the information management system or governing business rules may impose syntactic dependencies, such as requiring that XML element IDs be unique across all the member documents.

content management

The task of managing documents that will be used to publish information products primarily for human consumption. Content management is a special case of information management that supports the specific tasks of authoring and production. Content management depends on document management.

document

A source component that acts as the highest syntactic unit. In most documentation formats there is a one-to-one mapping between documents and storage objects (files). In XML a document may be composed of more than one storage object through the use of external parsed entities. Ideally, a document should be able to function as a true object in that it has identity and can be meaningfully processed or validated in isolation.

hyperlink

A semantic relationship established among two or more information objects. To be a truly semantic relationship the hyperlink object must carry some indicator of its purpose, although in practice most hyperlinks are taken to have the default semantic of “navigation enabled”, e.g., HTML “A” links. Use by reference relationships are specialized hyperlinks with the base semantic of “re-use”. Conceptually, hyperlinks are themselves information objects, although in practice hyperlinks may be represented in the primary document source format (e.g., XML) or purely in metadata as collections of pointers. Because both storage mechanisms can represent the same semantics it doesn't matter what source representation form is used as far as application-level processing is concerned (except to the degree that applications might need to create new hyperlinks and store them back into the system). That is, as semantic things, hyperlinks are just a specialized form of information object.

Note that hyperlinks, being semantic, are always among information objects, regardless of the form of address used. For example, a hyperlink that addresses an XML file as one end is actually addressing the root element of that element. That is, while the XML file may be the syntactic target of the address, an XML file is not an information object, but the root element of the document is an information object, so it must be the actual semantic target of the link.

Note also that all hyperlinks have at least two ends, even if the hyperlink only explicitly addresses one target. In the case where there is only one explicit target address the precise definition of what the implicit target or targets are is a function of the specific linking mechanism used, but in general it will be the linking element itself.

information object

A semantic unit of information. In XML, information objects include elements, attributes, and processing instructions. Informally, anything that can be addressed using something like XPointer[XPointer] or that is represented by a node in a DOM-type data structure. Information objects have identity (and thus can be reliably addressed). Information objects are semantic in that their use and processing is always in terms of the abstraction they represent, not their syntactic form as stored in a storage object. For example, in XML, elements are addressed by their position within an abstract document tree or by their XML-defined properties (e.g., ID-type attributes), not by their syntactic position within the sequence of characters that makes up the XML entity that contains the XML markup from which the element is constructed.

An information object is associated with exactly one document, meaning that every information object is implicitly associated with the storage object that contained the source data from which the information object was constructed. For the purposes of addressing information objects, this means that every information object can be addressed in terms of the storage object that “contains” it.

In the general case, every information object is a potential unit of re-use.

An important property of information objects is that, because they are abstractions, information objects with different syntactic representations may be meaningfully combined to form compound documents. All that is required is that the system doing the semantic processing be able to access all the information objects involved[REYNOLDS]. In XML systems this is usually done by mapping all the data to an XML representation but this is not a requirement. For example, systems can define more generic abstraction mechanisms to which different data types can be mapped, providing a single base data model and API for accessing information objects, as well as a single addressing syntax for addressing information objects of all types. The grove mechanism defined in the HyTime[HyTime] and DSSSL[DSSSL] standards is an example of such a generic information object data model.

member document

A document that is a member of a compound document's bounded object set. In a re-use-based system a single document may be a member of any number of bounded object sets.

semantic re-use

Re-use based on a semantic relationship between the using context and the used information object such that there are no necessary syntactic constraints imposed on the used information object. That is, the reference is resolved and processed after the initial syntactic processing of the documents involved. For example, any re-use that can be implemented in an XSLT style sheet is, by definition, semantic re-use, not syntatic re-use (because all XSLT processing occurs after all the documents involved have been parsed). See use by reference.

storage object

An opaque, invariant, unit of storage in a storage management system. Essentially, the abstraction of the common concept of “file”. The term “storage object” is used to include non-file storage mechanisms such as relational database BLOBs. As objects, storage objects have identity. By “opaque” is meant that the storage object system does not need to know anything about the bytes within the storage object in order to provide minimum storage access functions (creation, access, deletion, movement, dependency relationship management). That is, a storage management system can, by definition, manage storage objects of any type regardless of the semantics of the data stored. Any information management system that can only manage data of a particular type is essentially a semantic management system with a limited and unexposed storage management layer. For example, an “XML document management system” that manages XML at the element level can be viewed either as treating each element as a separate storage object or treating all the elements as members of a single massive storage object.

Storage objects are conceptually invariant in that once created they do not change. In storage systems that are not versioning storage systems, if a new set of bytes is associated with an existing storage object identifier then the original storage object has been destroyed and a new storage object has been created. This restriction is necessary in order that there can be a one-to-one mapping between source data and information objects such that an address created using only knowledge of the source data (e.g., the XML markup) will continue to address the same information object constructed from the storage object. Without this restriction there is no guarantee that the same address resolved at two different times will address the “same” information object.

In a versioning storage system every new version of an existing storage object is itself a separately-addressible storage object and therefore satisfies the requirement of invariance.

syntatic re-use

Re-use based on a syntactic relationship between the use context and the used bytes such that there are unavoidable syntactic constraints imposed on the used content. That is, the reference is resolved and processed during the initial syntactic processing of the information objects involved. XML external parsed entities are a form of syntactic re-use. See use by copy.

true re-use

Use by reference (semantic re-use). The other form of re-use, use by copy, is not really re-use because the content involved is literally or essentially copied.

use by copy

The re-use of an information object by creating a new copy of it (“cut and paste”), either literally by cutting and pasting or indirectly by means of a syntactic inclusion of the source data from which the information object is constructed. Note that the use of XML external parsed entities is a form of use by copy because, syntactically, an external parsed entity reference is exactly equivalent to having the entity's bytes occur at the point of reference. That is, use by copy is a form of syntactic re-use, not semantic re-use.

use by reference (UBR)

The use of an information object by means of a semantic link with the defined semantic of re-use. The normal processing intent of a use by reference is that the referenced information object should be processed as though it had occurred (semantically) at the point of reference. Because use by reference is by means of semantic links, the use does not impose any necessary syntactic constraints on the information object pointed to. Any constraints that may be imposed are defined entirely by the system that resolves and processes the use-by-reference link.

The existence of a use-by-reference relationship between information objects in two different documents implies a dependency relationship between the two documents. By the same token, if one document includes a use by reference relationship to an information object in another document then both documents are members of the same bounded object set.

use context

For a re-used information object each of the compound documents within which it is used. Each compound document creates a distinct use context. Two information objects have the same use context if and only if they occur in members of the same bounded object set.

XML document

A set of one or more external parse entities that syntactically represent a singlely-rooted tree of elements conforming to the rules of the XML recommendation[XML].

The diagram in Figure 1 illustrates the three basic layers in any information management system. At the bottom is the storage management layer, which manages access to storage objects. In the middle is the semantic layer, which manages access to semantic data objects constructed from the syntactic content of storage objects. In practice the semantic layer might be something like a DOM or an abstract API over a relational database. At the top is the application layer, which represents processing applied to semantic objects and storage objects in order to perform some task (which may be to create more semantic objects or storage objects). These layers can be found in any non-trivial system, from complex enterprise information management systems to XSLT scripts applied against individual XML files. In many systems the three layers may not be clearly distinguished or exposed.

click image for full size view

Figure 1. Information Management System Layers

1.4. Re-Use and Content Management

If the only concern with semantic re-use was how to implement the data processing required to produce specific deliverable renditions from XML documents then content management would not be a concern. The actual processing of XInclude links, for example, is fairly straightforward and there are a number of systems that do it or implementations that can be quickly integrated into purpose-built systems[Xincl Impl]. That is, given that the documents involved, processing them is easy.

The challenge is in enabling the authoring of documents that do semantic re-use. It is here that challenging issues of content management are unavoidable, especially as the length of the documents' life cycles and the scope of re-use increases.

The key content management challenges imposed by re-use include:[2]

  • Enabling the quick and accurate creation of use-by-reference links, which requires the ability to find and refer to the appropriate information objects. For example, expecting authors to hand-code XPointers or similar addresses is not realistic or practical. This is essentially the same problem as creating non-use-by-reference links. However, in many cases, non-use-by-reference links are limited in their potential scope to the members of a pre-defined compound document while use-by-reference links may potentially be made to any component in the document repository.

  • Maintaining use-by-reference links as re-used components are revised and as interrelated compound documents go through independent work flows and revision cycles.

  • Providing traceability of use-by-reference links in order to answer the “where is this thing used?” question.

  • Managing the human-to-human communication required by the collaborative authoring implicit in a re-use-based system, especially if the authors are geographically distributed.

  • Managing non-re-use hyperlinks such that a given hyperlink from a re-used information object is appropriate in all the object's use contexts. For example, if information object A includes a cross reference to information object B in another document, then if information object B is not included in all the use contexts that include object A, the link will be broken in some use contexts. This issue can only be solved completely by binding the links to their use contexts, either by making them out-of-line links or using some sort of use-context-sensitive applicability mechanism to control the processing of specific links.

Thus it is not possible to discuss XInclude and authoring without also discussing content management. One potential danger with XInclude is that it is easy enough to implement that you may implement a system that provides more functionality than authors can practically take advantage of due to lack of comprehensive management facilities. By the same token, it is possible to create relatively low-cost content management and authoring systems that enable the productive use of XInclude by not immediately providing all the link management and tracking facilities that may eventually be needed and by imposing editorial constraints that avoid some of the more challenging linking use cases, such as disallowing links from re-used information objects that are used in more than one use context, which largely avoids the issue of per-context link management.

It should also be noted up front that when using XInclude or similar mechanisms based on embedded XML markup for representing relationships it is always possible to answer questions like “where used” using brute force approaches, which may be slow but that are easy to implement. In addition, simple conventions that make it possible to quickly find the root documents of bounded object sets also make things easier. For example, if you use the convention that every compound document is stored using the same directory structure and naming convention then it is easy to write an XSLT or Java process that finds all the compound documents, calculates their bounded object sets and then reports on how many of those bounded object sets contain a specific document.

Obviously a more complete solution would maintain the knowledge of bounded object set participation dynamically as documents are added to the system and new versions are created, but that is significantly more involved than the brute force method. If you have a relatively low volume of documents and don't always need instant answers to these questions, then a brute force solution may be adequate and, due to its lower cost, actually provide attractive value.

The key point here is that because all the relationships are defined using XML markup there is no absolute requirement to have a sophisticated content management system in place before you can start taking advantage of XInclude. If you do not have an high performance or scalability requirement immediately then it is possible to implement a lot of functionality with suboptimal, but acceptable, performance for a reasonable cost. For example, by using CVS as the base versioning storage management system, you can implement commit-time processing to maintain indexes of bounded object set members or information object where-used information using simple, workaday relational databases and a little bit of Java or Python code.

It is only when you need to support hundreds of authors or thousands of units of publication or many versions over time that it becomes absolutely necessary to step up to more involved systems that are expressly engineered to address the performance and scale challenges.

2. The XInclude Facility

The W3C XInclude specification[XIncl] defines a simple mechanism for creating use-by-reference links within XML documents. The specification defines two element types: xi:include and xi:fallback.[3]

The xi:include element is used to point to the elements, processing instructions, comments, or characters to be used by reference. It uses two attributes to point to the included targets: href= and xpointer=, href= for pointing to entire resources (documents in the sense used in this paper) and xpointer= for addressing specific nodes (information objects) within the target document.

The xi:fallback element is used to provide some form of fallback content that an XInclude processor can use in the event that it cannot resolve the inclusion. This could be a simple text string such as “Target not resolvable” or document-specific semantic content. An xi:include element may have at most one xi:fallback child. The xi:fallback can include any elements, including other xi:include elements (as long as doing so would not create a cyclic reference, which is a fatal XInclude error). For example, you could use a series of nested fallbacks and includes to create a list of inclusions to try before finally giving up. Of course the fallback mechanism is intended primarily for dynamic delivery environments, such as the World Wide Web, where the availability of inclusion targets cannot be completely controlled. Within a closed content management system, this is usually not an issue, or if it is, the desired behavior is usually to report an error.

xi:include elements may occur anywhere in a document.

As currently specified, the XInclude specification requires that notation and external unparsed entity names be unique across all the members of a bounded object set such that two notations or entities with the same name in two different BOS members must also have the same values (or same effective values) for system ID, public ID, and, in the case of entities, notation. This is not normally an issue for notations, which are usually defined once in external DTD declarations, but may be an issue for applications that use external parsed entities. As an XML integrator and application designer I normally recommend against the use of external unparsed entities and notations because they offer little value in practice and only serve to complicate processing systems and content management systems. [4] So in practice this should not be an issue. If it is, it is always possible to create a (technically) non-conforming XInclude implementation that simply rewrites conflicting entity and notation names and references to them, just as any XInclude processor must be prepared to rewrite IDs and references to them (more about which below).

3. Integrating XInclude With Authoring Document Types

At its simplest, integrating XInclude with authoring document types requires only that you allow the xi:include element wherever it would be appropriate to have a use by reference. For example, given this initial content model for a section-type element:

<!ELEMENT sect
  (title,
   (sect_body |
    (intro?,
     subsect+)))
>

You would allow subsections to be used by reference by changing subsect+ into a repeating OR group with xi:include:

<!ELEMENT sect
  (title,
   (sect_body |
    (intro?,
     (subsect |
      xi:include)+)))
>

This does lead to an immediate problem: how to know what element type or types are allowed to be referenced for a given xi:include? For example, if you extend your authoring tool to allow authors to point and click at the included target, how does the tool know what things to offer the author in any given case?

Another problem is raised by sequence groups where each member of the sequence group might be used by reference. For example, consider this content model that uses specialized section-type elements to define the structure for a user manual:

<!ELEMENT body
  (getting_started,
   setup_and_install?,
   operation,
   troubleshooting?)
>

When xi:include is added, you get this content model:

<!ELEMENT body
  ((getting_started |
    xi:include),
   (setup_and_install |
    xi:include)?,
   (operation |
    xi:include),
   (troubleshooting |
    xi:include)?)
>

At least using the typical “insert element” features of most XML editors, it will not necessarily be clear to an author what is allowed where or when in this case. Also, in the absence of something we have yet to define, it would be difficult to force authors to select the correct target elements in the correct order.

One thing to consider when defining this type of authoring environment is when in the process will validation errors be reported? In this case the system cannot tell there is a problem until all the inclusions are resolved and even then it may not be possible to validate the result directly, at least without significant additional implementation effort. It would not serve authors well to allow them to innocently create incorrect documents.

For these reasons I find it impractical and suboptimal to use the xi:include element directly for authoring. To fully enable XInclude-based re-use for authoring I extend the base XInclude mechanism in two ways. First, I create specialized inclusion reference elements that make it easier and clearer where references are allowed. Second, I use a “reference type constraint” mechanism to indicate, for a given specialized reference element type, what element types it is allowed to refer to. These extensions mean that your documents as authored will not be conforming XInclude documents, but it should be clear that it is trivial to transform such documents into conforming XInclude documents simply by renaming all the specialized reference elements back to xi:include.

3.1. Specializing The xi:include Element

I find it best to define specialized inclusion elements that make it possible to fully constrain the occurrence of specific references to specific element types. Unfortunately, the current XInclude specification does not provide the same sort of “type” mechanism that XLink[XLink] does, so document types that uses these specializations are not, strictly speaking, conforming XInclude documents. However, they can easily be transformed into conforming XInclude documents if it ever became an issue.[5]

Using this approach, the first example above can be refined into this:

<!ELEMENT sect
  (title,
   (sect_body |
    (intro?,
     (subsect |
      subsect_include)+)))
>

<!ELEMENT subsect_include
  EMPTY
>
<!ATTLIST subsect_include
  href
    CDATA
    #IMPLIED
  xpointer
    CDATA
    #IMPLIED
  xinclude
    NMTOKEN
    #FIXED "xi:include"
>

The subsect_include is a specialized xi:include element, as indicated by the xinclude= attribute. The href= and xpointer= attributes are taken directly from the XInclude specification.

The xinclude= attribute is my private convention for indicating that a given element type is to be interpreted as one of the element types defined in the XInclude specification. It has no magic. However, XML processors can easily be written to look for this attribute and act on it. For example, an XSLT transform that converts these specialized elements into the proper XInclude elements might include this template:

<xsl:template match="*[@xinclude = 'xi:include']">
  <xi:include>
    <xsl:copy-of select="@href | @xpointer"/>
    <xsl:apply-templates/>
  </xi:include>
</xsl:template>

When defining specialized inclusion elements I like to use a consistent naming convention so that authors can predict what the XInclude element for any normal element would be.

3.2. Reference Type Constraints

Creating specialized XInclude elements solves the problem of constraining where references can occur but it does not do anything about constraining what the reference can point to. That is, there is still a requirement to constrain the type of thing referenced.

An obvious way to do this is to add another fixed attribute that lists the element types that can be selected. I typically call this attribute reftype, short for “reference type constraint”. The value the attribute allows is dependent on your application's needs. The simplest approach is to specify a single target element type, e.g.:

<!ATTLIST subsect_include
  href
    CDATA
    #IMPLIED
  xpointer
    CDATA
    #IMPLIED
  xinclude
    NMTOKEN
    #FIXED "xi:include"
  reftype
    NMTOKEN
    #FIXED “subsect”
>

This is sufficient when there is always a one-to-one mapping between referencing elements and their allowed target. However, some applications may be more flexible.

For example, many document types use a DITA-like extension mechanism[DITA] to allow controlled specialization of base element types. This means both that it might not be possible to predict what the full set of possible targets are and that it would be meaningful, to the processing application, to refer to any specialization of some base form.

One way to enable this would be to allow XPath expressions that reference targets must match, rather than simple element type names.

To continue the previous example, say that we have a new attribute, base-type= that indicates the base element type of which a given element type is a specialization. For example, a specialized form of subsection might be declared like so:

<!ELEMENT concepts_and_terminology
  (%subsection_content;)
>
<!ATTLIST concepts_and_terminology
  %subsect_atts;
  base-type
    NMTOKEN
    #FIXED "subsect"
>

Here the base-type= attribute of the concepts_and_terminology element indicates formally that concepts_and_terminology is a specialization of subsect. This means that the subsect_include element can be redeclared to allow reference to any specialization of subsect:

<!ATTLIST subsect_include
  href
    CDATA
    #IMPLIED
  xpointer
    CDATA
    #IMPLIED
  xinclude
    NMTOKEN
    #FIXED "xi:include"
  reftype
    CDATA
    #FIXED "subsect | *[@base-type = 'subsect']"
>

Here the reftype= attribute has been changed from “NMTOKEN” to “CDATA” and the fixed value is now an XPath expression that allows either the original subsect element or any direct specializations of it.[6]

From an implementation standpoint there should be no great difficulty implementing this sort of XPath-based check in either XML authoring tools or in processing tools (although XSLT-based processors will require something like the EXSLT eval() extension function to do dynamic evaluation of XPaths). For example, this type of check requires only a couple of lines of code in Arbortext's Epic Editor[Epic] scripting language.

3.3. Authoring Non-Use-By-Reference Hyperlinks

The XInclude specification makes it clear that XInclude links always point to the targets in their original source context (what I call “as authored”). For example, if you include an element that has as a descendant another inclusion, that second inclusion is resolved relative to the source document that contains second inclusion, not the (abstract) document that results from resolving the first inclusion.

This same principle applies to all other uses of direct addresses: the addresses point to the targets at their source locations, not their locations following resolution of the includes.

By “direct addresses” I mean things like ID references, but also any other form of direct address, such as ID-based XPointers, document-type-specific pointers, and so on. “Indirect addresses” in this context would be addresses that address things based on potentially non-unique properties, such as containing a particular string in their content or having particular metadata values. For these types of address, it's just as good to resolve them in the context of the resolved result as it is in terms of the source documents—the result should be the same.

This rule that all direct addresses must be in terms of source location means that most, if not all, references in a given document type may be cross-document references, meaning that the reference crosses XML document boundaries. This means that normal ID references cannot be used because ID references are only meaningful within a single XML document—the XML specification provides no direct facility for doing ID references to elements in other documents.

To address any given element then you must first address the XML document that contains it. Having addressed the document you can then address a target element or elements however you care to, i.e., via unique ID, tree-based XPath, etc. This two-part address is reflected explicitly in the design of the xi:include element: the href= attribute addresses the document that contains the inclusion target (via URI), the xpointer= attribute addresses individual elements. If only a URI is specified, then the referenced element is implicitly the document's root element. If only an XPointer is specified, the document is implicitly the document that contains the xi:include element itself.

This same approach can be used with any element that needs to do referencing and must be done with elements that do ID references (unless you also provide an indirect addressing mechanism, such as that defined by the XML Indirection facility[XInd]—I'm ignoring that option here for the sake of simplicity, but you may likely find that something like XIndirect is the best way to solve certain link management problems).

For example, consider this typical cross reference element:

<!ELEMENT xref
  EMPTY
>
<!ATTLIST xref
  refid
    IDREF
    #REQUIRED
>

This element must be refactored to enable cross-document addressing. There are several ways this can be done:

  1. Replace the refid= attribute with a single attribute whose value is a URL, possibly with a fragment identifier for addressing individual elements.

  2. Redeclare the existing refid= attribute as NMTOKEN and add a second, optional attribute for addressing the target document.

  3. Use the same href=/xpointer= attribute pair as defined for XInclude.

Option 1 is probably the least attractive: it requires a fairly complete XPointer-aware processor and may present interoperability problems, as discussed in the XInclude specification itself.

Option 2 is fairly simple to implement and does not require any modification to existing documents as the name of the refid= attribute is not changed and all valid IDs are also valid name tokens. It also allows you to limit the syntax used for pointing to documents, which might be simple filenames, full URLs, or some content-management-specific document pointer. The downside is that whatever you define will necessarily be document type specific, meaning that you must implement the resolution processing in all contexts that need it (e.g., within the editor, within XSLT transforms, etc.). However, because the processing is based on normal ID resolution, it's usually not very hard to implement.

Option 3 is probably the best overall solution as it is the most standards-based and is consistent with the XInclude specification itself. Once you have implemented (or acquired an implementation) of XInclude references you should be able to use that same processing for other element types. However, this type of markup may be unfamiliar to authors or may require migration of existing documents to use the new attributes.

An important implication of the fact that elements are always addressed in the context of the document that contains them is that there is absolutely no need to ensure that element IDs are unique across documents. This is because all ID references are always qualified by the document that contains the ID. This means that the full address of any element is really a document ID and an element ID. This implies that any XML-aware content management system that requires that all element IDs be unique across the entire repository is either not thinking clearly about how XML really works or is providing a convenience for finding elements by providing a set of repository-wide IDs for elements in addition to whatever local, document-specific IDs they might have.

If your content management system also enforces and makes explicit the fact that documents, once created, are invariant, then it is also the case that you do not need to depend on element IDs in order to address elements reliably. When documents are truly invariant then position-based addresses are just as good as ID-based references because the element will never move.

Note that this discussion does not address the inherent problem of managing references to elements as new versions of the referenced documents are created. Most XML management systems address this problem by insisting on the use of element IDs and requiring that IDs, once assigned, not be changed. However, this is a limited solution and is not a general solution. This fundamental issue of versioned hyperdocument management is discussed in detail in [Heintz] and [RefTrack].

Regardless of how you implement your addressing, authors will require user interface support for creating references. This user interface support will be very similar to the user interface required for creating XInclude references, as discussed below.

4. Re-Use and XML Authoring

Most of the challenge of enabling re-use authoring is addressed by appropriate DTD design, as discussed above. However, the creation of an XML authoring environment that makes it practical for authors to use use-by-reference does require some additional customization effort, at least with the currently-available XML authoring tools, none of which provide XInclude support out of the box (and none of which would be expected to support the XInclude extensions described in this paper).

Minimal support for XInclude-based re-use for authoring requires at least the following features:

  • “point and click” user interface components for selecting reference targets

  • Reflection of at least the title (or its equivalent) of the referenced data at the point of reference.

  • A way to determine, in the editor, what the members of the current bounded object set are

  • The ability to navigate from re-use references to the elements used, e.g. double-clicking on an inclusion link brings up the target document in a new window and scrolls to the element referenced.

A more fully realized authoring system should include some or all of these features:

  • Reflection of the entire content of a re-use reference in a read-only mode (authors can see the content but cannot edit it directly)

  • Ability to edit the re-used content “in place” at the point of reference

These features are in addition to other authoring support features, such as the ability to preview renditions of the document, integration with content management systems, and so on.

4.1. Point and Click Reference Target Selection

It is unrealistic and impractical to expect authors to directly specify the href= and xpointer= attributes for creating XInclude references. Therefore you must provide some sort of user interface by which authors can select reference targets. This type of interface poses several challenges that must be carefully considered before implementation.

The first challenge is how to determine what the set of potential reference targets is and how to get the list of target documents from the content management system. The answer will depend entirely on the business rules that govern your application and the type of content management system being used. For example, if you are using a system of naming conventions for directories on a normal file system then the problem may be simply a matter of examining the directory structure. But if you are using any sort of client/server system (including simple file-based systems such as CVS) then you must provide a way for the server to quickly communicate to the client the information needed to enable navigation to and selection of reference target documents. Depending on the scale of the repository, the network performance, and similar variables this may pose a serious performance challenge and require sophisticated implementation techniques in order to provide a satisfactory user experience. For example, a system that could have tens or hundreds of thousands of potential target documents will have to make sure that the client is not presented with the entire list in one go.

The task may be further complicated by the granularity of reference allowed.

From the standpoint of XInclude processors it doesn't matter whether references are to entire documents or to single elements within documents—the data processing is the same and it's no more difficult to do one than the other.

However, from an authoring standpoint, and in particular, from a user interface standpoint, it is usually much more difficult to present a tree of elements from which to select than it is to present a list of documents (files).

For example, in Epic editor, there is a built-in control for a file chooser dialog, but producing a list of target elements would require signficant customization work, especially if that list should reflect only those elements that are actually allowed targets for a given reference (for example, only showing the allowed element types and their ancestors and hiding all other element types). From an implementation standpoint, this is one or two orders of magnitude difference in cost—the first requires a few lines of code, the second requires the implementation of specialized user interface components that must reflect potentially complex business rules.

Another challenge is reflecting in this type of interface the important properties of the reference targets, such as their titles, unique IDs, national languages (if working on multi-language documents), and so on. This suggests that it would be difficult to create a generic user interface component that would work with any document type without at least some degree of configuration.

Finally, if selection of individual elements is allowed it is probably also a requirement to assign unique IDs to reference targets that do not already have them. This can lead to another content management problem, the problem of referent management, which is discussed in [XInd]. In short the problem is this: you are creating a reference from document A to an element in document B. The element you referring to does not have an ID so your authoring system adds one. Unfortunately, you do not have write access to document B because another author has it locked while they are working on it. This leaves you no choice but to either contact the author working on document B and ask them to add an ID to the element you're pointing to and commit their changes so you can complete your reference or simply wait until document B's author is done and releases the lock. Neither option is particularly attractive and neither may in fact be possible at any given time. For example, document B's author might be in a time zone 12 hours distant or not at a point where they can commit their changes or whatever, or they might be on vacation, having forgotten to release their lock.

One solution is to put IDs on all elements that might ever be reference targets. However this adds a lot of data to the files, most of which will never be used, and is in any case unnecessary and does not address another issue, which is the problem of creating version-aware references.

Another solution is an indirect approach, described [XInd] and [RefTrack], that allows you to create ID-based pointers to elements without the need to either have IDs on all elements or to modify the reference target when you create the reference.

4.2. Reflection of TItles at The Point of Reference

Many authors would probably most prefer to see the entire content of re-used elements within the editor so that they always have full context for whatever they are working on. However this can present some serious challenges, both in terms of enabling it in the editor and in communicating with the content management system. For example, a system I worked on for a major commercial aircraft company supported the creation of entire aircraft maintenance manuals using an XInclude-type use-by-reference mechanism (the system predates XML and XInclude by several years). An aircraft maintenance manual may extend to 100 000 pages or more and be composed of thousands of individual component documents. We quickly discovered that trying to resolve all the references in the editor could not perform under any circumstances. This is usually the case, even where documents are much smaller, simply because network bandwidth is usually the limiting factor in client/server systems, so even pulling across a score of files needed for a 100-page document could still require a minute or more on typical corporate internal networks. The problem can be even worse when the repository is accessed through a VPN and, worst case, a dial-up connection.

In addition the currently available XML authoring tools do not make it easy to reflect the referenced content at the point of reference in a complete and robust way. It can be done (we did it for the aforementioned aircraft manual system) but it's not pretty and not trivial.

A simpler solution is to reflect just the titles of the referenced objects at the point of reference. This is usually easy to do and usually provides enough context for authors. Even when authors have the option of reflecting the entire content they will want the option of showing just the titles for performance purposes.

A simple approach to reflecting titles is to add an attribute to inclusion elements to take the title text. This attribute can easily be set at the time the reference is created. Most editors make it easy to reflect attribute values through in-editor style sheets. The only potential problem with this approach is that titles might change, requiring the titles to be periodically checked and updated. But this processing can be done either at author request or as a background process so it shouldn't be a serious issue in practice.

I prefer to put this type of process-specific or utility attribute into a distinct name space that helps make it clearer that the attribute is not a critical property of the base content. For example, you might define a namespace like “http://innodata-isogen.com/xinclude/utilities” and declare the title-holding element like this:

<!ATTLIST subsect_include
  href
    CDATA
    #IMPLIED
  xpointer
    CDATA
    #IMPLIED
  inod-util:reftitle
    CDATA
    #IMPLIED
  xmlns:inod-util
    CDATA
    #FIXED "http://innodata-isogen.com/xinclude/utilities"
  xinclude
    NMTOKEN
    #FIXED "xi:include"
  reftype
    CDATA
    #FIXED "subsect | *[@base-type = 'subsect']"
>

An instance of subsect_include would look like this:

<section>
  <title>Getting Started</title>
  <subsect_include
    href=”subsect_01.xml”
    inod-util:reftitle=”Before You Begin”/>
  ...
</section>

5. Re-Use and Rendition Generation

Once you have created a set of documents that use use-by-reference you will almost certainly need to produce one or more output forms from those documents. Fortunately, this is usually the least challenging part of the information management system. You can find a sample XSLT implementation at [Xincl Impl].

Processing XInclude is fairly straightforward. The only complicating factor is the need to rewrite IDs and references to them. Because all links are to elements as authored, it is possible, if not likely, that two member documents will use the same ID value. Thus, as part of the inclusion processing, IDs must be rewritten to resolve such conflicts and all references to those rewritten IDs must be rewritten as well so that the references are maintained correctly in the resolved result. Note that in the general case some links may be to documents outside the compound document that contains the link itself. In this case, the target ID and document pointer is not rewritten. Because of this you must determine the bounded object set for the document before you can start producing the result document that reflects the resovled inclusions. Thus XInclude processing is always a two-pass process, at least conceptually.

The basic process for doing XInclude resolution processing is as follows:

  1. Starting with the root document of a given compound document, determine the members of the bounded object set. This is done by recursively processing each inclusion amd adding the included document to the BOS member list if it's not already in the list. Note that this step does not produce any result other than the BOS list itself.

  2. Starting with the root document of the compound document, copy each input node to the output, rewriting IDs and ID references as necessary. Apply this process recursively to each inclusion.

    ID rewriting is done as follows:

    • For each ID-type attribute, generate a new ID that is guaranteed unique within the result document (e.g., using the generate-id() function in XLST). Maintain a mapping from input document/ID pairs to generated ID.

    • For each id reference (that is, attributes that are interpreted as ID references—in many document types there will be no attributes with a declared type of IDREF or IDREFS because of the need to allow cross-document references):

      1. Resolve the reference to its target(s)

      2. For each target, determine if the target is within the bounded object set or outside the bounded object set.

      3. If the target is within the bounded object set, rewrite the ID reference to reflect the generated ID created by the ID rewriting step. Do not copy the pointer to the target's containing document to the result document.

        If the target is outside the bounded object set, copy the ID reference and corresponding document pointer to the result document unchanged (this address must be one that crosses compound documents, not just XML documents).

Note that this process requires knowledge of which elements and attributes are interpreted as ID references, which means that there is no way to implement a document-type-independent XInclude processor unless you use some sort of generic declaration mechanism such as HyTime's Reference Location Address facility, which uses fixed attributes to map attributes and content to specific reference types (See [HyTime], clause 7.8 Reference location address) or you require that all links use the href=/xpointer= convention used by XInclude itself (which is probably not an unreasonable constraint).

Once you have a result document with all references resolved and IDs rewritten, you can apply normal production processes to it. Note that it is not necessarily a requirement write the result document out as a serialized XML document—in both XSLT processing and DOM-based processes the result document can be held in memory and processed directly.

6. Conclusions

The W3C XInclude facility provides an essential service for authoring complex technical documentation where true re-use (use by reference) is a requirement. It provides a simple and clear facility for encoding re-use hyperlinks in XML documents. However, because it provides no mechanism for specializing the element types used for references it is suboptimal for authoring. Innodata Isogen's experience has been that effective and productive XInclude-based authoring requires the use of specialized reference elements.

Our experience is also that XInclude processing is relatively easy to implement using tools like XSLT and Java with SAX or DOM APIs.

Because XInclude is hyperlink-based, meaning that it operates at the semantic level, not the syntactic level, it is compatible with any XML content management approach that recognizes the distinction between the storage, syntactic, and semantic layers in an information management system, providing a completely product-neutral way to represent use-by-reference relationships.

Our experience has also taught us that providing support for use-by-reference in XML authoring tools is non-trivial and providing full support can be quite involved. However, less-than-full XInclude support that is still sufficient to enable authoring can be implemented without too much effort and expense (for example, limiting references to full documents, only reflecting reference titles).

From our position as systems integrators we would like to see the following in the future:

  • Refinement of the XInclude specification to provide built-in mechanisms for specializing XInclude elements ala XLink.

  • Built-in support for XInclude in commercial XML authoring tools. This support should allow the easy implementation of specialized XInclude elements in advance of a W3C-defined specialization mechanism. For example, providing an API or script function for resolving references and reflecting the referenced content at the point of reference, rather than simply hard-coding the resolution of xi:include elements.

  • Built-in support for managing XInclude links in XML-aware content management systems. For example, it should be possible to import a set of documents that use XInclude links and be able to immediately query the system about the dependency relationships among documents implied by the XInclude links. Likewise, content management systems should provide the API methods needed to implement point-and-click reference target selection interfaces.

  • Built-in support for indirect ID management, in both content management systems and authoring tools (as necessary), as outlined in [RefTrack].

Bibliography

[CVS] Concurrent Versioning System. See http://www.cvshome.org/.

[DITA] Darwin Information Typing Architecture. Available from IBM Alphaworks, http://www-106.ibm.com/developerworks/xml/library/x-dita1/. Soon to be an OASIS technical specification.

[DSSSL] ISO/IEC 10179:1996, Document Style Semantics and Specification Language (DSSSL). See http://www.jclark.com/dsssl for more information.

[Epic] Epic Editor product, a full-featured XML authoring system. Provided by Arbortext, Inc. http://www.arbortext.com.

[Heintz] Heintz, John D., Versioned Hyperdocuments: Support for Lifecycle Models. Extreme Markup, 2002. Available online at http://www.isogen.com/downloads/white_papers/white_papers.jsp.

[HTML] Hypertext Markup Language (HTML). Various versions developed and published by the W3C. See http://www.w3.org/MarkUp/.

[HyTime] ISO/IEC 10744:1997 Hypermedia/Time-Based Structuring Language (HyTime). International Organization for Standardization (ISO), Geneva Switzerland, 1997. Available online at http://www.ornl.gov/sgml/wg8/docs/n1920/.

[REYNOLDS] Reynolds, Joshua, W. Eliot Kimber. XML in a Distributed World: Exposing DOM/Groves through CORBA. XML Europe 2003, London, England. Available online at http://www.isogen.com/papers/distributed_groves.pdf.

[RefTrack] Kimber, W. Eliot, Steve Newcomb, Peter Newcomb. Version Management as Hypertext Application: Referent Tracking Documents. Markup Technologies, 1999, Chicago, Ill. Available online at http://www.isogen.com/papers/ref-track-docs-paper.pdf.

[SAX] Simple API for XML. http://www.saxproject.org/.

[SVG] Scalable Vector Graphics (SVG) 1.0 Specification, W3C Recommendation 04 September 2001. Available online at http://www.w3.org/TR/SVG/.

[SMIL] Synchronized Multimedia Integration Language (SMIL 2.0) Recommendation. Published by the W3C August, 2001. See http://www.w3.org/TR/smil20/.

[UML] Unified Modeling Language™ (UML®). Object Management Group. See http://www.omg.org/.

[XIncl] XML Inclusions (XInclude) Version 1.0 Candidate Recommendation. Published by the W3C September, 2002. See http://www.w3.org/TR/xinclude/.

[Xincl Impl] Kimber, W. Eliot. Dave Pawson. Sample XInclude implementation in XSLT, published on the XSL Frequently Asked Questions. Available online at http://www.dpawson.co.uk/xsl/sect2/include.html

[XInd] XML Indirection Facility Note. Published by the W3C June, 2003. See http://www.w3.org/TR/NOTE-XIndirect.

[XLink] XML Linking Language (XLink) Recommendation. Published by the W3C 2000. See http://www.w3.org/TR/xlink/.

[XML] W3C Recommendation, Extensible Markup Language (XML) 1.0,, 10 Feb. 1998, http://www.w3.org/TR/1998/REC-xml-19980210

[XML-DOM] ???

[XPath] XML Path Language (XPath) Version 1.0 Recommendation, published by the W3C November, 1999. See http://www.w3.org/TR/xpath.

[XPointer] XPointer Framework. See http://www.w3.org/TR/xptr-framework/. XPointer element() Scheme. See http://www.w3.org/TR/xptr-element/. XPointer xmlns() Scheme. See http://www.w3.org/TR/xptr-xmlns/. XPointer xpointer() Scheme. See http://www.w3.org/TR/xptr-xmlns/. All published by the W3C, 2002.

[XSL-FO] XSL 1.0 Recommendation ("Formatting Objects"), published by the W3C October 2001. See http://www.w3.org/TR/xsl.

[XSLT] XSL Transformations (XSLT) 1.0 Recommendation, published by the W3C November 1999. See http://www.w3.org/TR/xslt.

Biography

Eliot is a long-time contributor to the XML and SGML community, with 20 years of experience in industrial-strength generic markup applications. He is a founding member of the XML Working Group, a co-editor of the HyTime standard (ISO 10744), and a member of the XSL Working Group. For the last 10 years (the last 6 with ISOGEN International) Eliot has worked as an information systems consultant specializing in developing standards-based systems for managing documents with a focus on technical documentation and publishing systems. For the first 10 years of his career, Eliot was a technical writer for IBM's Networking Systems Division, developing diagnosis and repair manuals for a product with no user interface that never failed in operation. Eliot speaks and writes frequently on XML and related subjects. Eliot is a devoted husband and dog owner who enjoys snowboarding and body boarding on those rare occasions when he finds himself at the coast or in the mountains.



[1] This is an abbreviated set of definitions. A more complete glossary of re-use-related terms will be published on the Innodata Isogen Web site and in future papers.

[2] See [Heintz] for an in-depth discussion of the challenges of versioned hyperdocument management.

[3] See the XInclude specification for further details that are not immediately relevant to this discussion. The XInclude specification is quite clear and easy to understand, at least as formal specifications go.

[4] As someone who was an early user of SGML and who literally studied at the feet of Dr. Charles Goldfarb it pains me to have to make this statement but it is nevertheless the fact that, in my experience, the use of external unparsed entities doesn't really help, especially in applications where individual XML files are small. The original idea with entities was that a processor could determine the dependencies a given XML document had by processing just the prolog (that is, the DOCTYPE declaration). Likewise, notations were intended to be a way to let processors know how to handle a particular non-SGML or non-XML entity. However, in the Web world, content data types are usually communicated by the entity via it's MIME type, largely removing the need for notations.

[5] As a member of the W3C, Innodata Isogen has recently submitted a comment to the effect that XInclude should provide a facility similar to XLink's. However it is unlikely that this comment could be implemented in the XInclude 1.0 time frame as it is in the process of being published as a candidate recommendation.

[6] This approach will not handle indirect specializations. However, the DITA specification provides a mechanism for handling indirect specializations to which this example can be adapted if required.