RELAX NG

Eric van der Vlist

  • 出版商: O'Reilly
  • 售價: $1,400
  • 貴賓價: 9.5$1,330
  • 語言: 英文
  • 頁數: 304
  • 裝訂: Paperback
  • ISBN: 0596004214
  • ISBN-13: 9780596004217
  • 已絕版

買這商品的人也買了...

商品描述

 

Summary

As developers know, the beauty of XML is that it is extensible, even to the point that you can invent new elements and attributes as you write XML documents. Then, however, you need to define your changes so that applications will be able to make sense of them and this is where XML schema languages come into play. RELAX NG (pronounced relaxing), the Regular Language Description for XML Core--New Generation is quickly gaining momentum as an alternative to other schema languages. Designed to solve a variety of common problems raised in the creation and sharing of XML vocabularies, RELAX NG is less complex than The W3C's XML Schema Recommendation and much more powerful and flexible than DTDs.

RELAX NG is a grammar-based schema language that's both easy to learn for schema creators and easy to implement for software developers In RELAX NG, developers are introduced to this unique language and will learn a no-nonsense method for creating XML schemas. This book offers a clear-cut explanation of RELAX NG that enables intermediate and advanced XML developers to focus on XML document structures and content rather than battle the intricacies of yet another convoluted standard.

RELAX NG covers the following topics in depth:


  • Introduction to RELAX NG
  • Building RELAX NG schemas using XML syntax
  • Building RELAX NG schemas using compact syntax, an alternative non-XML syntax
  • Flattening schemas to limit depth and provide reusability
  • Using external datatype libraries with RELAX NG
  • W3C XML Schema regular expressions
  • Writing extensible schemas
  • Annotating schemas
  • Generating schemas form different sources
  • Determinism and datatype assignment


and much more.

If you're looking for a schema language that's easy to use and won't leave you in a labyrinth of obscure limitations, RELAX NG is the language you should be using. And only O'Reilly's RELAX NG gives you the straightforward information and everything else you'll need to take advantage of this powerful and intelligible language.  

Table of Contents

Foreword by James Clark

Foreword by Murata Makoto

Preface


Part I. Tutorial

1. What RELAX NG Offers

      Diversity 

      Keeping Documents Independent of Applications 

      Validation Has Many Aspects 

      The Best Way to Validate XML Document Structures 

      RELAX NG's Diverse Applications 

      RELAX NG as a Pivot Format 

      Why Use Other Schema Languages? 

2. Simple Foundations Are Beautiful

      Documents and Infosets 

      Different Types of Schema Languages 

      A Simple Example 

      A Strong Mathematical Background 

      Patterns, and Only Patterns 

3. First Schema

      Getting Started 

      First Patterns 

      Complete Schema 

4. Introducing the Compact Syntax

      First Compact Patterns 

      Full Schema 

      XML or Compact? 

5. Flattening the First Schema

      Defining Named Patterns 

      Referencing Named Patterns 

      The grammar and start Elements 

      Assembling the Parts 

      Problems That Never Arise 

      Recursive Models 

      Escaping Named Pattern Identifiers in the Compact Syntax 

6. More Complex Patterns

      The group Pattern 

      The interleave Pattern 

      The choice Pattern 

      Pattern Compositions 

      Order Variation as a Source of Information 

      Text and Empty Patterns, Whitespace, and Mixed Content 

      Why Is It Called interleave? 

      Mixed Content Models with Order 

      A Restriction Related to interleave 

      A Missing Pattern: Unordered Group 

7. Constraining Text Values

      Fixed Values 

      Co-Occurrence Constraints 

      Enumerations 

      Whitespace and RELAX NG Native Datatypes 

      Using String Datatypes in Attribute Values 

      When to Use String Datatypes 

      Using Different Types in Each Value 

      Exclusions 

     Lists 

      Data Versus Text 

8. Datatype Libraries

      W3C XML Schema Type Library 

      DTD Compatibility Datatypes 

      Which Library Should Be Used? 

9. Using Regular Expressions to Specify Simple Datatypes

      A Swiss Army Knife 

      The Simplest Possible Pattern Facets 

      Quantifying 

      More Atoms 

      Common Patterns 

10. Creating Building Blocks

      Using External References 

      Merging Grammars 

      A Real-World Example: XHTML 2.0 

      Other Options 

11. Namespaces

      A Ten-Minute Guide to XML Namespaces 

      The Two Challenges of Namespaces 

      Declaring Namespaces in Schemas 

      Accepting Foreign Namespaces 

      Namespaces, Building Blocks, and Chameleon Design 

12. Writing Extensible Schemas

      Extensible Schemas 

      The Case for Open Schemas 

      Extensible and Open? 

13. Annotating Schemas

      Common Principles for Annotating RELAX NG Schemas 

      Documentation 

      Annotation for Applications 

14. Generating RELAX NG Schemas

      Examplotron: Instance Documents as Schemas 

      Literate Programming 

      UML 

      Spreadsheets 

15. Simplification and Restrictions

      Simplification 

      Restrictions 

16. Determinism and Datatype Assignment

      What Is Ambiguity? 

      The Downsides of Ambiguous and Nondeterministic Content Models 

      Some Ideas to Make Disambiguation Easier 


Part II. Reference

17. Element Reference

18. Compact Syntax Reference

19. Datatype Reference


Part III. Appendixes

A. DSDL

B. The GNU Free Documentation License

Glossary


Index