diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-11 12:43:48 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-11 12:43:48 +0200 |
commit | 9553149aa6b6561c49981adf2848607a43765054 (patch) | |
tree | ff941ad89aa2c87ec5ddbd7a7bdd189fc33f87ba /libxsde/xsde/cxx/parser/validating/xml-schema-pskel.hxx | |
parent | 0dd6d623af5dfe3590d0c269f76a2fa322e75e58 (diff) |
Support for validation of the pattern facet
New test: hybrid/pattern.
Diffstat (limited to 'libxsde/xsde/cxx/parser/validating/xml-schema-pskel.hxx')
-rw-r--r-- | libxsde/xsde/cxx/parser/validating/xml-schema-pskel.hxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libxsde/xsde/cxx/parser/validating/xml-schema-pskel.hxx b/libxsde/xsde/cxx/parser/validating/xml-schema-pskel.hxx index 1ef1005..8823846 100644 --- a/libxsde/xsde/cxx/parser/validating/xml-schema-pskel.hxx +++ b/libxsde/xsde/cxx/parser/validating/xml-schema-pskel.hxx @@ -12,6 +12,10 @@ # include <string> #endif +#ifdef XSDE_REGEXP +# include <xsde/c/regexp/xmlregexp.h> +#endif + #include <xsde/cxx/parser/xml-schema.hxx> #include <xsde/cxx/parser/validating/parser.hxx> @@ -662,6 +666,9 @@ namespace xsde struct string_facets { string_facets (); +#ifdef XSDE_REGEXP + ~string_facets (); +#endif void _length_facet (size_t); @@ -678,6 +685,9 @@ namespace xsde void _enumeration_facet (const char* const*, size_t count); + void + _pattern_facet (const char*); + public: struct facets { @@ -688,10 +698,24 @@ namespace xsde const char* const* enum_; size_t enum_count_; +#ifdef XSDE_REGEXP + union + { + const char* str; + xmlRegexpPtr regexp; + } pattern_; +#endif unsigned int length_set_ : 1; unsigned int min_length_set_ : 1; unsigned int max_length_set_ : 1; +#ifdef XSDE_REGEXP + // 0 - not set + // 1 - string + // 2 - compiled + // + unsigned int pattern_set_: 2; +#endif // 0 - preserve // 1 - replace // 2 - collapse |