From 9bd9b2a74362ae6755ac63fbe3990565edd5cff3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 19 Feb 2010 12:25:46 +0200 Subject: Add support for translating schema paths in fpt mode New options: --schema-file-regex, --schema-file-regex-trace. --- documentation/xsde.xhtml | 63 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 10 deletions(-) (limited to 'documentation/xsde.xhtml') diff --git a/documentation/xsde.xhtml b/documentation/xsde.xhtml index f734f5d..d758905 100644 --- a/documentation/xsde.xhtml +++ b/documentation/xsde.xhtml @@ -220,7 +220,7 @@ Escaping of the delimiter character in pattern or 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

@@ -276,7 +276,7 @@
Add name to the list of names that should not be used as identifiers. The name can optionally be followed by = and the replacement name that should be - used instead. All C++ keywords are already in this list. + used instead. All the C++ keywords are already in this list.
--include-with-brackets
@@ -308,7 +308,7 @@ Escaping of the delimiter character in pattern or 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.

@@ -588,7 +588,7 @@
--disable-warning warn
Disable printing warning with id warn. If all - is specified for the warning id then all warnings are disabled. + is specified for the warning id then all the warnings are disabled.
@@ -646,7 +646,7 @@ Escaping of the delimiter character in pattern or 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

@@ -696,7 +696,7 @@ /pattern/replacement/. Any character can be used as a delimiter instead of /. Escaping of the delimiter character in pattern or - replacement is not supported. All regular + 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. @@ -724,19 +724,23 @@ 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. + dependencies which involve type inheritance. Other options related + to this mode are: + --type-file-regex, + --schema-file-regex, and + --file-list.
--type-file-regex regex
Add regex to the list of regular expressions used to translate type names to file names when the - --type-per-file option is specified. + --file-per-type option is specified. regex is a perl-like regular expression in the form /pattern/replacement/. Any character can be used as a delimiter instead of /. Escaping of the delimiter character in pattern or - replacement is not supported. All regular + 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 a string in the form @@ -759,6 +763,45 @@ them to do.
+
--schema-file-regex regex
+
Add regex to the list of regular expressions + used to translate schema file names when the + --file-per-type option is specified. + regex is a perl-like regular expression in the form + /pattern/replacement/. + Any character can be used as a delimiter instead of /. + Escaping of the delimiter character in pattern or + 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 #include directive + paths as well as the generated C++ file paths. This option, along + with --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 + foo/1.0.0/ subdirectory to the files in + the foo/ subdirectory. As a result, the + #include directive paths for such schemas + will be in the foo/schema.hxx form and + the generated C++ files will be placed into the + foo/ subdirectory:

+ +

%.*/foo/1.0.0/(.+)%foo/$1%

+ +

See also the REGEX AND SHELL QUOTING section below.

+
+ +
--schema-file-regex-trace
+
Trace the process of applying regular expressions specified with + the --schema-file-regex option. Use this option + to find out why your regular expressions don't do what you expected + them to do. +
+
--file-list file
@@ -1398,7 +1441,7 @@ namespace http://www.example.com/xmlns/my

The compiler has a number of predefined mapping rules for the built-in XML Schema types that vary depending on the mapping used. They are described in the following - subsections. The last predefined rule for all mappings + subsections. The last predefined rule for all the mappings maps anything that wasn't mapped by previous rules to void:

-- cgit v1.1