The XML Companion

The XML Companion

by Neil Bradley

Paperback

$34.95

Overview

XML is one of the most exciting recent developent to hit the World Wide Web, enabling the further expansion of Web technology into new domains of content management, audience-targeted presentation, and distributed document processing. This is the ideal reference with clarity, comprehensive coverage, and precision to get people up to speed on XML. Neil Bradley provides all users and potential users of the XML format with an accessible, in-depth reference to release 1.0 of the standard.

The XML Companion provides an accessible and comprehensive description of each XML feature, and includes a series of "Road Map" charts that reveal the structure of the XML standard. It also fully covers the proposed Linking and Stylesheet standards. Finally, the book contains an extensive glossary of XML and related terminology.

Product Details

ISBN-13: 9780201342857
Publisher: Addison-Wesley
Publication date: 06/15/1998
Pages: 464
Product dimensions: 6.18(w) x 9.20(h) x 0.96(d)

About the Author

Neil Bradley is an XML consultant with over fifteen years' practical experience with XML and in related fields. He is an experienced trainer, a regular speaker at industry events, and leading contributor to relevant magazines and journals. Currently a consultant for NVision, Bradley is developer of Podium, a Java-based, XML-aware editorial system. He is author of The Concise SGML Companion and The XSL Companion.

Read an Excerpt

PREFACE:

Preface

The Extensible Markup Language is a powerful publishing and document interchange format. Developed by the World Wide Web Consortium, it was released, to widespread acclaim, in 1998. XML has a superficial resemblance to HTML, the established language of the Web, but information held in this format is self-describing - it can be extracted, manipulated and formatted to the requirements of any target audience or publishing medium.


XML should be of interest to HTML designers who need more flexibility to manage and customize their documents, to SGML users seeking advanced yet modestly priced applications, and to software developers requiring a flexible storage or interchange format that has powerful supporting tools.

The XML Companion serves the programmer, analyst or consultant involved in the management, processing, transfer or publication of XML documents. Detailed study of XML is supported by the inclusion of cross-referenced 'road maps' of the building blocks that comprise the standard, and an extensive glossary. Related standards for cataloguing, linking and styling XML files are also covered in detail.

This edition
The first edition of this book was completed within weeks of the release of the XML standard. Since that time, no significant pressure to modify or enhance the core standard has emerged. Justification for a new edition of this book therefore rests upon the high degree of activity surrounding XML. Complementary standards for processing, presenting and merging XML data have since been released, and this edition provides detailed coverage of DOM 1.0, SAX 1.0, CSS 2 and Namespaces1.0. Other standards have progressed, but are still being refined, so this edition simply describes later, more stable drafts of XSL (now divided into XSL and XSLT) and XLL (now divided into XLink and XPointer). Other proposed standards have only very recently emerged. The next version of HTML (XHTML) will be an application of XML (instead of SGML), and the XML Catalog proposal defines a standard scheme for managing the mapping of entity identifiers to local system files. A new scheme for navigating around XML documents, called XPath, will be utilised by the linking and styling standards.

This opportunity has been taken to rectify a number of minor syntactic and grammatical mistakes, as well as a few factual errors, and thanks are due to readers of the first edition for highlighting many of these issues.

Very little material from the first edition has been omitted, so the new book is a little larger than before. Despite this, it is hoped that the book can still serve as a 'companion' for those who are constantly on the move.

Acknowledgements
A repeated thanks to all those mentioned in the first edition of this book, as their contributions remain relevant. In addition, a number of readers of the first edition have contributed suggestions and observations that have helped improve the quality of this work, and their efforts are appreciated. Finally, thanks once again to Adobe for FrameMaker+SGML (which was used both in the preparation and publication of this book).

Feedback
Comments and suggestions for a possible future edition are welcome. They should be sent to the author, who can be found at neil@bradley.co.uk. Updates, additions and corrections can be obtained from the author's Web page, located at '...

Table of Contents

Preface.
1. Using this book.
Book structure.
Style conventions.
Editorial policies.
The XML standard.

2. Elementary XML 5.
Introduction 5.
Text.
Markup.
XML documents.
Elements.
Document modelling.
Element hierarchies 16.
Attributes.
Uses of XML.

3. More document markup.
Introduction.
Reserved attributes.
Processing instructions.
XML declaration.
Markup declarations.
Document type declaration.
Character data sections.
Comments.
Syntax overview.

4. Physical structures (entities).
Introduction.
Entity references.
Built-in entity references.
Character entity references.
Declaring an entity.
Internal text entities.
External text entities.
Entities within entities.
Binary entities.
General entities.
Parameter entities.
Document type declaration.
Alternatives to entities.

5. Document type definitions (the DTD).
Introduction.
Models.
Validating parsers.
DTD location.
DTD markup.
Element declarations.
Attribute declarations.
Parameter entities.
Conditional sections.
Notation declarations.
DTD processing issues.

