Syntax-K

Know-How für Ihr Projekt

Quick Reference Card for XML (and related) technologies

Introduction

This quick reference lists all important XML technologies along with the associated namespace URIs and either a short summary of the syntax, or a link to a more comprehensive reference. For most of the summaries, it is expected that you have read the relevant standards or documentation and still roughly recall how it works. If you don't, there is also a link to the relevant standard or a good tutorial to get you started. Be aware, though, that the Author of this page is a hardcore W3C standards reader, don't expect easy lecture :-)

This page also contains non-XML, but related technologies (HTTP, REST, URI).

Table of Contents

Meta

Core Technologies

Common Applications of XML

Links and Queries

Schemas and Validation

Networking

Related Technologies

Call for Participation

Please, help out by sending tutorials or references you find to xml@syntax-k.de (though it will be hard to find better references that zvon.org's). If a particular standard is small, consider writing a quick reference. You should look at "XUpdate" for a medium-sized example of what the original author considers "enough information".

If you plan to add more standards, please think about the practical usability: This page is aimed at real-world developers who do not neccessarily follow the latest hyped standard. In particular, many distrust XML Schema and like the KISS (Keep it simple, stupid) principle. Having REST and Schematron listed here is a tribute to that attitude, while SOAP and XML Schema are listed more for the sake of completeness.

Syntactical Conventions

Each entry lists several URIs. These have the following meaning:

  1. Standard: The authoritative standards document
  2. Tutorial: A tutorial for the unintiated, usually not going too much in depth
  3. Namespace URI: The namespace URI, if applicable
  4. Reference: A link to an online reference, for the larger standards

After this section, the actual reference follows. It usually lists the possible elements/functions/attributes/whatever in some pseudo-document-fragments. Optional stuff is set in italics , stuff you must fill in is written like {$this} . If there are multiple exclusive choices, they are written like {'this'|'that'} , while multiple cumulative choices are written like {'this'/'that'} . Attributes that have been mentioned before are not repeated but just listed, separated with commas.

XML

  1. Standard: XML 1.0 W3C Recommendation (Second Edition), 2002-10-06
  2. Tutorial: XML Tutorial at w3schools.com , DTD Tutorial at w3schools.com
  3. Namespace: http://www.w3.org/XML/1998/namespace
  4. Reference: Mulberry Technologies' XML Quick Reference (PDF)

Attributes

xml:space=" {'default'|'preserve'} "

xml:lang=" {$iso-2-letter-language-code} "

XML Base

  1. Standard: XML Base W3C Recommendation, 2001-06-27
  2. Tutorial: none available
  3. Namespace: http://www.w3.org/XML/1998/namespace
  4. Reference: none available

Attributes

xml:base=" {$url} "

XInclude

  1. Standard: XInclude 1.0 W3C Candidate Recommendation, 2002-10-17
  2. Tutorial: none available
  3. Namespace: http://www.w3.org/2001/XInclude
  4. Reference: none available

Elements

<xi:include href=" {$url-with-optional-fragment-in-xpointer-syntax} " parse=" {'xml'|'text'} " encoding=" {$encoding-name} " >

<xi:fallback> {$content-for-when-url-cant-be-retrieved} </xi:fallback>

</xi:include>

XHTML

  1. Standard: XHTML 1.0 W3C Recommendation (Second Edition), 2002-08-01 , HTML 4.01 W3C Recommendation 1999-12-24 , CSS 2.1 W3C Working Draft 2003-01-28
  2. Tutorial: XHTML Tutorial at w3schools.com
  3. Namespace: http://www.w3.org/1999/xhtml
  4. Reference: XHTML Reference at zvon.org , CSS2 Reference at zvon.org

XSLT

  1. Standard: XSLT 1.0 W3C Recommendation, 1999-11-16 , XPath 1.0 W3C Recommendation 1999-11-16
  2. Tutorial: XSLT Tutorial at w3schools.com
  3. Namespace: http://www.w3.org/1999/XSL/Transform
  4. Reference: XSLT Reference at zvon.org , Mulberry Technologies' XSLT and XPath Quick Reference (PDF)

EXSLT

  1. Standard: EXSLT Website
  2. Tutorial: none available
  3. Namespace: various, see below
  4. Reference: EXSLT Website

Note: Functions and elements in bold face are declared stable and available on all EXSLT processors supporting the associated group. Functions not supported by libxslt are noted as such, as are functions available through extension stylesheets.

Common - http://exslt.org/common

Functions:

Elements:

Dates And Times - http://exslt.org/dates-and-times

Notes: $datetime is an ISO 8601 Date/Time string, or one of the XML Schema xs:dateTime strings. These forms are possible: CCYY - MM - DD T hh : mm : ss , CCYY - MM - DD , CCYY - MM , CCYY , hh : mm : ss . $duration is an xs:duration string, which is basically P n Y n M n DT n H n M n S , for example: P1M , -P1D , PT30S , P1Y0M1DT0M0H0S . $template is like in Java 1.1: y =year, M =month, d =day of month, H =hour(0-23), m =minute, s =second, S =millisecond, z =timezone, E =weekday, a =am/pm, h =hour(1-12), G =AD/BC; more letters == longer format: MM =08, MMM =Aug, MMMM =August.

Functions:

Elements:

Dynamic - http://exslt.org/dynamic

Functions:

Functions - http://exslt.org/functions

Elements:

Math - http://exslt.org/math

Functions:

Regular Expressions - http://exslt.org/regular-expressions

Functions:

Sets - http://exslt.org/sets

Functions:

Strings - http://exslt.org/strings

Functions:

XLink

  1. Standard: XLink W3C Recommendation, 2001-06-27
  2. Tutorial: none available
  3. Namespace: http://www.w3.org/1999/xlink
  4. Reference: XLink Reference at zvon.org

Elements

Simple

<foo xlink:type="simple" xlink:href=" {$uri} " xlink:role=" {$role-uri} " xlink:title=" {$human-title} " xlink:show=" {'replace'|'new'|'embed'|'other'|'none'} " xlink:actuate=" {'onRequest'|'onLoad'|'other'|'none'} " xlink:arcrole=" {$role-uri} " > {$content} </foo>

Extended

<outerfoo xlink:type="extended" xlink:role, xlink:title >

<foo xlink:type="locator" xlink:href=" {$uri} " xlink:label="{$unique-id}" xlink:role,xlink:title > {$displayable-link-content} </foo>

<foo xlink:type="arc" xlink:href=" {$uri} " xlink:from=" {$idref} " xlink:to=" {$idref} " xlink:arcrole,xlink:title,xlink:show,xlink:actuate />

<foo xlink:type="resource" xlink:href=" {$uri} " xlink:role,xlink:title,xlink:label > $inline-link-target </foo>

<foo xlink:type="title"> {$human-title}</foo

</outerfoo>

XPointer

  1. Standard: XPointer Framework W3C Proposed Recommendation, 2002-11-13 , XPointer element() Scheme W3C Proposed Recommendation, 2002-11-13 , XPointer xmlns() Schene W3C Proposed Recommendation, 2002-11-13 , XPointer xpointer() Schene W3C Proposed Recommendation, 2002-11-13
  2. Tutorial: none available
  3. Namespace: not applicable
  4. Reference: XPointer Reference at zvon.org

General Syntax: {$uri} # { {$idref} /xmlns( {$prefix} = {$uri} )/element( {$selector} )/xpointer( {$selector} )}

Shorthand Pointer

{$idref} == xpointer(id(' {$idref} '))

xmlns() Scheme

Syntax: xmlns( $prefix = $namespace-uri )

element() Scheme

element( {$idref} ) == xpointer(id(' {$idref} '))

element(/ {$n} / {$n} /...) == xpointer(/*[ {$n} ]/*[ {$n} ]/...)

element( {$idref} / {$n} / {$n} /...) == xpointer(id(' {$idref} ')/*[ {$n} ]/*[ {$n} ]/...)

xpointer() Scheme

Syntax: xpointer( {$xpath} )

XPath extensions:

Quoting: xpointer("foo)") => xpointer("foo^)")

XUpdate

  1. Standard: XUpdate XML:DB Working Draft, 2000-09-14
  2. Tutorial: none available
  3. Namespace: http://www.xmldb.org/xupdate
  4. Reference: none available

Elements

General Syntax

<xu:modifications version="1.0">

<xu:variable name=" {$name} " select=" {$xpath} "/>

<xu:insert-before select=" {$xpath-selecting-sibling} "> {$content} </xu:insert-before>

<xu:insert-after select=" {$xpath-selecting-sibling }"> {$content} </xu:insert-after>

<xu:append select=" {$xpath-selecting-parent} " child=" {$pos} " > {$content} </xu:append>

<xu:update select=" {$xpath-selecting-parent} "> {$content} </xu:update>

<xu:remove select=" {$xpath-selecting-nodes} "/>

<xu:rename select=" {$xpath-selecting-element-or-attrib} "> {$new-name} </xu:rename>

</xu:modifications>

Content Elements

<xu:element name=" {$name} "> {$content} </xu:element>

<xu:attribute name=" {$name} "> {$content} </xu:attribute>

<xu:text> {$content} </xu:text>

<xu:processing-instruction name=" {$name} "> {$content} </xu:processing-instruction>

<xu:comment> {$content} </xu:comment>

<xu:value-of select=" {$xpath} "/>

XQuery

  1. Standard: XQuery 1.0 W3C Working Draft, 2002-11-15 , XPath 2.0 W3C Working Draft, 2002-11-15
  2. Tutorial: none available
  3. Namespace: http://www.w3.org/2002/11/xquery-functions
  4. Reference: none available

XML Schema

  1. Standard: XML Schema Part 0: Primer W3C Recommendation, 2001-05-01 , XML Schema Part 1: Structures W3C Recommendation, 2001-05-01 , XML Schema Part 2: Datatypes W3C Recommendation, 2001-05-01
  2. Tutorial: XML Schema Tutorial at w3schools.com
  3. Namespace: http://www.w3.org/2001/XMLSchema
  4. Reference: XML Schema Reference at zvon.org

RDF

  1. Standard: RDF W3C Recommendation, 1999-02-22 , Dublin Core Website
  2. Tutorial: none available
  3. Namespace: http://www.w3.org/1999/02/22-rdf-syntax-ns#
  4. Reference: RSS 1.0 Reference at zvon.org , DC Reference at zvon.org

RDF-XML Serialization Syntax

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:NS="{Namespace of properties}">

<rdf:Description rdf:about="{URI of Subject}" NS:property_1="{Literal Value}">

<NS:property_2>{Literal Value}</NS:property_2>

<NS:property_3 rdf:resource="{URI of Resource Value}" />

<NS:property_4 rdf:parseType="Resource">
{Properties of Anonymous Resource}
</NS:property_4>

<!-- Containers: -->
<NS:property_5>
<rdf:Bag> <!-- Bag=unordered, Seq=ordered, Alt=alternate values -->
<rdf:li>{Value 1}</rdf:li>
<rdf:li>{Value 2}</rdf:li>
</rdf:Bag>
<!-- alternate syntax:
<rdf:Bag rdf:_1="{Value 1}" rdf:_2="{Value 2}" />
-->
</NS:property_5>

</rdf:Description>

<rdf:Description rdf:ID="{Unique ID of this resource}">...</rdf:Description>

</rdf:RDF>

XForms

  1. Standard: XForms W3C Candidate Recommendation, 2002-11-12
  2. Tutorial: XForms Tutorial at w3schools.com
  3. Namespace: http://www.w3.org/2001/08/xforms
  4. Reference: XForms Reference at zvon.org

SOAP

  1. Standard: SOAP 1.2 Part 1 W3C Candidate Recommendation, 2002-12-19 , SOAP 1.2 Part 2 W3C Candidate Recommendation, 2002-12-19
  2. Tutorial: SOAP Tutorial at w3schools.com
  3. Namespace: http://www.w3.org/2002/12/soap-envelope , http://www.w3.org/2002/12/soap-encoding
  4. Reference: SOAP 1.1 Reference at zvon.org

XML-RPC

  1. Standard: XML-RPC Specification, 1999-06-15
  2. Tutorial: XML-RPC Howto
  3. Namespace: not applicable
  4. Reference: none available

REST

  1. Standard: Original dissertation about REST, 2000
  2. Tutorial: REST Pseudocode
  3. Namespace: not applicable
  4. Reference: REST Wiki

SVG

  1. Standard: SVG 1.1 W3C Recommendation, 2003-01-14 , SMIL 1.0 W3C Recommendation, 1998-06-15
  2. Tutorial: none available
  3. Namespace: http://www.w3.org/2000/svg
  4. Reference: SVG Reference at zvon.org , http://www.svg.org/wiki/

MathML

  1. Standard: MathML 2.0 W3C Recommendation, 2001-02-21
  2. Tutorial: none available
  3. Namespace: http://www.w3.org/1998/Math/MathML
  4. Reference: MathML Reference at zvon.org

HTTP

  1. Standard: RFC 2616: HTTP/1.1, 1999-06
  2. Tutorial: none available
  3. Namespace: not applicable
  4. Reference: none available

Schematron

  1. Standard: Schematron 1.5 ASCC Specification, 2002-10-01
  2. Tutorial: xml.com article by Kip Hampton
  3. Namespace: http://www.ascc.net/xml/schematron
  4. Reference: Schematron Reference at zvon.org

Relax NG

  1. Standard: RELAX NG OASIS Specification, 2001-12-03
  2. Tutorial: Official Tutorial at OASIS
  3. Namespace: http://relaxng.org/ns/structure/1.0
  4. Reference: Relax NG Reference at zvon.org

DOM

  1. Standard: Various DOM Standards at W3C
  2. Tutorial: DOM Tutorial at w3schools.com
  3. Namespace: not applicable
  4. Reference: DOM Level 2 Reference at zvon.org

URI/URL/URN

  1. Standard: RFC 2396: URI Generic Syntax, 1998-08 , RFC 2141: URN Syntax, 1997-05 , RFC 1738: URLs, 1994-12
  2. Tutorial: A Beginners Guide to URLs
  3. Namespace: not applicable
  4. Reference: none available

Apache

  1. Standard: not available
  2. Tutorial: not available
  3. Namespace: not applicable
  4. Reference: Apache HTTP Server Version 1.3 Documentation , Apache HTTP Server Version 2.0 Documentation

JavaScript

  1. Standard: ECMAScript,ECMA-262
  2. Tutorial: JavaScript tutorial at W3Schools
  3. Namespace: not applicable
  4. Reference: DevGuru JavaScript reference

    Be sure to check "DOM" as well!

ChangeLog

This section is intended to make coordination between modifications easier. Please describe any changes you did here.

2004-10-07 | jwalt at cpan.org | added JavaScript
2003-05-15 | jwalt at cpan.org | added Apache server docs
2003-05-02 | sbwoodside at yahoo.com | fixed page-width probs in mozilla
2003-03-18 | jwalt at cpan.org | added Table Of Contents
2003-02-19 | jj at lojjic.net  | added RDF syntax examples, 
|                   | fixed POD errors in XUpdate
2003-02-19 | jj at lojjic.net  | added Mulberry quick ref links to XML and XSLT
2003-02-19 | jwalt at cpan.org | added #contents fragments to W3C links
2003-02-19 | jwalt at cpan.org | ChangeLog created
2003-02-18 | jwalt at cpan.org | Initial revision