[xsd-users] XSD xmlns:tns issue

Haydar Ozan KANTARCI haydar.kantarci at hotmail.com
Tue Oct 28 03:39:25 EDT 2014


Hello,i am having problems defining my tns type from XSD. My xsd header looks like this;<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.model.xml.design.page.cemil.aero/" xmlns:tns="http://www.model.xml.design.page.cemil.aero/" elementFormDefault="qualified">however, when i generate the hxx and cxx files, the parameters with "tns" types doesnt seem to work.
 <complexType name="pageListType">    <sequence>      <element name="page" type="tns:pageType"        maxOccurs="unbounded" minOccurs="1">      </element>      <element name="emergency" type="tns:emergencyType"        maxOccurs="1" minOccurs="0">      </element>      <element name="parameter" type="tns:parameterType" maxOccurs="1" minOccurs="0"></element>    </sequence>  </complexType>
My launcher code seems like this;
	char * in = "hello.xml"; 	using namespace xercesc;        XMLPlatformUtils::Initialize ();  try  {    using namespace TavMap;	xml_schema::properties props;	props.no_namespace_schema_location("hello.xsd");	auto_ptr <pageListType> plPtr ( pageList(in, xml_schema::flags::dont_validate, props));  }
i used the custom build rules to define the namespace already, however i am not perfectly sure how to handle xmlns:tns. Thanks for your time,Regards,Haydar 		 	   		  


More information about the xsd-users mailing list