6. Document Modelling Techniques.
Stages of development.
Document analysis.
Database schema analysis.
Future-use analysis.
Legally overlapping structures.
Appropriate names.
Element or attribute.
Other modelling tips.
Appropriate granularity.
Industry standard models.
Lists.
Table standards.
Architectural forms.
DTD writing tools.
DTD formatting.
Debugging the DTD.
Case study (quotations).
Case study (this book).

7. Hypertext links.
Background.
ID/IDREF.
Link value strategies.
Merging to publish.

8. Whitespace Issues.
Whitespace.
Line-end normalization.
Whitespace in markup.
Element content space.
Preserved space.
Line ending interpretation.
Ambiguous space.
Extensions to XML.

9. XML Extensions.
Extension standards.
General extensions.
Significant XML domains.

10. Namespaces.
Compound documents.
Mixed model problems.
The standard.
Namespace identificatiol
Using namespaces.
Defaults.
DTD handling.
Examples of usage.

11. Relative URLs (XML Base).
Background.
XML Base markup.
External entity declaration.
External entity content.
DTD declarations.

12. Composite Documents (XInclude).
Overview.
Identifying Objects to Include,
Recursive processing.
Inclusion markup.
Text inclusions.
Duplicate entity and notation declarations.
Including complete documents.
Contextual base URLs.
Namespace complications.
Illegal inclusions.
Document modelling.
Alternatives to X Include.
XSLT implementation.

13. Navigation (XPath).
Background.
Expressions.
Simple location paths.
Complex locations paths.
Patterns.
Predicate filters.
ID limitations.

14. Schemas.
DTD limitations.
Alternative modelling languages.
XML Schemas.
Element definitions.
Attributes,
Namespaces and schema references.
Including other models.
Efficiency shortcuts.

15. Advanced XML Schemas.
Introduction.
Default and fixed element values.
All groups.
Simple types with attributes.
Nil values.
Local element definitions.
Unique values.
Unique keys.
Data types.
Type library.
Simple type derivations.
Patterns.
Complex type derivations.
Selection from instance documents.
Constraining derivations.
Substitutions.
Re-defining external definitions.
Imports.
Processing and transforming XML.

16. Processing XML Data.
Writing XML.
Reading XML.
Event processing.
Tree manipulation.
Processing approach decisions.
Transformation tools.

17. Transformations (XSLT).
Overview.
XSLT and XSL.
XSLT DTD.
General structure.
Templates.
Recursive processing.
Selective processing.
Priorities.
Output.
Whitespace.
Sorting elements.
Automatic numbering.
Modes.
Variables and named templates.
Using attribute values.
Creating and copying elements.
XML output headers.
Repeating structures.
Conditions.
Keys.
Messages.
Imports and inclusions.
Extended functions.
Number formatting>
Stylesheet DTD issues.

18. SAX 1.0.
Background.
Call-backs and interfaces.
Java Xerces implementation.
The parser.
Document handlers.
Attribute lists.
Error handlers.
SAX Parse exception.
Locators.
DTD handlers.
Input sources.
Entity resolvers.
Handler bases.
Helper classes.

19. SAX 2.0.
Changes from 1.0.
XML Reader.
Features.
Properties.
Namespace support.
ContentHandler.
Attributes.
Helper classes.

20. DOM Level 1.
Background.
Implementing a DOM.
Nodes.
Documents.
Document types.
Elements.
Attributes.
Character data.
Text.
Character data sections.
Comments.
Processing instructions.
Entities and notations.
Node lists.
Named node maps.
Document fragments.
DOM implementation.

21. DOM Level 2.
Namespace support.
Node extensions.
Document extensions.
Document type extensions.
Element extensions.
Attribute extensions.
Named node map extensions.
DOM implementation extensions.
Unchanged interfaces.
Iteration and tree-walking.
Ranges.
Formatting XML documents.

22. Document formatting.
Presenting XML.
Style-oriented markup languages.
Formatting instructions.
Embedded styles.
Stylesheets.
Transformations.
DTD associations.
Stylesheet features.
Complex requirements.
Document layout categories.
Publishing from XML.
Stylesheet languages.
Formatting languages.
XSL or CSS.
Standard stylesheet references.
Implicit stylesheet references.

23. XHTML.
HTML.
Change of syntax.
Backward compatibility.
Flavours of XHTML.
Basic document structure.
Header elements.
Paragraphs.
Basic hypertext links.
Core attributes.
International attributes.
Headers and divisions.
Lists.
Font styles and phrases.
Formatted text.
Images and image zones.
Objects.
Tables.
Forms.
Descriptive markup.
Event trigger attributes.
Changes from HTML.

24. Cascading Stylesheets (CSS1).
Background.
Format overview.
Styling properties.
Colour and background properties.
Text style properties.
Boxes.
Display properties.
Simple element mapping.
Contextual rules.
Accessing and overriding styles.
XML specifics.
Batch composition to HTML.
HTML features.

25. Cascading Stylesheets 2 (CSS2).
Improvements.
Improved selection options.
Miscellaneous improvements.
Fonts and styles.
Boxes.
Lists.
Prefix and suffix generation.
Display options.
Tables.
Printed output.
User interface.
Aural styles.
Document management.

