- Make the XSD generator use program->get_namespace("xsd")
instead of program->get_xsd_namespace()
- Eliminate the explicit "xsd_namespace" in t_program.
- Deprecate the xsd_namespace token.
- Update example .thrift files and syntax files.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@745237
13f79535-47bb-0310-9956-
ffa450edef68
string f_xsd_name = get_out_dir()+tservice->get_name()+".xsd";
f_xsd_.open(f_xsd_name.c_str());
- string ns = program_->get_xsd_namespace();
+ string ns = program_->get_namespace("xsd");
if (ns.size() > 0) {
ns = " targetNamespace=\"" + ns + "\" xmlns=\"" + ns + "\" " +
"elementFormDefault=\"qualified\"";
return php_namespace_;
}
- void set_xsd_namespace(std::string xsd_namespace) {
- xsd_namespace_ = xsd_namespace;
- }
-
- const std::string& get_xsd_namespace() const {
- return xsd_namespace_;
- }
-
private:
// File path
// PHP namespace
std::string php_namespace_;
- // XSD namespace
- std::string xsd_namespace_;
-
};
#endif
g_program->set_namespace("cocoa", $2);
}
}
+/* TODO(dreiss): Get rid of this once everyone is using the new hotness. */
| tok_xsd_namespace tok_literal
{
+ pwarning(1, "'xsd_namespace' is deprecated. Use 'namespace xsd' instead");
pdebug("Header -> tok_xsd_namespace tok_literal");
if (g_parse_mode == PROGRAM) {
- g_program->set_xsd_namespace($2);
+ g_program->set_namespace("cocoa", $2);
}
}
/* TODO(dreiss): Get rid of this once everyone is using the new hotness. */
" Keywords
syn keyword thriftKeyword namespace
syn keyword thriftKeyword php_namespace
-syn keyword thriftKeyword xsd_all xsd_optional xsd_nillable xsd_namespace xsd_attrs
+syn keyword thriftKeyword xsd_all xsd_optional xsd_nillable xsd_attrs
syn keyword thriftKeyword include cpp_include cpp_type const optional required
syn keyword thriftBasicTypes void bool byte i16 i32 i64 double string binary
syn keyword thriftStructure map list set struct typedef exception enum throws