1ARX(1)                      General Commands Manual                     ARX(1)
2
3
4

NAME

6       arx - automatically determines the type of an XML document
7
8

SYNOPSIS

10       arx [OPTIONS] document.xml {config_file.conf ...}
11
12

DESCRIPTION

14       ARX  is  a  tool to automatically determine the type of a document from
15       its name and contents. It is inspired by James Clark's schema  location
16       approach for nXML.
17
18

OPTIONS

20       ARX  either  prints  a  string  corresponding to the document's type or
21       nothing if the type cannot be determined. You can specify configuration
22       files to override defaults in /etc/arx.conf. The options are:
23
24       -n     turns  off prepending base path of the configuration file to the
25              result, even if it looks like a relative path (useful  when  the
26              configuration file and the grammars are in separate directories,
27              or for association with something that is not a file)
28
29       -v     prints current version
30
31       -h     displays usage summary and exits
32

FILES

34       /etc/rnv/arx.conf
35
36       The configuration file must conform to the following grammar:
37        arx = grammars route*
38        grammars = "grammars" "{" type2string+ "}"
39        type2string = type "=" literal
40        type = nmtoken
41        route = match|nomatch|valid|invalid
42        match = "=~" regexp "=>" type
43        nomatch = "!~" regexp "=>" type
44        valid = "valid" "{" rng "}" "=>" type
45        invalid = "!valid" "{" rng "}" "=>" type
46
47        literal = string in '"', '"' inside must be prepended by '´
48        regexp = string in '/', '/' inside must be prepended by '´
49        rng = Relax NG Compact Syntax
50
51       Comments start with # and continue till the end of line.
52
53       Rules are processed sequentially, the first  matching  rule  determines
54       the  file's type. Relax NG templates are matched against file contents,
55       regular expressions are applied to file names.
56
57

EXAMPLES

59       The sample configuration below associates documents with  grammars  for
60       XSLT, DocBook or XSL FO.
61
62        grammars {
63        docbook="docbook.rnc"
64        xslt="xslt.rnc"
65        xslfo="fo.rnc"
66        }
67
68        valid {
69        start = element (book|article|chapter|reference) {any}
70        any = (element * {any}|attribute * {text}|text)*
71        } => docbook
72
73        !valid {
74        default namespace xsl = "http://www.w3.org/1999/XSL/Transform"
75        start = element *-xsl:* {not-xsl}
76        not-xsl = (element *-xsl:* {not-xsl}|attribute * {text}|text)*
77        } => xslt
78
79        =~/.*.xsl/ => xslt
80        =~/.*.fo/ => xslfo
81
82

HOMEPAGE

84       http://sourceforge.net/projects/rnv/
85
86

AUTHOR

88       Michael Simacek <msimacek@redhat.com>.  This man page was made from the
89       readme written by RNV's author David Tolpin <dvd@davidashen.net>.
90
91

SEE ALSO

93       rnv(1), rvp(1), xmllint(1), xmlstarlet(1), trang(1)
94
95
96
97                                   2013-8-12                            ARX(1)
Impressum