[xsd-users] hide .xsd file from the schemaLocation attribute

confy con c0nfuser at hotmail.com
Fri Nov 15 15:42:57 EST 2013


Hello Boris,
Thank you for your fast reply,
I read the documentation and suits me the third option with the embeeded xsd because I would prefer to not distribute the .xsd schema with the parser.After I checked your the embedded example but as far as I understand there is not any straight forward way to do that.. What I mean is:
1) First you create an executable which converts the .xsd file into 2 binary(like) XMLByte type library.2) Then you create a parser which reads this schema from memory and then can validate the xml files whithout need to locate the .xsd.
My questions are:
1) Is there any Official Codesynthesis Tool which does the first convertion?(like xsdbin) I tried to check the xsd command line but I couldnt find any similar option..2) Is there any "wrapper" like function which does the job directly?  Like to loadmemory,deserialize,and parse directly the library without have to create my own grammar_input_stream lib etc..
I am not lazy to create my own or even copy your example, I just need a more "tested" or "official" way to implement that in order to avoid future "surprices" :)
Regards,
G.



> Date: Mon, 11 Nov 2013 20:01:36 +0200
> From: boris at codesynthesis.com
> To: c0nfuser at hotmail.com
> CC: xsd-users at codesynthesis.com
> Subject: Re: [xsd-users] hide .xsd file from the schemaLocation attribute
> 
> Hi,
> 
> confy con <c0nfuser at hotmail.com> writes:
> 
> > I would like to ask If there is any option of validating my xml 
> > without specifying the .xsd location in the "xsi:schemaLocation=" 
> > attribute.
> 
> Yes, see Section 5.1, "XML Schema Validation and Searching" in the 
> C++/Tree Mapping Getting Started Guide:
> 
> http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/#5.1
> 
> Boris
 		 	   		  


More information about the xsd-users mailing list