• Skip to content
  • Skip to navigation
  • Skip to footer

DITA Configuration and Specialization Tutorials

  • Menu
DITA Configuration and Specialization Tutorials
  • Table of Contents
  • DITA Configuration and Specialization Tutorials
    • About These Tutorials
    • Setting Up Your Development Environment
      • Setting Up OxygenXML for DITA Editing
    • Understanding Configuration and Specialization
      • XML Vocabularies and their Management
      • DITA Vocabulary Management: Modules
      • DITA Document Types, Configuration, and Specialization
        • Configuration
        • Specialization
      • The Cost of Interchange Enablement and the Overall Value of DITA
    • Introduction to the Configuration and Extension Tutorials
      • General Guidance for Developing New Shells and Modules
      • DTD or XSD?
      • Schema-Aware Parsing and Saxon
      • Packaging Document Type Shells and Vocabulary Modules as Toolkit Plugins
      • Deploying Toolkit Plugins
      • Public Identifiers
    • Document Type Shell Tutorial
      • DTD Topic Type Shell Creation Tutorial
        • DTD Topic Type Shell Tutorial Step 1: Copy Existing Shell
        • DTD Topic Type Shell Tutorial Step 2: Delete Unwanted Domain Modules
        • DTD Topic Type Shell Tutorial Step 3: Add Reference to a New Domain
      • XSD Topic Type Shell Tutorial
        • XSD Topic Type Shell Tutorial Step 1: Copy Existing Shell
        • XSD Topic Type Shell Tutorial Step 2: Remove References to Unwanted Domain Modules
        • XSD Topic Type Shell Tutorial Step 3: Add Reference to a New Domain
    • Topic Constraint Module Tutorial
      • Topic Constraint Module Step 1: Create The Constraint Module File
      • Topic Constraint Module Step 2: Declare The domains Attribute Text Entity
      • Topic Constraint Module Step 3: Define the New Content Models
      • Topic Constraint Module Step 4: Integrate the Constraint Module in a Document Type Shell
      • Topic Constraint Module Step 5: Test the Document Type Shell
      • Topic Constraint Module: XSD-Syntax Version
    • Attribute Specialization Tutorial
      • Attribute Specialization Step 1: Create Domain Module Files
      • Attribute Specialization Step 2: Integrate With Document Type Shell
      • Attribute Specialization Step 3: Test the Declarations
      • Attribute Specialization: XSD Version
    • Element Domain Specialization Process Overview (DTDs)
    • Element Domain Specialization Step 1: Design The Domain Element Types
    • Element Domain Specialization Step 2: Declare The Domain Element Types
      • Step 2-1. Create New .mod File
      • Step 2-2. Declare Element Type Name Parameter Entities
      • Step 2-3. Declare Elements and Attributes
      • Step 2-4. Declare class Attributes
    • Element Domain Specialization Step 3: Declare The Module Entities File
      • Step 3-1. Create xmlDomain.ent
      • Step 3-2. Declare Type-Specific Integration Entities
      • Step 3-3. Declare Domain Usage Text Entity
    • Element Domain Specialization Step 4: Integrate The Module Into a Document Type Shell
      • Step 4-1. Setup Local Copy of Document Type Shell DTD
      • Step 4-2. Create a Test Topic
      • Step 4-3. Add .ent File to Shell
      • Step 4-4. Update Type-Specific Parameter Entities in Shell DTD
      • Step 4-5. Update domains attribute with new domain
      • Step 4-6. Include .mod Declaration Set
      • Step 4-7. Test the integration
    • Element Domain Specialization Step 5: Extend DITA Open Toolkit XHTML Processor
      • Element Domain Specialization Step 5-1: Create Blank Specialization-Specific XSLT Transform Plugin
      • Element Domain Specialization Step 5-2: Implement Type-Specific XSLT Templates
      • Element Domain Specialization Step 5-3: Test The Stylesheet
    • Element Domain Specialization: XSD Version
    • Topic Specialization Tutorial
      • Topic Specialization Process Overview
      • Topic Specialization Step 1: Design The Topic Element Types
      • Topic Specialization Step 2: Declare the Topic Module Element Types
        • Step 2-1. Create Test Case Document Instance
        • Step 2-2. Create New Document Type Shell DTD
        • Step 2-3. Create New .mod File and Integrate Into Shell
        • Step 2-4. Declare FAQ Question Topic Type Elements and Attributes
        • Step 2-5. Declare Element Type Parameter Entities
        • Step 2-6. Declare FAQ Question class Attributes
        • Step 2.7: Define domains Attribute Contribution Entity (.ent File)
      • Topic Specialization Step 3. Package the Modules as a Toolkit Plugin
      • Topic Specialization Step 4: Extending the Toolkit To Support the Specialization
        • Topic Specialization Step 4-1: Create Initial Toolkit Plugin Components
        • Topic Specialization Step 4-2: Create Templates For Specialized Elements
        • Topic Specialization Step 4-3: Copy Template Contents from Base XSLTs
        • Topic Specialization Step 4-4: Implement Specialization-Specific XSLT Processing
        • Topic Specialization Step 4-5: Refine Markup Design for FAQ Question
        • Topic Specialization Step 4-4 (continued): Implement Specialization-Specific XSLT Processing
        • Topic Specialization Step 4-6: Implement CSS Styles
      • Topic Specialization: XSD Version
    • Map Specialization Tutorial
      • Map Specialization Step 1: Design the Map Element Types
      • Map Specialization Step 2: Create New Document Type Shell DTD
      • Map Specialization Step 3: Create faq-map Map Type Module
      • Map Specialization Step 4: Create faq-mapDomain Module
      • Map Specialization: XSD Version
        • Map Specialization XSD Step 1: Define faq-map Map Type
        • Map Specialization XSD Step 2: Define faq-mapDomain Map Domain
  • Index
