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