xtheader
Section: User Commands (1)
Updated: 2002-10-26
Index
Return to Main Contents
NAME
xtheader - updates header information in XML Table
SYNOPSIS
xtheader
[-a attribute(s) name] [-l title] [-c comment] [-I Import filename] [-S] [-i INPUT] [-o OUTPUT] [-z]
DESCRIPTION
This command adds or updates attribute name, title and comment information defined in the header.
Attributes name(s), title and comment are specified at option -a, -l and -c respectively. When header information is imported with -I, all source and header information is imported, and it will be given priority over option -a.
In an xmlTable, sort information is stored in the header which defines the processing priority. The source information can be cleared with the option -S.
PARAMETERS
- -a attribute names
-
specifies the attribute(s) name in the header
- -l title
-
specifies the title name
- -c comment
-
specifies the comment
- -I import filename
-
specifies the header of xmlTable file importing
- -S remove all sort tags
-
remove all sort tags in the header
FILE OPTIONS
- -i input filename
-
if a suffix of the filename is '.gz', the command acts as a filter, extracting the compressed file for processing. The command will read the file as standard in
put when "-i" is not specified.
- -o output filename
-
if a suffix of the filename is '.gz', the command automatically returns the output data in zip archive. When "-o" is not specified, the result will sent to standard output.
- -z zip archive
-
compress the standard output to zip archive. When the option "-o" is not given a
nd "-z" is specified, the output will be compressed as zip archive.
USAGE
Input file - dat.xt
<xmltbl version="1.00">
<header>
<title>
Customer Purchase History
</title>
<comment>
Artificial data is used for demonstration purpose
</comment>
<field no="1">
<name>CustomerID</name>
<sort priority="1">
</sort>
</field>
<field no="2">
<name>Date</name>
</field>
<field no="3">
<name>TotalQuantity</name>
</field>
<field no="4">
<name>TotalAmount</name>
</field>
</header>
<body><![CDATA[
A00004 20020214 1 365
A00004 20020415 5 4349
A00004 20020625 3 5268
A00004 20020810 2 1805
A00004 20021014 2 612
A00004 20021016 11 3410
A00005 20020918 12 4554
A00005 20020923 1 491
A00006 20020606 3 1364
A00006 20020918 5 2195
]]></body>
</xmltbl>
Example 1. Update the attribute name of Customer, Date, TotalQty, and TotalAMT in the header information.
e.g. xtheader -a Customer,PurchaseDate,TotalQTY,TotalAMT -i dat2.xt -o rsl.xt
Output file -rsl.xt
-
<header>
<title>
Customer Purchase History
</title>
<comment>
Artificial data is used for demonstration purpose
</comment>
<field no="1">
<name>Customer</name>
<sort priority="1">
</sort>
</field>
<field no="2">
<name>PurchaseDate</name>
</field>
<field no="3">
<name>TotalQTY</name>
</field>
<field no="4">
<name>TotalAMT</name>
</field>
</header>
<body><![CDATA[
A00004 20020214 1 365
A00004 20020415 5 4349
A00004 20020625 3 5268
Example 2. Update the title and comment in the header
e.g. xtheader -l customerIDmaster -c 20020101juncture -i dat.xt -o rsl.xt
Output file -rsl.xt
-
<header>
<title>
Total quantity and amount of purchase for each customer
</title>
<comment>
Example 2
</comment>
<field no="1">
<name>CustomerID</name>
</field>
<field no="2">
<name>Date</name>
</field>
<field no="3">
<name>TotalQuantity</name>
</field>
<field no="4">
<name>TotalAmount</name>
</field>
</header>
<body><![CDATA[
A00004 20020214 1 365
A00004 20020415 5 4349
Example 3. Remove sorting information in the header
e.g. xtheader -S -i dat.xt -o rsl.xt
Output file -rsl.xt
-
<header>
<title>
Customer Purchase History
</title>
<comment>
Artificial data is used for demonstration purpose
</comment>
<field no="1">
<name>CustomerID</name>
</field>
<field no="2">
<name>Date</name>
</field>
<field no="3">
<name>TotalQuantity</name>
</field>
<field no="4">
<name>TotalAmount</name>
</field>
</header>
SEE ALSO
xtmkheader(1),
xtmkdata(1)
For complete documentation and tutorial of xtheader and other commands, please visit
http://musashien.sourceforge.net.
BUG REPORT
If you find a bug in xtheader, please send an electronic mail to
musashi@adm.osaka-sandai.ac.jp.
Before sending a bug report, please verify that you have the lastest version of
MUSASHI.
Read this manual carefully to ensure the error is not caused by a quirk in the language.
AUTHORS
Yukinobu Hamuro, Naoki Katoh, Katsutoshi Yada, Stephane Cheung
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- PARAMETERS
-
- FILE OPTIONS
-
- USAGE
-
- SEE ALSO
-
- BUG REPORT
-
- AUTHORS
-
This document was created by
man2html,
using the manual pages.
Time: 22:43:54 GMT, June 24, 2003