X hits on this document

456 views

0 shares

1 downloads

0 comments

4 / 142

Table of Contents

Preface .................................................................................................................... vii About the book ................................................................................................. vii About the author .............................................................................................. viii Disclaimer ...................................................................................................... viii

  • I.

    General introduction to XML ...................................................................................... 1

    • 1.

      Introduction .................................................................................................... 3 What is XML and why should I care? ............................................................. 3

    • 2.

      A gentle introduction to XML markup ................................................................. 6 XML syntax ............................................................................................... 6 XML documents always have one and only one root element .............................. 6 Element names are case-sensitive ................................................................... 7 Elements are always closed ........................................................................... 7 Elements must be correctly nested .................................................................. 7 Elements' attributes must always be quoted ...................................................... 8 There are only five entities defined by default ................................................... 8 Namespaces ............................................................................................... 8 XML semantics .......................................................................................... 9 Exercise - Checking XML syntax ................................................................. 10

    • 3.

      Creating your own markup .............................................................................. 11 Purpose and components ............................................................................ 11 Exercise - Creating your own XML mark up .................................................. 13

    • 4.

      Document type definitions ............................................................................... 15 Defining XML vocabularies with DTDs ........................................................ 15 Names and numbers of elements .................................................................. 16 PCDATA ................................................................................................ 17 Sequences ................................................................................................ 17 Putting it all together ................................................................................. 17 Exercise - Writing a simple DTD ................................................................. 19 Exercise - Validating against a system DTD ................................................... 20 Exercise - Fixing an XML document by hand ................................................. 20

  • II.

    Stylesheets with CSS & XSLT ................................................................................. 22

    • 5.

      Rendering XML with cascading style sheets ....................................................... 24 Introduction ............................................................................................. 24 display .................................................................................................... 25 margin .................................................................................................... 26 text-indent ............................................................................................... 26 text-align ................................................................................................. 26 list-style .................................................................................................. 26 font-family .............................................................................................. 27 font-size .................................................................................................. 27 font-style ................................................................................................. 27 font-weight .............................................................................................. 27 Putting it together ...................................................................................... 28 Tables ..................................................................................................... 29 Exercise - Displaying XML Using CSS ......................................................... 30

    • 6.

      Transforming XML with XSLT ........................................................................ 32 Introduction ............................................................................................. 32 A few XSLT elements ................................................................................ 32 Exercise - Hello, World .............................................................................. 33 Exercise - XML to text ............................................................................... 34 Exercise - XML to text, redux ..................................................................... 36 Exercise - Transform an XML document into XHTML .................................... 37 Yet another example .................................................................................. 40 iv

Document info
Document views456
Page views462
Page last viewedFri Dec 09 08:24:00 UTC 2016
Pages142
Paragraphs3126
Words34660

Comments