XML

Introduction

This section is designed to introduce you to XML and its power and flexibility when combined with 3B2.

The full support of XML with 3B2 means that 3B2 is made even stronger in automatic composition and pagination of complex documents for both print and electronic dissemination.

XML allows the development of user defined documents of many types, including the World Wide Web. For example, the document you are reading at the moment is sourced in XML and transformed to HTML via XSLT. This in turn provides an opportunity to demonstrate 3B2 and XML in conjunction by way of the In-Depth PDF book creator. This publishing and delivery document production system is automated using 3B2 and the XML content of the website.

What is XML?

XML (Extensible Markup Language) is a modified dialect of SGML. Extensible means that the language can be extended to meet many different needs. It is also considered extensible because it is not a fixed format language like HTML (a single, predefined markup language). Instead, XML is actually a metalanguage (a language for describing other languages) which lets you design your own customised markup languages for limitless different types of documents.

XML is an SGML subset, using only the most common SGML features.

Some of the main features of XML are shown below:

Why use XML in 3B2?

The points below describe some of benefits of XML:

Integration of XML with 3B2

A major advantage of 3B2 is that the internal markup uses delimiters identical to those used by SGML. This makes the manipulation and presentation of XML and SGML based data much easier.

Because XML is concerned with the structure of the document, the markup is extensive and not generally suited to direct use as typeset markup. However, 3B2 deals with the practical aspect of formatting SGML and XML files for output. There are many tools available to enter and edit SGML/XML data, but very few produce high quality typeset output automatically from the data.

Other existing systems require the XML files, which require typesetting, to be modified in some way. Normally this will require some form of filtering, substitution or search and replace routine and the suppression of the original XML tags. This is sometimes a long, tedious and complex routine that the typesetter has to accomplish before processing the file. The end result is that the final data is no longer in XML for distribution or archiving or repurposing.

In contrast, 3B2 addresses the problem of conversion by allowing fully tagged XML documents to be imported, validated, parsed, edited and typeset using the original markup. This is achieved without any addition, substitution or compromise to the original file and allows the final, typeset, marked up document to be validated and saved for archiving as XML, see Data Handling.

Integration Details

Parsing XML documents in 3B2 is simple and 3B2 allows any DTD to be associated with the XML file. Parsing is done from within 3B2 using an internal parser or via a preferred third party parser. After parsing, error messages are displayed together with an error log. These errors may be corrected through a user friendly interface that not only identifies the location, type and nature of the error, but also places the cursor at the position of the error.

3B2 provides optional context sensitive help that will identify the current position in relation to the DTD. It will inform the user which elements are open of any relevant group structures, entities, attributes, the tag content and the permitted options at the cursor position therefore reducing the need for XML trained operators.

Data need not be well formed, parsed or even have an associated DTD before you can format it in your 3B2 template.

The power of 3B2's showstrings and scripting enable 3B2 to cater for any SGML standard markup and specialised formatting requirements from the data.

Once XML is used to mark up information according to defined vocabularies, the next step is to take control of the information. In order to be able to transform information marked up in XML from one vocabulary to another, the XSLT (Extensible Stylesheet Language Transformation) is supported within 3B2.

The main XML features 3B2 supports include:

For more information see the XSLT/ XSLFO/XPath and Namespaces topics.

Further information and references

You can find out more about XML by visiting:

General and in-depth information about XML:

www.xml.com

News, education, and information about XML in industrial and commercial settings:

www.xml.org

The World Wide Web Consortium (W3C).

Main page for World Wide Web Consortium XML activity and information.

www.w3.org/XML/


See also

© Originalab