author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 25 May 2010 14:41:02 +0300 | |
branch | RCL_3 |
changeset 20 | 6b9cbc8ad81c |
permissions | -rw-r--r-- |
20
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
.\" This manpage has been automatically generated by docbook2man |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
.\" from a DocBook document. This tool can be found at: |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
.\" Please send any bug reports, improvements, comments, patches, |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
.\" etc. to Steve Cheng <steve@ggi-project.org>. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
.TH "XMLWF" "1" "22 April 2002" "" "" |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
.SH NAME |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
xmlwf \- Determines if an XML document is well-formed |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
.SH SYNOPSIS |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
|
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
\fBxmlwf\fR [ \fB-s\fR] [ \fB-n\fR] [ \fB-p\fR] [ \fB-x\fR] [ \fB-e \fIencoding\fB\fR] [ \fB-w\fR] [ \fB-d \fIoutput-dir\fB\fR] [ \fB-c\fR] [ \fB-m\fR] [ \fB-r\fR] [ \fB-t\fR] [ \fB-v\fR] [ \fBfile ...\fR] |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
|
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
.SH "DESCRIPTION" |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
.PP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
\fBxmlwf\fR uses the Expat library to determine |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
if an XML document is well-formed. It is non-validating. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
.PP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
If you do not specify any files on the command-line, |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
and you have a recent version of xmlwf, the input |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
file will be read from stdin. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
.SH "WELL-FORMED DOCUMENTS" |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
.PP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
A well-formed document must adhere to the |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
following rules: |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
.TP 0.2i |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
26 |
\(bu |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
27 |
The file begins with an XML declaration. For instance, |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
<?xml version="1.0" standalone="yes"?>. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
29 |
\fBNOTE:\fR xmlwf does not currently |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
30 |
check for a valid XML declaration. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
.TP 0.2i |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
\(bu |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
Every start tag is either empty (<tag/>) |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
or has a corresponding end tag. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
.TP 0.2i |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
36 |
\(bu |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
37 |
There is exactly one root element. This element must contain |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
38 |
all other elements in the document. Only comments, white |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
39 |
space, and processing instructions may come after the close |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
40 |
of the root element. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
41 |
.TP 0.2i |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
42 |
\(bu |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
43 |
All elements nest properly. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
44 |
.TP 0.2i |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
45 |
\(bu |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
46 |
All attribute values are enclosed in quotes (either single |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
47 |
or double). |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
48 |
.PP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
49 |
If the document has a DTD, and it strictly complies with that |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
50 |
DTD, then the document is also considered \fBvalid\fR. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
51 |
xmlwf is a non-validating parser -- it does not check the DTD. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
52 |
However, it does support external entities (see the -x option). |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
53 |
.SH "OPTIONS" |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
54 |
.PP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
55 |
When an option includes an argument, you may specify the argument either |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
56 |
separate ("d output") or mashed ("-doutput"). xmlwf supports both. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
57 |
.TP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
58 |
\fB-c\fR |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
59 |
If the input file is well-formed and xmlwf doesn't |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
60 |
encounter any errors, the input file is simply copied to |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
61 |
the output directory unchanged. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
62 |
This implies no namespaces (turns off -n) and |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
63 |
requires -d to specify an output file. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
64 |
.TP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
65 |
\fB-d output-dir\fR |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
66 |
Specifies a directory to contain transformed |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
67 |
representations of the input files. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
68 |
By default, -d outputs a canonical representation |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
69 |
(described below). |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
70 |
You can select different output formats using -c and -m. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
71 |
|
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
72 |
The output filenames will |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
73 |
be exactly the same as the input filenames or "STDIN" if the input is |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
74 |
coming from STDIN. Therefore, you must be careful that the |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
75 |
output file does not go into the same directory as the input |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
76 |
file. Otherwise, xmlwf will delete the input file before |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
77 |
it generates the output file (just like running |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
78 |
cat < file > file in most shells). |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
79 |
|
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
80 |
Two structurally equivalent XML documents have a byte-for-byte |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
81 |
identical canonical XML representation. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
82 |
Note that ignorable white space is considered significant and |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
83 |
is treated equivalently to data. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
84 |
More on canonical XML can be found at |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
85 |
http://www.jclark.com/xml/canonxml.html . |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
86 |
.TP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
87 |
\fB-e encoding\fR |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
88 |
Specifies the character encoding for the document, overriding |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
89 |
any document encoding declaration. xmlwf |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
90 |
has four built-in encodings: |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
91 |
US-ASCII, |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
92 |
UTF-8, |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
93 |
UTF-16, and |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
94 |
ISO-8859-1. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
95 |
Also see the -w option. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
96 |
.TP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
97 |
\fB-m\fR |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
98 |
Outputs some strange sort of XML file that completely |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
99 |
describes the the input file, including character postitions. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
100 |
Requires -d to specify an output file. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
101 |
.TP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
102 |
\fB-n\fR |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
103 |
Turns on namespace processing. (describe namespaces) |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
104 |
-c disables namespaces. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
105 |
.TP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
106 |
\fB-p\fR |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
107 |
Tells xmlwf to process external DTDs and parameter |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
108 |
entities. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
109 |
|
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
110 |
Normally xmlwf never parses parameter entities. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
111 |
-p tells it to always parse them. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
112 |
-p implies -x. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
113 |
.TP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
114 |
\fB-r\fR |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
115 |
Normally xmlwf memory-maps the XML file before parsing. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
116 |
-r turns off memory-mapping and uses normal file IO calls instead. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
117 |
Of course, memory-mapping is automatically turned off |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
118 |
when reading from STDIN. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
119 |
.TP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
120 |
\fB-s\fR |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
121 |
Prints an error if the document is not standalone. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
122 |
A document is standalone if it has no external subset and no |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
123 |
references to parameter entities. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
124 |
.TP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
125 |
\fB-t\fR |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
126 |
Turns on timings. This tells Expat to parse the entire file, |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
127 |
but not perform any processing. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
128 |
This gives a fairly accurate idea of the raw speed of Expat itself |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
129 |
without client overhead. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
130 |
-t turns off most of the output options (-d, -m -c, ...). |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
131 |
.TP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
132 |
\fB-v\fR |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
133 |
Prints the version of the Expat library being used, and then exits. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
134 |
.TP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
135 |
\fB-w\fR |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
136 |
Enables Windows code pages. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
137 |
Normally, xmlwf will throw an error if it runs across |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
138 |
an encoding that it is not equipped to handle itself. With |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
139 |
-w, xmlwf will try to use a Windows code page. See |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
140 |
also -e. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
141 |
.TP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
142 |
\fB-x\fR |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
143 |
Turns on parsing external entities. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
144 |
|
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
145 |
Non-validating parsers are not required to resolve external |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
146 |
entities, or even expand entities at all. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
147 |
Expat always expands internal entities (?), |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
148 |
but external entity parsing must be enabled explicitly. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
149 |
|
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
150 |
External entities are simply entities that obtain their |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
151 |
data from outside the XML file currently being parsed. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
152 |
|
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
153 |
This is an example of an internal entity: |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
154 |
|
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
155 |
.nf |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
156 |
<!ENTITY vers '1.0.2'> |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
157 |
.fi |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
158 |
|
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
159 |
And here are some examples of external entities: |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
160 |
|
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
161 |
.nf |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
162 |
<!ENTITY header SYSTEM "header-&vers;.xml"> (parsed) |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
163 |
<!ENTITY logo SYSTEM "logo.png" PNG> (unparsed) |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
164 |
.fi |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
165 |
.TP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
166 |
\fB--\fR |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
167 |
For some reason, xmlwf specifically ignores "--" |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
168 |
anywhere it appears on the command line. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
169 |
.PP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
170 |
Older versions of xmlwf do not support reading from STDIN. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
171 |
.SH "OUTPUT" |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
172 |
.PP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
173 |
If an input file is not well-formed, xmlwf outputs |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
174 |
a single line describing the problem to STDOUT. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
175 |
If a file is well formed, xmlwf outputs nothing. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
176 |
Note that the result code is \fBnot\fR set. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
177 |
.SH "BUGS" |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
178 |
.PP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
179 |
According to the W3C standard, an XML file without a |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
180 |
declaration at the beginning is not considered well-formed. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
181 |
However, xmlwf allows this to pass. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
182 |
.PP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
183 |
xmlwf returns a 0 - noerr result, even if the file is |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
184 |
not well-formed. There is no good way for a program to use |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
185 |
xmlwf to quickly check a file -- it must parse xmlwf's STDOUT. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
186 |
.PP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
187 |
The errors should go to STDERR, not stdout. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
188 |
.PP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
189 |
There should be a way to get -d to send its output to STDOUT |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
190 |
rather than forcing the user to send it to a file. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
191 |
.PP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
192 |
I have no idea why anyone would want to use the -d, -c |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
193 |
and -m options. If someone could explain it to me, I'd |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
194 |
like to add this information to this manpage. |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
195 |
.SH "ALTERNATIVES" |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
196 |
.PP |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
197 |
Here are some XML validators on the web: |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
198 |
|
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
199 |
.nf |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
200 |
http://www.hcrc.ed.ac.uk/~richard/xml-check.html |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
201 |
http://www.stg.brown.edu/service/xmlvalid/ |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
202 |
http://www.scripting.com/frontier5/xml/code/xmlValidator.html |
6b9cbc8ad81c
Revision: 201014
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
203 |
http://www.xml.com/pub/a/tools/ruwf/check.html |