You are previewing XML and InDesign.
O'Reilly logo
XML and InDesign

Book Description

From Adobe InDesign CS2 to InDesign CS5, the ability to work with XML content has been built into every version of InDesign. Some of the useful applications are importing database content into InDesign to create catalog pages, exporting XML that will be useful for subsequent publishing processes, and building chunks of content that can be reused in multiple publications. New coverage includes Export in XML order for EPUB (CS5.5 and later) and some new code examples for that process, perhaps some sample GREP to map content to XML, and strategies and settings for the export to EPUB.

Table of Contents

  1. XML and InDesign
  2. A Note Regarding Supplemental Files
  3. Preface
    1. About This Book and InDesign CS
    2. Conventions Used in This Book
    3. Using Code Examples
    4. Safari® Books Online
    5. How to Contact Us
    6. Contributor
      1. Acknowledgments
  4. 1. A Brief Foray into Structured Content (a.k.a. XML)
  5. 2. InDesign XML Publishing: College Catalog Case Study
    1. Data-Like Content Example: The Course Description XML
      1. Data Exported as XML
      2. Modeling the Structure for the Import XML
    2. Topical Content: The Handbook XML
      1. Evaluating the Handbook Text for Structure
      2. Modeling the Structure as a Set of Topics
      3. Iteration and Refinement
      4. Net Results: Vast Improvements in Understanding and Speed
  6. 3. Importing XML
    1. Doing It Adobe’s Way: The Placeholder Approach
      1. Modeling the XML You Want
        1. Getting some structure into InDesign
        2. Create placeholders for XML elements
        3. Creating test XML
      2. Importing XML into Placeholders
        1. Adding style to the XML elements
        2. Mapping styles to tags
        3. Importing the “real” XML file
      3. An Aside: The Scary “Map Styles to Tags” Dialog Message
    2. Mingling Non-XML and XML Content in a Text Flow
      1. Exporting XHTML When XML is in Your InDesign File
    3. Doing It Your Way: Using the Options for Your Own Process
      1. Import XML Using Only Merge—No Other Import Settings
        1. Using Append
      2. Linking to External XML Files
        1. External updates on Open and using the Links palette
      3. Creating Text Flows for the Imported XML
      4. The Importance of “Document Order” for Imported XML
        1. Rearranging XML elements in the structure pane
        2. Fixing up structure in the Story Editor
    4. Understanding InDesign’s XML Import Options
      1. Using “Clone Repeating Text Elements”
      2. Importing Only Elements That Match Structure
      3. Avoiding Overwriting Text Labels in the Placeholder Elements
      4. Deleting Nonmatching Structure, Text, and Layout Components
    5. Importing Images
      1. Inline Image Imports
  7. 4. Tagging XML in InDesign
    1. The Case for Tagging Content: Why You Need XML
    2. Tagging for Import
    3. Tagging for Iterative XML Development
      1. Working Without an Initial DTD
  8. 5. Looking Forward: InDesign as an XML “Skin”
  9. 6. Exporting XML
    1. Marking Up (Tagging) Existing Content for XML Export
    2. The Special Case of InDesign Tables (Namespaced XML)
      1. Examining the Table
    3. Tagging Images as XML in InDesign
      1. Image Options in the Export XML Dialog
  10. 7. Exporting ePub Content (InDesign CS5.5 and CS6)
    1. Export in XML Order Compared with Page Layout and Article Pane Order
    2. Alternate Layouts and XML Are Not Compatible Features
      1. Untested: Liquid Layout and InDesign Files Containing XML Structure
  11. 8. Validating XML in InDesign
    1. Why Validate?
    2. How to Validate XML in InDesign
      1. Loading a DTD and Getting the Correct Root Element
    3. Authoring with a DTD
      1. Dealing with Validation Problems
      2. Occurrence and Sequences of Elements
      3. Validating Outside of InDesign
      4. Duplicating Structure to Build XML
      5. Cleaning Up Imported XML Content
    4. Fast and Light Credo: Develop Now, Validate Later
      1. Iterating the Information Structure and DTD
  12. 9. What InDesign Cannot Do (or Do Well) with XML
    1. The 1:1 Import Conundrum
    2. Bad Characters
    3. Inscrutable Errors, Messages, and Crashes
    4. InDesign Is Not an XML Authoring Tool
  13. 10. Advanced Topics: Transforming XML with XSL
    1. XSLT for Wrangling XML versus XML Scripting for Automating XML Publishing
    2. XSL: Extracting Elements from a Source XML File for a New Use
    3. XSL: Getting the Elements to Sort Themselves
    4. XSL: Getting Rid of Elements You Don’t Want
    5. Creating Wrappers for Repeating Chunks
    6. Making a Table from Element Structures
    7. Upcasting Versus Downcasting
    8. Upcasting from HTML to XML for InDesign Import
    9. Downcasting to HTML
    10. Generate a Link with XSLT (Not Automated)
    11. Adding Useful Attributes to XML
      1. A General Formula for Adding Attributes
      2. Generating an id Attribute for a div
      3. Use of the lang Attribute for Translations
      4. Creating an Image href Attribute
        1. Paths to images
    12. A Word about Using Find/Change for XML Markup in InDesign
  14. 11. Content Model Depth Issues and Their Impact on Round-Tripping XML
    1. The Challenge of Mapping Deep DTDs to Shallow InDesign Structures
    2. The Challenge of Mapping Shallow Structures to Deep DTD Structures
    3. Use of Semantic ids and Style Names (Expert-Level Development)
  15. 12. Brief Notes
    1. A Brief Note about InCopy and XML
    2. A Brief Note about IDML and ICML
      1. Automating InDesign: The Power of IDML and ICML Programming
        1. An ICML developer’s test case
    3. Summary
  16. A. Resources
    1. InDesign Resources
    2. XML Resources
    3. XSLT Resources
  17. About the Author
  18. Colophon
  19. Copyright