xml.rst
changeset 1276 a5dd70655def
parent 1275 9ae4e731b1ab
child 1277 c3af4a7b5ec3
equal deleted inserted replaced
1275:9ae4e731b1ab 1276:a5dd70655def
     1 -*- mode: outline; coding: utf-8 -*-
       
     2 
       
     3 * About.
       
     4 
       
     5   http://xmlhack.ru
       
     6   http://microformats.org/wiki/namespaces-considered-harmful
       
     7 
       
     8 * relaxng.
       
     9 
       
    10 ** relaxng-mode.
       
    11 
       
    12   http://www.pantor.com/download.html
       
    13                 RNC Emacs Mode (home page)
       
    14   http://www.emacswiki.org/emacs/RELAX_NG
       
    15   http://www.relaxng.org/compact-tutorial-20030326.html
       
    16                 relaxng compact syntax tutorial
       
    17 
       
    18 * CLI utilities for processing xml.
       
    19 
       
    20 ** xmlstar.
       
    21 
       
    22 XMLStarlet is a set of command line utilities (tools) which can be used to transform,
       
    23 query, validate, and edit XML documents and files using simple set of shell commands in
       
    24 similar way it is done for plain text files using UNIX grep, sed, awk, diff, patch, join,
       
    25 etc.
       
    26 
       
    27   http://xmlstar.sourceforge.net/overview.php
       
    28                 home page
       
    29 
       
    30 ** Cygwin.
       
    31 
       
    32   cmd# setup.exe -p libxml2,libxslt
       
    33 
       
    34 'libxslt' provide 'xsltproc, 'libxml2' provide 'xmlcatalog' and 'xmllint'
       
    35 
       
    36 ** XPath query from CLI.
       
    37 
       
    38   $ xmllint --xpath $XPATH file.xml
       
    39 
       
    40 * Microformats.
       
    41 
       
    42   http://microformats.org/about
       
    43 
       
    44 * XML encoding.
       
    45 
       
    46   http://www.ietf.org/rfc/rfc3023.txt
       
    47                 XML Media Types
       
    48   http://www.xml.com/pub/a/2004/07/21/dive.html
       
    49                 XML on the Web Has Failed
       
    50 
       
    51 * Validation of xml files.
       
    52 
       
    53   http://infohost.nmt.edu/tcc/help/xml/lint.html
       
    54                 xmllint: A validator for XML files
       
    55 
       
    56 ** Validating using the DOCTYPE.
       
    57 
       
    58   $ xmllint --valid --noout file.xml
       
    59 
       
    60 ** Validating against a specific DTD.
       
    61 
       
    62   $ xmllint --noout --dtdvalid URL file.xml
       
    63 
       
    64 ** Validating against a Relax NG schema.
       
    65 
       
    66   $ xmllint --noout --relaxng schema.rng file.xml
       
    67 
       
    68 If your schema is in Compact Format, you can use the trang program to convert
       
    69 it to RNG format:
       
    70 
       
    71   $ trang file.rnc file.rng
       
    72 
       
    73 ** Validating against XSchema.
       
    74 
       
    75   $ xmllint --noout --schema schema.xsd file.xml
       
    76