aboutsummaryrefslogtreecommitdiff
path: root/libxsde/xsde/cxx/parser/non-validating/xml-schema-pskel.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-10-08 15:35:23 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-10-08 15:35:23 +0200
commit7db026e8056914d113ac0bbfd9bdc4908a9e7874 (patch)
tree0ab15cb8b0ee160a10cca21edaf0aca1e97e8921 /libxsde/xsde/cxx/parser/non-validating/xml-schema-pskel.hxx
parent4f38adc11ab1a3a1ab2dd3f958c917182be7d71f (diff)
Add support for the whiteSpace facet
Use the same mechanism to handle whitespace processing for build-in types and enumerations.
Diffstat (limited to 'libxsde/xsde/cxx/parser/non-validating/xml-schema-pskel.hxx')
-rw-r--r--libxsde/xsde/cxx/parser/non-validating/xml-schema-pskel.hxx90
1 files changed, 71 insertions, 19 deletions
diff --git a/libxsde/xsde/cxx/parser/non-validating/xml-schema-pskel.hxx b/libxsde/xsde/cxx/parser/non-validating/xml-schema-pskel.hxx
index 59469c6..6b98277 100644
--- a/libxsde/xsde/cxx/parser/non-validating/xml-schema-pskel.hxx
+++ b/libxsde/xsde/cxx/parser/non-validating/xml-schema-pskel.hxx
@@ -551,7 +551,29 @@ namespace xsde
// string that you have to delete with delete[] (or custom
// deallocator if enabled).
//
- struct string_pskel: simple_content
+
+ struct string_facets
+ {
+ string_facets ();
+
+ void
+ _whitespace_facet (unsigned int);
+
+ public:
+ struct facets
+ {
+ // 0 - preserve
+ // 1 - replace
+ // 2 - collapse
+ //
+ unsigned int whitespace_: 2;
+ };
+
+ protected:
+ facets facets_;
+ };
+
+ struct string_pskel: simple_content, string_facets
{
#ifdef XSDE_STL
virtual std::string
@@ -575,9 +597,12 @@ namespace xsde
protected:
string_pskel* string_impl_;
#endif
+ protected:
+ const string_facets::facets&
+ _facets () const;
};
- struct normalized_string_pskel: simple_content
+ struct normalized_string_pskel: simple_content, string_facets
{
#ifdef XSDE_STL
virtual std::string
@@ -593,17 +618,20 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ normalized_string_pskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- normalized_string_pskel ();
normalized_string_pskel (normalized_string_pskel* impl, void*);
protected:
normalized_string_pskel* normalized_string_impl_;
#endif
+ protected:
+ const string_facets::facets&
+ _facets () const;
};
- struct token_pskel: simple_content
+ struct token_pskel: simple_content, string_facets
{
#ifdef XSDE_STL
virtual std::string
@@ -619,17 +647,20 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ token_pskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- token_pskel ();
token_pskel (token_pskel* impl, void*);
protected:
token_pskel* token_impl_;
#endif
+ protected:
+ const string_facets::facets&
+ _facets () const;
};
- struct name_pskel: simple_content
+ struct name_pskel: simple_content, string_facets
{
#ifdef XSDE_STL
virtual std::string
@@ -645,17 +676,20 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ name_pskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- name_pskel ();
name_pskel (name_pskel* impl, void*);
protected:
name_pskel* name_impl_;
#endif
+ protected:
+ const string_facets::facets&
+ _facets () const;
};
- struct nmtoken_pskel: simple_content
+ struct nmtoken_pskel: simple_content, string_facets
{
#ifdef XSDE_STL
virtual std::string
@@ -671,14 +705,17 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ nmtoken_pskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- nmtoken_pskel ();
nmtoken_pskel (nmtoken_pskel* impl, void*);
protected:
nmtoken_pskel* nmtoken_impl_;
#endif
+ protected:
+ const string_facets::facets&
+ _facets () const;
};
struct nmtokens_pskel: list_base
@@ -703,7 +740,7 @@ namespace xsde
#endif
};
- struct ncname_pskel: simple_content
+ struct ncname_pskel: simple_content, string_facets
{
#ifdef XSDE_STL
virtual std::string
@@ -719,17 +756,20 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ ncname_pskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- ncname_pskel ();
ncname_pskel (ncname_pskel* impl, void*);
protected:
ncname_pskel* ncname_impl_;
#endif
+ protected:
+ const string_facets::facets&
+ _facets () const;
};
- struct id_pskel: simple_content
+ struct id_pskel: simple_content, string_facets
{
#ifdef XSDE_STL
virtual std::string
@@ -745,17 +785,20 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ id_pskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- id_pskel ();
id_pskel (id_pskel* impl, void*);
protected:
id_pskel* id_impl_;
#endif
+ protected:
+ const string_facets::facets&
+ _facets () const;
};
- struct idref_pskel: simple_content
+ struct idref_pskel: simple_content, string_facets
{
#ifdef XSDE_STL
virtual std::string
@@ -771,14 +814,17 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ idref_pskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- idref_pskel ();
idref_pskel (idref_pskel* impl, void*);
protected:
idref_pskel* idref_impl_;
#endif
+ protected:
+ const string_facets::facets&
+ _facets () const;
};
struct idrefs_pskel: list_base
@@ -803,7 +849,7 @@ namespace xsde
#endif
};
- struct language_pskel: simple_content
+ struct language_pskel: simple_content, string_facets
{
#ifdef XSDE_STL
virtual std::string
@@ -819,17 +865,20 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ language_pskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- language_pskel ();
language_pskel (language_pskel* impl, void*);
protected:
language_pskel* language_impl_;
#endif
+ protected:
+ const string_facets::facets&
+ _facets () const;
};
- struct uri_pskel: simple_content
+ struct uri_pskel: simple_content, string_facets
{
#ifdef XSDE_STL
virtual std::string
@@ -845,14 +894,17 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ uri_pskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- uri_pskel ();
uri_pskel (uri_pskel* impl, void*);
protected:
uri_pskel* uri_impl_;
#endif
+ protected:
+ const string_facets::facets&
+ _facets () const;
};
struct qname_pskel: simple_content