summaryrefslogtreecommitdiff
path: root/doc/gen-doc
blob: c438ab465e733ef0e7cd668925ad86da3728ceaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
#! /bin/sh

: "${SED=sed}"
XMLSTARLET=$1
STAR_NAME=`echo xml | ${SED} "$transform"`

{
echo ""
echo ""
echo "                                           XMLSTARLET USER'S GUIDE"
echo ""
echo "                                  see also http://xmlstar.sourceforge.net/"
echo ""
echo ""

echo ""
echo ""
echo "1. BASIC COMMAND LINE OPTIONS"
echo "===================================================="
echo ""
echo "$STAR_NAME --help"
$SED '/^#/d' src/usage.txt

echo ""
echo ""
echo ""
echo "2. Select/Query XML documents"
echo "===================================================="
echo ""
echo "$STAR_NAME sel --help"
$SED '/^#/d' src/select-usage.txt

echo ""
echo ""
echo ""
echo "3. Editing XML documents"
echo "===================================================="
echo ""
echo "$STAR_NAME ed --help"
$SED '/^#/d' src/edit-usage.txt

echo ""
echo ""
echo ""
echo "4. Using XSLT to transform XML documents"
echo "===================================================="
echo ""
echo "$STAR_NAME tr --help"
$SED '/^#/d' src/trans-usage.txt

echo ""
echo ""
echo ""
echo "5. Formatting XML documents"
echo "===================================================="
echo ""
echo "$STAR_NAME fo --help"
$SED '/^#/d' src/format-usage.txt

echo ""
echo ""
echo ""
echo "6. Validating XML documents"
echo "===================================================="
echo ""
echo "$STAR_NAME val --help"
$SED '/^#/d' src/validate-usage.txt

echo ""
echo ""
echo ""
echo "7. Displaying structure of XML documents"
echo "===================================================="
echo ""
echo "$STAR_NAME el --help"
$SED '/^#/d' src/elem-usage.txt

echo ""
echo ""
echo ""
echo ""
echo "8. Escape/Unescape special XML characters"
echo "===================================================="
echo ""
echo "$STAR_NAME esc --help"
$SED '/^#/d' src/escape-usage.txt

echo ""
echo ""
echo ""
echo ""
echo "9. List directory as XML"
echo "===================================================="
echo ""
echo "$STAR_NAME ls --help"
$SED '/^#/d' src/ls-usage.txt

echo ""
echo ""
echo ""
echo ""
echo "10. XML canonicalization"
echo "===================================================="
echo ""
echo "$STAR_NAME c14n --help"
$SED '/^#/d' src/c14n-usage.txt

echo ""
echo ""
echo ""
echo ""
echo "11. Convert XML into PYX format (based on ESIS - ISO 8879)"
echo "===================================================="
echo ""
echo "$STAR_NAME pyx --help"
$SED '/^#/d' src/pyx-usage.txt

echo ""
echo ""
echo ""
echo ""
echo "12. Examples:"
echo "===================================================="
echo ""
echo "Input1"
echo "examples/xml/table.xml"
echo ""
cat "$srcdir"/examples/xml/table.xml
echo ""
echo ""
echo "Input2"
echo "examples/xml/tab-obj.xml"
echo ""
cat "$srcdir"/examples/xml/tab-obj.xml
echo ""
echo ""
echo "Input3"
echo "examples/html/hello1.html"
echo ""
cat "$srcdir"/examples/html/hello1.html
echo ""
echo ""
echo "Input4"
echo "examples/sgml/docbook1.sgml"
echo ""
cat "$srcdir"/examples/sgml/docbook1.sgml
echo ""
echo ""
echo "Stylesheet1"
echo "examples/xsl/sum1.xsl"
echo ""
cat "$srcdir"/examples/xsl/sum1.xsl
echo ""
echo ""
echo "Stylesheet2"
echo "examples/xsl/hello1.xsl"
echo ""
cat "$srcdir"/examples/xsl/hello1.xsl
echo ""
echo ""
echo "Stylesheet3"
echo "examples/xsl/param1.xsl"
echo ""
cat "$srcdir"/examples/xsl/param1.xsl
echo ""
echo ""

echo ""

for eg in "$srcdir"/examples/*[0-9]
do
	if [ -x "$eg" ]
	then
		echo "Command:"
		sed -e '/^#!/d' "$eg"
		echo "Result Output:"
		cat "$srcdir"/examples/results/`basename $eg`.out
		echo ""
		echo ""
	fi
done

echo ""
} | $SED -e "s:\./xmlstarlet:$STAR_NAME:g; s:PROG:$STAR_NAME:g"