diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-18 11:17:51 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-18 11:17:51 +0200 |
commit | d80d096ee8743fd6f7382d274272b0b6d7faf9bf (patch) | |
tree | d0f0bee1e645cb2b86b6837ac0db8a7d2821e533 /examples/cxx/hybrid/evolution/passthrough/unknown-type.hxx | |
parent | 0e4637025fa8d1b4234b0512561d31f0dd023843 (diff) |
Support for schema evolution using substitution groups
New examples: hybrid/evolution/ignore and hybrid/evolution/passthrough.
Diffstat (limited to 'examples/cxx/hybrid/evolution/passthrough/unknown-type.hxx')
-rw-r--r-- | examples/cxx/hybrid/evolution/passthrough/unknown-type.hxx | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/examples/cxx/hybrid/evolution/passthrough/unknown-type.hxx b/examples/cxx/hybrid/evolution/passthrough/unknown-type.hxx new file mode 100644 index 0000000..c3e544c --- /dev/null +++ b/examples/cxx/hybrid/evolution/passthrough/unknown-type.hxx @@ -0,0 +1,51 @@ +// file : examples/cxx/hybrid/evolution/passthrough/unknown-type.hxx +// author : Boris Kolpackov <boris@codesynthesis.com> +// copyright : not copyrighted - public domain + +#ifndef UNKNOWN_TYPE_HXX +#define UNKNOWN_TYPE_HXX + +#include "xml.hxx" + +namespace transform +{ + // Customized unknown_type. We add members that store the raw XML + // representation of an unknown transformation as well as the parsed + // element name and namespace from the substitution group. + // + class unknown_type: public unknown_type_base + { + public: + unknown_type (); + + const xml::qname& + element_name () const + { + return name_; + } + + void + element_name (const xml::qname& n) + { + name_ = n; + } + + const xml::element& + content () const + { + return content_; + } + + xml::element& + content () + { + return content_; + } + + private: + xml::qname name_; + xml::element content_; + }; +} + +#endif // UNKNOWN_TYPE_HXX |