aboutsummaryrefslogtreecommitdiff
path: root/documentation/xsd.1
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-02-19 10:31:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-02-19 10:31:47 +0200
commit5ec1c8ff21b5c19e39d5bd12aa3a017a78b56b98 (patch)
treea137f9321fcdeaf838cbf3cb8a286d5f09fc3955 /documentation/xsd.1
parente571ff926d9736f48bb37948e29db90e7c6e68d5 (diff)
Add support for translating schema paths in fpt mode
New options: --schema-file-regex, --schema-file-regex-trace.
Diffstat (limited to 'documentation/xsd.1')
-rw-r--r--documentation/xsd.173
1 files changed, 64 insertions, 9 deletions
diff --git a/documentation/xsd.1 b/documentation/xsd.1
index dd244ab..fc652d6 100644
--- a/documentation/xsd.1
+++ b/documentation/xsd.1
@@ -192,7 +192,7 @@ or
.I replacement
is not supported.
-All regular expressions are pushed into a stack with the last specified
+All the regular expressions are pushed into a stack with the last specified
expression considered first. The first match that succeeds is used. Regular
expressions are applied to a string in the form
@@ -261,7 +261,7 @@ Add
to the list of names that should not be used as identifiers. The name
can optionally be followed by
.B =
-and the replacement name that should be used instead. All C++ keywords
+and the replacement name that should be used instead. All the C++ keywords
are already in this list.
\"
@@ -307,7 +307,7 @@ or
.I replacement
is not supported.
-All regular expressions are pushed into a stack with the last specified
+All the regular expressions are pushed into a stack with the last specified
expression considered first. The first match that succeeds is used.
As an example, the following expression transforms paths in the form
@@ -571,7 +571,7 @@ or
.I replacement
is not supported.
-All regular expressions are pushed into a stack with the last
+All the regular expressions are pushed into a stack with the last
specified expression considered first. The first match that
succeeds is used. Regular expressions are applied to a string
in the form
@@ -629,7 +629,7 @@ Escaping of the delimiter character in
.I pattern
or
.I replacement
-is not supported. All regular expressions are pushed into a stack with the
+is not supported. All the regular expressions are pushed into a stack with the
last specified expression considered first. The first match that succeeds
is used.
@@ -655,14 +655,18 @@ Note that in this mode you only need to compile the root schema(s) and the
code will be generated for all included and imported schemas. This
compilation mode is primarily useful when some of your schemas cannot be
compiled separately or have cyclic dependencies which involve type
-inheritance.
+inheritance. Other options related to this mode are:
+.BR --type-file-regex ,
+.BR --schema-file-regex,
+and
+.BR --file-list .
.IP "\fB\--type-file-regex \fIregex\fR"
Add
.I regex
to the list of regular expressions used to translate type names to file
names when the
-.B --type-per-file
+.B --file-per-type
option is specified.
.I regex
is a perl-like regular expression in the form
@@ -673,7 +677,7 @@ Escaping of the delimiter character in
.I pattern
or
.I replacement
-is not supported. All regular expressions are pushed into a stack with
+is not supported. All the regular expressions are pushed into a stack with
the last specified expression considered first. The first match that
succeeds is used. Regular expressions are applied to a string
in the form
@@ -698,6 +702,57 @@ the
option. Use this option to find out why your regular expressions
don't do what you expected them to do.
+.IP "\fB\--schema-file-regex \fIregex\fR"
+Add
+.I regex
+to the list of regular expressions used to translate schema file names
+when the
+.B --file-per-type
+option is specified.
+.I regex
+is a perl-like regular expression in the form
+.BI / pattern / replacement /\fR.
+Any character can be used as a delimiter instead of
+.BR / .
+Escaping of the delimiter character in
+.I pattern
+or
+.I replacement
+is not supported. All the regular expressions are pushed into a stack
+with the last specified expression considered first. The first match
+that succeeds is used. Regular expressions are applied to the absolute
+filesystem path of a schema file and the result, including the directory
+part, if any, is used to derive the
+.B #include
+directive paths as well as the generated C++ file paths. This option, along
+with
+.B --type-file-regex
+are primarily used to place the generated files into subdirectories or to
+resolve file name conflicts.
+
+For example, the following expression maps schema files in the
+.B foo/1.0.0/
+subdirectory to the files in the
+.B foo/
+subdirectory. As a result, the
+.B #include
+directive paths for such schemas will be in the
+.B foo/schema.hxx
+form and the generated C++ files will be placed into the
+.B foo/
+subdirectory:
+
+.B %.*/foo/1.0.0/(.+)%foo/$1%
+
+See also the REGEX AND SHELL QUOTING section below.
+
+.IP "\fB\--schema-file-regex-trace\fR"
+Trace the process of applying regular expressions specified with
+the
+.B --schema-file-regex
+option. Use this option to find out why your regular expressions
+don't do what you expected them to do.
+
.IP "\fB\--file-list \fIfile\fR"
Write a list of generated C++ files to
.IR file .
@@ -1388,7 +1443,7 @@ Escaping of the delimiter character in
.I pattern
or
.I replacement
-is not supported. All regular expressions for each category are pushed
+is not supported. All the regular expressions for each category are pushed
into a category-specific stack with the last specified expression
considered first. The first match that succeeds is used. For the
.B --one-accessor-regex