1 #ifndef target_hh 2 #define target_hh 3 4 #include <string> 5 #include <libxml/tree.h> 6 7 class XDoc; 8 9 class Target 10 { 11 protected: 12 Target(const std::string &nsurl); 13 14 std::string get_scoped_name(const char *tail); 15 std::string get_ns_url(); 16 17 xmlNodePtr import_node(xmlNodePtr n); 18 xmlNodePtr import_tip(xmlNodePtr n); 19 20 virtual std::string get_ns_prefix() const = 0; 21 virtual XDoc get_dest() = 0; 22 23 static int get_count_attr(xmlNodePtr instr); 24 25 private: 26 std::string nsurl; 27 28 xmlNodePtr do_import_node(xmlNodePtr n); 29 }; 30 get_ns_url()31inline std::string Target::get_ns_url() 32 { 33 return nsurl; 34 } 35 36 #endif 37