Friday, November 7, 2014

Notes for Week 10 Required Readings

Martin Bryan. Introducing the Extensible Markup Language (XML)
http://www.is-thought.co.uk/xmlintro.htm

    XML: subset of the Standard Generalized Markup Language, designed to make it easy to interchange structured documents over the internet.

XML can:
  • bring multiple files together to form compound documents
  • identify where illustrations are to be incorporated into text files, and the format used to encode each illustration
  • provide processing control information to support programs
  • add editorial comments to a file
XML components
  • including documents,entities,elements, and attribute (properties)
  • a formal syntax described the relationships between the entities, elements and attributes to tell the computer how it can recognize the component parts of each document
    Defining tag sets: must create a Document Type Definition that formally identifies the relationships between the various elements that form the documents.
    Defining the attributes of elements: various forms of elements can be given suitable attributes to specify the properties to be applied to them

    XML can also add standard text to a file and handle characters that are outside the standard character set.


Three types of markup
  • an XML processing instruction identifying the version of XML, the way it is encoded, and whether it references other files or not
  • a document type declaration that either contains the formal markup declarations in its internal subset or references a file containing the relevant markup declarations
  • a fully-tagged document instance which consists of a root element. The element type name must match that assigned as the document type name in the document type declaration, within which all other markup is nested
    If all 3 components are present, and the document instance conforms to the rule defined in the document type definition, the document is valid;
    If only the last component is present, and no formal model is present, the XML processor can only check whether the document instance is well-formed.

Extending you Markup: a XML tutorial by Andre Bergholz
http://xml.coverpages.org/BergholzTutorial.pdf

    Also an introduction to XML. However, to me, this article is easier to understand than the previous one.

XML
  • a semantic language that lets you meaningfully annotate text.
  • a well-formed XML starts with a prolog and contains exactly one element
DTD: defines the structure of XML
  • declared in the XML document's prolog by using the !DOCTYPE tag
  • let users specify the set and the order of tags, and the attributes associated with each
  • valid: a well-formed XML that conforms to its DTD
DTD elements
  • Nonterminal elements: contain sub-elements, which can be grouped as sequences or choices
  • Terminal elements: can be declared as parsed character data #PCDATAEMPTY, or ANY. When declared as ANY, it can contain suv-elements of any declared type, as well as character data.
DTD attributes
  • can be declared by using !ATTLIST tag
  • can be optional #IMPLIED, required #REQUIRED, or fixed #fixed. Fixed attributes must have a default value
Extensions: let users link more than one source to more than one target
  • namespaces: avoid name clashes, declared by xmlns
  • can be referred to using the prefix mybib
Links
  • Xlink: describes how 2 documents can be linked
  • Xpointer: enables addressing individual parts of an XML document
  • Xpath: used by Xpointer to describe location paths
Xlink specification
  • href: specifies a URI together with a fragment identifier
  • role: indicates the purpose of the linked document
  • show: specifies what is to be done with the linked document when it is loaded
  • actuate: specifies when the action indicated by show should occur
Stylesheets
  • XSL transformations (XSLT): transform XML into HTML to bypassing the formatting language, and restructure XML documents
  • XSL formatting objects
XML Schema: allow users to define datatypes
  • Document Definition Markup Language (DDML), known as XSchema
  • Document Content Description (DCD)
  • Schema for Object-oriented XML (SOX)
  • XML-Data (replaced by DCD)
XML Schema uses its own namespace
  • complexType: indicates a complex datatype associated with the nonterminal element BOOK and consisting of other elements and attributes
  • supports a variety of atomic datatypes
  • supports inheritance as part of the more general concept of derivation

XML Schema Tutorial
http://www.w3schools.com/Schema/default.asp

    At first, the tutorial introduces the XML Schema, explains the reasons to use it, and how to use it.
    Then, the tutorial divides the XML Schema into 3 types, including simple, complex, and data types. In each of the 3 types, the tutorial provides specific examples to explain how to create different parts of the schema.
    Again, this tutorial is a very useful tool to learn how to create XML Schema for its specific examples, just like other tutorials the W3Schools provides.

No comments:

Post a Comment