Components of cop-e-boox

Outline of the structure of all components

Display graphics for book components

Overview of cop-e-boox features

To see how cop-e-boox is structured, first start by reading the "how to use" instructions for an introduction to XML and to help you navigate through all the components. In a browser, open the file start-here-for-everything.html (this automatically opens the file how-to-use.svg of the Stylesheet Guide). Read the instructions about learning XML, how to find typesetting features in the Stylesheet Guide and how to change features in the stylesheets.
Note: Create a shortcut to the "how to use" starter page start-here-for-everything.html and move it to your desktop for quick reference.

Structure of components

The following diagram shows the components of cop-e-boox. The red arrows show how each component refers to other components to help you find, then add, XML markup and apply styles. Some components are hyperlinked. When you hover the cursor over a component, it will change colour. When you select a component it will open in a new browser window.

Overview of the components of cop-e-boox with arrows showing how each component refers to others
Details for each of these components are:
  • User's Guide—you are reading the User's Guide right now. The User's Guide is located in the directory /userguide (file "index.html"). Read all the sections to understand the broad structure and functionality of cop-e-boox and XML publishing.
    Note: Create a shortcut to the User's Guide file UsersGuide.html and move it to your desktop for quick reference.
  • Book templates—the book templates are located in the directory /xml. These are a collection of DocBook 5.0 XML files that contain examples of XML markup with tagging that matches up with features in the stylesheets. When you create the tagging for each new book, copy the tagging examples from these templates into the new XML files.
  • Sample templates—in the directory /samples there are XML files for a complete book, all stylesheets, and sample PDF, EPUB and web page ebooks that you can follow to see how to edit XML and stylesheet features.
  • Stylesheet Guide—the Stylesheet Guide is located in the directory /gui. To find the stylesheet features you want to change for various text, page and document styles, in a browser open the file StylesheetGuide.html (this automatically opens the file copeboox.svg of the Stylesheet Guide). The Stylesheet Guide comprises a series of scalable vector graphics (SVG) files that can be viewed in a browser. These provide a visual representation of the stylesheets for PDF, EPUB and web documents.
    Note: Create a shortcut to the Stylesheet Guide file StylesheetGuide.html and move it to your desktop for quick reference.
  • Stylesheets—print stylesheets, EPUB stylesheets and web page stylesheets are located in the directory /xml/stylesheets. The stylesheets comprise several customised extensible stylesheet language transform (XSLT) stylesheets based on DocBook 5.0 XML markup language, and two cascading stylesheets (CSS) for styling EPUB and web pages. Use both the XSLT and CSS stylesheets together to set up features for PDF, EPUB 3.0 and HTML5 documents.

Cross-referencing between components

Contextual help. Cop-e-boox is designed with lots of cross-referencing between its various components as listed above, so that you can gradually learn about XML markup, apply styles and produce ebooks. You can open up any component of cop-e-boox in either a web browser (for the User's Guide and Stylesheet Guide) or an XML editor (for the XML book templates, XSLT stylesheets and CSS stylesheets). Each of these components has the most relevant information about stylesheet features for context-specific help, and cross-references to other parts of the documentation. As you look through features in each component of cop-e-boox, follow the cross-references to other components so that you can gradually find out more detailed information about specific stylesheet features and functionality.

The contextual help features for each component are:
  • User's Guide—outline of XML markup required to achieve specific styles, and cross-references to stylesheet features and Stylesheet Guide pages
  • Book templates—stylesheet features and Stylesheet Guide pages for some styles are mentioned in the templates
  • Stylesheet Guide—popup tooltips when you hover the cursor over features, and browser windows for cross-referencing to specific stylesheets and features when you click on graphics
  • Print ebook stylesheets—cross-references to Stylesheet Guide pages and other print (XSLT) stylesheets
  • CSS stylesheets—cross-references to relevant XSLT stylesheet features to help you understand the equivalent features for PDF output.

Technical overview of XSLT coding

For the technically minded, the customised extensible stylesheet language transform (XSLT) stylesheets are designed to work with the standard DocBook stylesheets, which are integrated with cop-e-boox. All styles for setting the document layout and functionality are accessed from the text-based stylesheets. You enter values for each stylesheet feature in the stylesheets by following the instructions at each feature, and those values are applied when you transform (or typeset) an XML document into an ebook.

The coding that generates document and text styles that are applied to ebook formats comprise templates, parameters, variables and attribute sets. All this coding has been put into numerous XSLT stylesheets located in subdirectories, so that you do not need to interact with it. The directories are:
  • pdf_code
  • epub_code
  • web_code
  • epubweb_code.

It is strongly recommended that you do not modify any of the coding in those directories, unless you are familiar with XSLT. You can find a brief introduction to the concepts of XSLT stylesheet coding in the ebook Digital publishing with XML: Concepts for editors.