26. Managing XML Documents.
Introduction.
Simple file storage.
Free-text searching.
Maintaining document links.
Formal public identifiers.
XML Catalog format.
Classification.
Database management.
Basic document management.
Document component management.
Document disassembly techniques.
XML or SQL.
Document editing.

27. Extended links (XLink).
Background.
Link markup.
Simple links.
Titles.
Roles.
Linking behaviour.
Simple link limitations.
Extended links.
Multiple titles.
More titles and roles.
Arcs.
Out-of-line links.

28. Advanced links (XPointer).
Concepts.
Xpointer.
Pointing to identifiers.
Fallbacks.
Location context.
Escaping characters.
Multiple targets.
Extension functions.
Points and ranges.
Relative links.
Targeting text strings.
Namespace issues.
Reference.

29. Character sets.
Characters.
ASCII.
Text files.
Extended ASCII 6.
Unicode and ISO/IEC 10646.
Character sets summary.
Character set declarations.
Entities for characters.
XML language.

30. URLs.
URLs and URIs.
URL construction.
Protocols.
File and HTTP URLs.
Queries.
File paths.
Computer platform complications.
URL references.
Fragments.
Common errors.
URNs.

31. Past and Future Context.
Overview.
Markup.
SGML.
HTML.
XML.
The future.

32. SGML.
33. Charts and Tables.
SAX 1.0 methods.
SAX 2.0 methods.
DOM methods.
XSLT elements and attributes.
CSS properties.
This book DTD.
ISO 8859/1 character set.
ISO 639 language codes.
ISO 3166 country codes.
HTML and XHTML elements and attributes.

34. XML Road Map.
Map formats.
Content lists.
Maps.

35. XPath Road Map.
Content lists.
Expression structure overview.
Expression tokens.

Maps.
Glossary.
Index.

Preface

XML

The Extensible Markup Language is a powerful document publishing and data interchange format. It was released in 1998 by the World Wide Web Consortium, to immediate and widespread acclaim. XML has a superficial resemblance to HTML, the established language of the Web, but information held in this format is self-describing — it can be extracted, manipulated and formatted to the requirements of any target audience, publishing medium or XML-enabled software application. XML should be of interest to HTML designers who need more flexibility to manage and customize their documents, to SGML users seeking advanced yet modestly priced applications, and to software developers requiring a flexible storage or interchange format that benefits from powerful, often freely available supporting tools.

This book

The XML Companion serves the programmer, analyst or consultant involved in the management, processing, transfer or publication of XML data and documents. Detailed study of the standard is supported by the inclusion of cross-referenced 'road maps' of the building blocks that comprise the standard, and an extensive glossary. Related standards for cataloguing, processing, linking and styling XML documents are also covered in detail.

The third edition

This is the third edition of The XML Companion. While the standard itself has not changed since its release in 1998, many important supporting standards have emerged, progressed, or been finalized and officially released.New editions are needed to keep up with this progress. But a significant issue that arises when writing a book on XML today is deciding what to leave out.

Hundreds of XML-based standards have now been developed. A book several times the size of this one could be written, but it would not be practical to publish it, or indeed to carry it around. Apart from the core chapters on the XML standard itself, this book concentrates on related standards developed by the W3C, and on the two most popular applications of this technology (document publishing and data exchange). Standards for navigating, describing, processing, transforming, presenting, resolving relative URL links, and linking XML data, previously described in their draft form (or too new to have been mentioned before), have now been completed and released. This includes XPath (November 1999), XML Schema (May 2001), SAX 2.0 (June 2000), DOM 2.0 (November 2000), XSLT (November 1999), XHTML 1.0 (January 2000), XML Base (June 2001) and XLink (June 2001). Another draft proposal for advanced XML linking has matured significantly: XPointer (September 2001).

Finally, a proposal for merging XML structures has been announced: XML Inclusions (May 2001). Selected loosely-related standards, such as XHTML and CSS, are included because of their historical significance and widespread use, and because they form the basis of several other standards. Despite the wealth of new material, very little from the previous edition has been omitted (the HTML 4.0 chapter has been replaced by one on XHTML, and the chapter on XSL has been dropped (see The XSL Companion for a full description of this language)), so this book is larger than before. Yet it is hoped by the author that this book can still serve as a 'companion' for those who are constantly on the move.

Acknowledgements

Thanks to Michael Will for proofreading the first draft, to Viki Williams and Katherin Ekstrom at Pearson Education for steering this book to completion, and once again to Adobe for FrameMaker+SGML (which was used both in the preparation and publication of this book). Finally, thanks to those readers of the second edition who mailed corrections and suggestions.

Feedback

Comments and suggestions for a possible future edition are welcome. They should be sent to the author, who can be contacted at neil@bradley.co.uk. Updates, additions and corrections can be obtained from the author's Web page, located at www.bradley.co.uk, which also contains links to various XML- and SGML-related sites, and all the standards covered in this book.

Neil Bradley
October 2001



Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews