Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

Namespace

Use aka2::xmlns() to register namespace. Here's an example to define a document type in "aka"(http://akaxiso.sourceforge.jp) namespace.

 struct foo {
  long value_;
 };

 struct foo_leaf : aka2::sequence<foo, foo_leaf> {
  void model() {
    member("aka:value", &foo::value_);
  }
 };

 int main() {
   aka2::initialize();
   aka2::xmlns("aka", "http://akaxiso.sourceforge.jp"); 
   aka2::doctype("aka:foo", foo_leaf());

   // ... code continues.
 }

By calling aka2::xmlns(), namespace prefix "aka" and namespace URI "http://akaxiso.sourceforge.jp" is associated.
The leaf class, foo_leaf, defines a element by using a qualified tag-name of "aka:value".


Generated on Sat Dec 18 22:43:30 2004 for akaxiso2 by doxygen1.2.18