Introduction to the Configuration and Extension Tutorials
Deploying Toolkit Plugins

Public Identifiers

You may have noticed in my examples that the public identifiers I use are URNs, not SGML-style public identifiers as used for the standard DITA modules.

This is because public identifiers are nothing more than magic strings, so it absolutely doesn't matter what syntax you use as long as it's reasonably likely to be globally unique. The only XML-defined requirement is that the public ID consist of the characters allowed by the production "PubidChar" in the XML standard (essentially characters allowed in URIs).

I prefer URNs over SGML-style public IDs for two reasons:
  • It's the 21st century, and DITA and XML are Web standards. URIs (and thus URNs) are the Web way of giving globally-unique names to resources.
  • For XSDs you have to use URIs, so why not be consistent in your global naming syntax?

The use of public identifiers is standard practice in XML and in the DITA community especially. However, in XML, public identifiers are completely pointless.

In XML, you must always have a system identifier. Even if you have a public identifier, you must also have a system identifier. Which immediately raises the question: why have a public identifier at all?

Why indeed?

I used to argue that public IDs were pointless, that there was no useful difference between having a public ID and using a URN as your system ID because neither can be resolved directly and thus both require some sort of mapping. And entity resolution catalogs can map both public and system IDs with equal facility. This is all true.

In addition, in an environment where document type shells and modules will be deployed to many locations, all references to shells and module components must be indirect and everything must be properly mapped. Thus, having directly-resolvable system IDs would be counter productive—you want system IDs that cannot be resolved directly so that any mapping configuration bugs cause early and immediate failure in your development environment. (This is why I make a point of ensuring that the system IDs in all of my shell document types consist of just the filename of the target module, regardless of where it might be relative to the using module—this ensures it won't be resolvable and thus mask a catalog mapping bug.)

Yet you will notice that in all the examples in this book I use public identifiers? Why?

The answer is that the use of public identifiers is so ingrained, that it simply proved too quixotic to stick to my principles and not provide or use public IDs. So I use them even though they are totally pointless. But I use URNs to subtly make the point that they are pointless, because its more obvious that a public ID that is a URN is functionally identical to a system ID that is a URN (because they both use the same syntax and both require mapping in order to be resolved).

Whatever you do do not use URLs for public identifiers. Systems may try to resolve them. Always use URNs or SGML-style public IDs.

And please remember that in DITA the public ID for a document type shell or module means nothing. The only thing that matters is the value of a document's @domains attribute. DTDs and XSDs are just a convenience for authoring and (weak) validation and nothing more.

Any DITA tool (or, for that matter, any XML system generally) that puts too much emphasis on public IDs, and especially on the public IDs of document types, is fundamentally broken because it reflects a misunderstanding of what DTDs do and don't represent and, in DITA especially, a misunderstanding of what constitutes a DITA document type. See Vocabulary Composition and Specialization for details.