From sbalasub at qualcomm.com Fri Feb 1 19:12:49 2008 From: sbalasub at qualcomm.com (Balasubramanyam, Shivakumar) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Seperation of Data and serialization code In-Reply-To: <20080128191904.GD22822@karelia> References: <20080128191904.GD22822@karelia> Message-ID: Boris, The constructors could still be retained but with only simple types. IMO, constructors that accept parsing objects (like :xercesc:DOMElement) could also be implemented as operators that can reside in a different file or library, which will be used by serialization feature. Could you please elaborate on the role of global functions? Are these basically the registration or mapping of XML nodes to serialized class types? I am sure this is really challenging problem for implementation. Thanks, Shiva -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Monday, January 28, 2008 11:19 AM To: Balasubramanyam, Shivakumar Cc: xsd-users@codesynthesis.com Subject: Re: [xsd-users] Seperation of Data and serialization code Hi Shiva, Balasubramanyam, Shivakumar writes: > Is there anyway today that I can separate the code generation of the > Data (representing the XSD schema) and the serialization code? > > This would mostly help the layering of the software where the software > modules would just depend on the data and does not know how it is > actually being serialized in the system. For example, we may move from > XML to XDR or to Custom serialization library, but that would not > require re-building the application software. There is no way to do this at the moment. By serialization I assume you mean both XML (or binary) parsing and serialization. If that's the case, then there is one problem with supporting something like this in the future. While it is possible to separate serialization from the object model because it is implemented as operators and global functions, this approach won't work for parsing because it is implemented as constructors and global functions. We choose to use constructors for parsing in order to make the interface help prevent construction of invalid object models by not providing default constructors for types with required elements or attributes. If we used something other than constructors for parsing the we would have had to provide default constructors for all type since parsing would have been performed in two steps: construction first and then parsing. Boris From francis.rammeloo at gmail.com Sat Feb 2 09:29:45 2008 From: francis.rammeloo at gmail.com (Francis Rammeloo) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] --custom-type mapping to fundamental types Message-ID: Hello, I have an .xsd file that contains following entry: The C++/Tree mapping tool would translate this normally to a class. However, in order to reduse verbosity I used following command line option: --custom-type time=int The generated code however does not compile. Visual Studio 2005 Express Edition gives following compile errors for these lines: void user_status:: time (::std::auto_ptr< time_type > time) { this->time_.set (time); } error C2664: 'xsd::cxx::tree::one::set' : cannot convert parameter 1 from 'std::auto_ptr<_Ty>' to 'const user_status::time_type &' Can someone help me out? I would appreciate your help a lot. Best regards, Francis From uri at hyperroll.com Sun Feb 3 08:25:00 2008 From: uri at hyperroll.com (Uri Karagila) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] xsd: cannot compile on HP-UX In-Reply-To: <92686E0624B7DB48B13054132046F69FC90E02@ilexch1.int.hyperroll.com> Message-ID: <783879783B65E44995520FEF376C453839872E@ilexch1.int.hyperroll.com> Hi, pre-release binary worked just fine. Can you please provide estimation for having that fix at official released version? Regards Uri -----Original Message----- From: Uri Karagila Sent: Tuesday, September 18, 2007 12:46 PM To: Boris Kolpackov Subject: RE: [xsd-users] xsd: cannot compile on HP-UX Tnx, I will. -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Tuesday, September 18, 2007 11:37 AM To: Uri Karagila Cc: xsd-users@codesynthesis.com Subject: Re: [xsd-users] xsd: cannot compile on HP-UX Hi Uri, Uri Karagila writes: > HP-UX C++ compiler aCC (HP ANSI C++ B3910B A.03.63) does not compile > xsd generated code even with "-AA" flag because of some > incompatibility (or extended usage?) of auto_ptr<> template. Thanks for the test case. We have identified and worked around the problem (aCC3 has a non-standard std::auto_ptr). I've build you a pre-release binary with the fix for HP-UX. Can you try it and let me know if you still have any problems? http://codesynthesis.com/~boris/tmp/xsd-3.1.0.a2-hppa-hpux.tar.gz Boris From boris at codesynthesis.com Sun Feb 3 15:13:34 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] xsd: cannot compile on HP-UX In-Reply-To: <783879783B65E44995520FEF376C453839872E@ilexch1.int.hyperroll.com> References: <92686E0624B7DB48B13054132046F69FC90E02@ilexch1.int.hyperroll.com> <783879783B65E44995520FEF376C453839872E@ilexch1.int.hyperroll.com> Message-ID: <20080203201334.GA14423@karelia> Hi Uri, Uri Karagila writes: > pre-release binary worked just fine. Can you please provide estimation > for having that fix at official released version? If everything goes well, the final 3.1.0 should be out the end of this week or the beginning of next week. Boris From petry at itwm.fhg.de Mon Feb 4 09:37:24 2008 From: petry at itwm.fhg.de (Alexander Petry) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] [Q] How does one use remote schema locations? Message-ID: <20080204143722.GA17227@bench.jakalx.net> Hi list, this is my first post to this list, so hello everybody. I am currently trying to do the following from within my XML Schema definition: This imports the given XML Schema from a local file. The problem in this case is, that the XML Encryption Schema imports the XML Digital Signature Schema using a remote URI: Unfortunately, this seems not to work with 'xsd': xsd cxx-tree --namespace-map "http://www.w3.org/2001/04/xmlenc#=XMLEnc" xenc-schema.xsd xenc-schema.xsd: error: 'http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd' is not a valid filesystem path Did I do something wrong or are remote schema locations not supported? Best regards, Alex From boris at codesynthesis.com Mon Feb 4 09:53:08 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] [Q] How does one use remote schema locations? In-Reply-To: <20080204143722.GA17227@bench.jakalx.net> References: <20080204143722.GA17227@bench.jakalx.net> Message-ID: <20080204145308.GB11442@karelia> Hi Alexander, Alexander Petry writes: > Did I do something wrong or are remote schema locations not supported? Yes, remote locations are not supported. For now, you will need to modify the schema file to use a local path instead of a URI. In the next version of XSD (3.1.0, due in a couple of days) you will be able to re-map remote schemas to local ones without modifying the schemas (--location-map and --location-regex compiler options). Boris From boris at codesynthesis.com Mon Feb 4 10:04:25 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] --custom-type mapping to fundamental types In-Reply-To: References: Message-ID: <20080204150425.GC11442@karelia> Hi Francis, Francis Rammeloo writes: > > > > > The C++/Tree mapping tool would translate this normally to a class. > However, in order to reduse verbosity I used following command line > option: > > --custom-type time=int > > The generated code however does not compile. Unfortunately this is not (yet) supported. XSD assumes that types that are by default mapped to user-defined types, when customized, are also mapped to user-defined types. The same for fundamental types. It won't be very hard to allow the --custom-type option to also specify whether the target type is user-defined or fundamental. The problem is that currently the knowledge supplied with the --custom-type option is only available in the current translation. So if you defined your time type in one schema file and used it in the other, then currently you only need to provide the --custom-type option when compiling the defining schema. As a result when compiling the schema the is using the type, there no way to know if time is a user-defined or fundamental type. Boris From boris at codesynthesis.com Mon Feb 4 10:32:13 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Seperation of Data and serialization code In-Reply-To: References: <20080128191904.GD22822@karelia> Message-ID: <20080204153213.GD11442@karelia> Hi Shiva, Balasubramanyam, Shivakumar writes: > IMO, constructors that accept parsing objects (like :xercesc:DOMElement) > could also be implemented as operators that can reside in a different > file or library, which will be used by serialization feature. I probably haven't explained the problem with this approach well enough in my previous email. Let's assume we have the following type: The first and last elements are required and it is a good idea not to allow construction of the name object without these two values specified. To achieve this, XSD won't generated default c-tors for such objects (unless you explicitly request them with the --generate- default-ctor option). The only c-tor (besides the copy and parsing c-tors) that will be available for this type is the following: class name { name (string first, string last); ... }; As a result you cannot do something like this: name n; Instead you are forced to do: name n ("John", "Doe"); Now suppose we got rid of the parsing c-tors and instead make them operators in the form: void operator>> (DOMElement&, const name&); When we (or the generated code) use this operator, we need to construct the object first: DOMElement& e = ... name n; e >> n; The default c-tor is not available which forces us to either provide the default c-tor which makes the object model easier to misuse or write something like this which is slow and ugly: name n ("", ""); e >> n; > Could you please elaborate on the role of global functions? Are these > basically the registration or mapping of XML nodes to serialized class > types? Global functions correspond to the global elements and are just helper functions that allow you to parse XML from common sources. > I am sure this is really challenging problem for implementation. The major problem with implementing this is two-fold: 1. The object model becomes "looser" as explained above. 2. The parsing c-tors are part of the interface and are used, for example, to parse wildcard content. Removing these c-tors will break user code. Overall, I tend to think that change of a format (e.g, from XML to binary) does not happen very often to warrant breaking of the interface and making the object model less strict. What do you think? Boris From Ryan.Prather at peterson.af.mil Mon Feb 4 11:10:06 2008 From: Ryan.Prather at peterson.af.mil (Prather, Ryan C SSgt USAF AFSPC SYAG/SED) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Seg Fault Message-ID: I am getting a segmentation fault when trying parse a particular document. The last executable line is in the following Xerces functions: inline SAX2XMLReader * XMLReaderFactory::createXMLReader( MemoryManager *const manager, XMLGrammerPool *const gramPool) { return (SAW2XMLReader *)(new (manager) SAX2XMLReaderImpl(manager, gramPool)); } It will run the document.pre function, but when trying to run document.parse it hits this error. It is not even going into the document to parse it. There are other parsers that run prior to this that run just fine. I have 6 parsers and this is the last one to run. The other ones run just fine. Any ideas? Ryan From boris at codesynthesis.com Mon Feb 4 13:12:33 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Seg Fault In-Reply-To: References: Message-ID: <20080204181233.GE11442@karelia> Hi Ryan, Prather, Ryan C SSgt USAF AFSPC SYAG/SED writes: > I am getting a segmentation fault when trying parse a particular > document. The last executable line is in the following Xerces > functions: > > inline SAX2XMLReader * XMLReaderFactory::createXMLReader( MemoryManager > *const manager, XMLGrammerPool *const gramPool) > { > return (SAW2XMLReader *)(new (manager) > SAX2XMLReaderImpl(manager, gramPool)); > } One fairly common cause of errors that involve memory allocation in Xerces-C++ is the uninitialized runtime. If you are initializing it yourself, then can check that it is not terminated before you call your last parser? Also, if your application is multi-threaded and you don't initialize the Xerces-C++ runtime, then you most likely should in order to avoid race conditions (which could also cause the above error). If you make this change, also make sure you pass the dont_initialize flag to the document's parse() functions: http://codesynthesis.com/projects/xsd/documentation/cxx/parser/guide/#7.1 Boris From Ryan.Prather at peterson.af.mil Mon Feb 4 15:01:02 2008 From: Ryan.Prather at peterson.af.mil (Prather, Ryan C SSgt USAF AFSPC SYAG/SED) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Seg Fault In-Reply-To: <20080204181233.GE11442@karelia> References: <20080204181233.GE11442@karelia> Message-ID: How would I check to see if the runtime is getting terminated? Everything was working Wed last week just fine. I moved some files around and I'm getting an error now. In order to troubleshoot, I took the threading out, but we will want to put it back in as soon as I get this figured out. Ryan -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Monday, February 04, 2008 11:13 AM To: Prather, Ryan C SSgt USAF AFSPC SYAG/SED Cc: xsd-users@codesynthesis.com Subject: Re: [xsd-users] Seg Fault Hi Ryan, Prather, Ryan C SSgt USAF AFSPC SYAG/SED writes: > I am getting a segmentation fault when trying parse a particular > document. The last executable line is in the following Xerces > functions: > > inline SAX2XMLReader * XMLReaderFactory::createXMLReader( > MemoryManager *const manager, XMLGrammerPool *const gramPool) { > return (SAW2XMLReader *)(new (manager) SAX2XMLReaderImpl(manager, > gramPool)); } One fairly common cause of errors that involve memory allocation in Xerces-C++ is the uninitialized runtime. If you are initializing it yourself, then can check that it is not terminated before you call your last parser? Also, if your application is multi-threaded and you don't initialize the Xerces-C++ runtime, then you most likely should in order to avoid race conditions (which could also cause the above error). If you make this change, also make sure you pass the dont_initialize flag to the document's parse() functions: http://codesynthesis.com/projects/xsd/documentation/cxx/parser/guide/#7. 1 Boris From boris at codesynthesis.com Mon Feb 4 15:26:55 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Seg Fault In-Reply-To: References: <20080204181233.GE11442@karelia> Message-ID: <20080204202655.GG11442@karelia> Hi Ryan, Prather, Ryan C SSgt USAF AFSPC SYAG/SED writes: > How would I check to see if the runtime is getting terminated? > Everything was working Wed last week just fine. I moved some files > around and I'm getting an error now. > > In order to troubleshoot, I took the threading out, but we will want to > put it back in as soon as I get this figured out. Try to initialize and terminate the Xerces-C++ runtime yourself in main(). Then when you call the parse() functions on the xml_schema::document object, pass xml_schema::flags::dont_initialize as the second argument: #include int main (int argc, char* argv[]) { xercesc::XMLPlatformUtils::Initialize (); { // Put parsing code here: // ... xml_schema::document doc_p (...); doc_p.parse ("file.xml", xml_schema::flags::dont_initialize); } xercesc::XMLPlatformUtils::Terminate (); } Boris From Ryan.Prather at peterson.af.mil Mon Feb 4 15:54:10 2008 From: Ryan.Prather at peterson.af.mil (Prather, Ryan C SSgt USAF AFSPC SYAG/SED) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Seg Fault In-Reply-To: <20080204202655.GG11442@karelia> References: <20080204181233.GE11442@karelia> <20080204202655.GG11442@karelia> Message-ID: No, I still get the same error at the same location Ryan -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Monday, February 04, 2008 1:27 PM To: Prather, Ryan C SSgt USAF AFSPC SYAG/SED Cc: xsd-users@codesynthesis.com Subject: Re: [xsd-users] Seg Fault Hi Ryan, Prather, Ryan C SSgt USAF AFSPC SYAG/SED writes: > How would I check to see if the runtime is getting terminated? > Everything was working Wed last week just fine. I moved some files > around and I'm getting an error now. > > In order to troubleshoot, I took the threading out, but we will want > to put it back in as soon as I get this figured out. Try to initialize and terminate the Xerces-C++ runtime yourself in main(). Then when you call the parse() functions on the xml_schema::document object, pass xml_schema::flags::dont_initialize as the second argument: #include int main (int argc, char* argv[]) { xercesc::XMLPlatformUtils::Initialize (); { // Put parsing code here: // ... xml_schema::document doc_p (...); doc_p.parse ("file.xml", xml_schema::flags::dont_initialize); } xercesc::XMLPlatformUtils::Terminate (); } Boris From boris at codesynthesis.com Mon Feb 4 15:55:09 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Seg Fault In-Reply-To: References: <20080204181233.GE11442@karelia> <20080204202655.GG11442@karelia> Message-ID: <20080204205509.GH11442@karelia> Hi Ryan, Prather, Ryan C SSgt USAF AFSPC SYAG/SED writes: > No, I still get the same error at the same location What happens if you don't run (e.g., comment out) the other parsers? Also can you examine the core in the debugger. What are the values of the 'manager' and 'gramPool' arguments in the function below (my guess would be that manager is 0)? inline SAX2XMLReader * XMLReaderFactory::createXMLReader( MemoryManager *const manager, XMLGrammerPool *const gramPool) { return (SAW2XMLReader *)(new (manager) SAX2XMLReaderImpl(manager, gramPool)); } Also, if there is a way for you to send me a stripped-down version of your application that reproduces this problem, then I could try to figure out what's going on. Boris From Ryan.Prather at peterson.af.mil Mon Feb 4 16:43:14 2008 From: Ryan.Prather at peterson.af.mil (Prather, Ryan C SSgt USAF AFSPC SYAG/SED) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Seg Fault In-Reply-To: <20080204205509.GH11442@karelia> References: <20080204181233.GE11442@karelia> <20080204202655.GG11442@karelia> <20080204205509.GH11442@karelia> Message-ID: Manager is fine...it has a memory address, but gramPool is "(nil)". I commented out as many of the other parsers as I could and still got the same error. I will work on the strip down version, but it will take me a while. I created a second parser off the same schema and XML doc and it works just fine. I going to remove the current one and putting that one in it's place and see what that does. SSgt Prather -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Monday, February 04, 2008 1:55 PM To: Prather, Ryan C SSgt USAF AFSPC SYAG/SED Cc: xsd-users@codesynthesis.com Subject: Re: [xsd-users] Seg Fault Hi Ryan, Prather, Ryan C SSgt USAF AFSPC SYAG/SED writes: > No, I still get the same error at the same location What happens if you don't run (e.g., comment out) the other parsers? Also can you examine the core in the debugger. What are the values of the 'manager' and 'gramPool' arguments in the function below (my guess would be that manager is 0)? inline SAX2XMLReader * XMLReaderFactory::createXMLReader( MemoryManager *const manager, XMLGrammerPool *const gramPool) { return (SAW2XMLReader *)(new (manager) SAX2XMLReaderImpl(manager, gramPool)); } Also, if there is a way for you to send me a stripped-down version of your application that reproduces this problem, then I could try to figure out what's going on. Boris From boris at codesynthesis.com Tue Feb 5 14:34:27 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Seg Fault In-Reply-To: References: <20080204181233.GE11442@karelia> <20080204202655.GG11442@karelia> <20080204205509.GH11442@karelia> Message-ID: <20080205193427.GA14976@karelia> Hi Ryan, Prather, Ryan C SSgt USAF AFSPC SYAG/SED writes: > Manager is fine...it has a memory address, but gramPool is "(nil)". Hm, this is find then, gramPool should be 0. > I will work on the strip down version, but it will take me a while. I am out of ideas here. I am pretty sure there is something special about how you set up the parser and without having the code it is hard to guess what it is. Boris From wruck at tweerlei.de Wed Feb 6 05:30:32 2008 From: wruck at tweerlei.de (Robert Wruck) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Recurse error parsing XSD Message-ID: <20080206103032.GA23018@mail.tweerlei.de> Hi, I tried xsd cxx-parser (3.0.0) on one of our XSDs and it gave the following error: test2.xsd:12:35: error: Recurse: There is not a complete functional mapping between the particles All elements that are not included in the derived type have a minOccurs="0", so the Recurse rule is NOT validated. Even more interesting, if I add the TopicID field as indicated below, xsd does not complain anymore. The XSDs are: =========== test.xsd =========== =========== test2.xsd =========== Regards, Robert Wruck From boris at codesynthesis.com Wed Feb 6 06:56:22 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Recurse error parsing XSD In-Reply-To: <20080206103032.GA23018@mail.tweerlei.de> References: <20080206103032.GA23018@mail.tweerlei.de> Message-ID: <20080206115622.GB18929@karelia> Hi Robert, Robert Wruck writes: > I tried xsd cxx-parser (3.0.0) on one of our XSDs and it gave the > following error: > > test2.xsd:12:35: error: Recurse: There is not a complete functional > mapping between the particles > > All elements that are not included in the derived type have a > minOccurs="0", so the Recurse rule is NOT validated. This is a bug in Xerces-C++ 2.7.0 that was fixed in 2.8.0. Binaries for the next release of XSD (3.1.0, due in a couple of days) will all use 2.8.0. You can also try the beta1 for 3.1.0 in the meantime: http://www.codesynthesis.com/products/xsd/download.xhtml Boris From boris at codesynthesis.com Thu Feb 7 06:53:35 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] XSD 3.1.0 released Message-ID: <20080207115335.GE31484@karelia> Hi, We have released XSD 3.1.0. The NEWS file entries for this release are as follows: * New option, --file-per-type, triggers generation of a separate set of C++ files for each type defined in XML Schema. This compilation mode is primarily useful when some of your schemas cannot be compiled separately or have cyclic dependencies which involve inheritance. Other new options that are useful in this compilation mode are --type-file-regex, --type-file-regex-trace, and --file-list. See the compiler command line manual (man pages) for more information. * New option, --options-file, allows additional command line options to be provided in files, with one option per line. * New option, --reserved-name, allows insertion of additional names with optional replacements to the list of names that should not be used as identifiers. See the compiler command line manual (man pages) for details. * New options, --location-map, --location-regex, and --location-regex-trace, allow re-mapping of schema locations specified in the include and import elements without modifying the schema files. See the compiler command line manual (man pages) for more information. * New option, --guard-prefix, allows specification of a prefix that should be added to generated header inclusion guards. * New option, --file-list, triggers creation of a file with a list of generated C++ files. This option is primarily useful in the file-per- type compilation mode (--file-per-type) to create a list of generated C++ files, for example, as a makefile fragment. Other new options that are useful with --file-list are --file-list-prologue, --file-list-epilogue, and --file-list-delim. See the compiler command line manual (man pages) for more information. * Support for the upcoming Xerces-C++ 3.0.0 release. C++/Tree * New option, --generate-intellisense, triggers generation of workarounds for IntelliSense bugs in Visual Studio 2005 (8.0). When this option is used, the resulting code is slightly more verbose. IntelliSense in Visual Studio 2008 (9.0) does not require these workarounds. Support for IntelliSense in Visual Studio 2003 (7.1) is improved with this option but is still incomplete. * New options, --type-naming and --function-naming, allow specification of the type and function naming conventions that should be used in the generated code. Supported values for --type-naming are: knr (K&R), ucc (upper-camel-case), and java. Supported values for --function-naming are: knr (K&R), lcc (lower-camel-case), and java. For more information see the NAMING CONVENTION section in the compiler command line manual (man pages). * New options, --type-regex, --accessor-regex, --modifier-regex, --parser-regex, --serializer-regex, and --enumerator-regex, allow specification of transformations for type, accessor function, modifier function, parsing function, serialization function, and enumerator names in order to produce the generated code using a custom naming convention. For more information see the NAMING CONVENTION section in the compiler command line manual (man pages). * Generated list classes now provide a complete set of constructors and conform to the standard C++ sequence interface. * String-based types now provide two extra constructors that expect a C string and std::string as their arguments. This allows direct initialization of string-based types from string literals. * New implementations of the XML Schema date/time types (date, dateTime, duration, gDay, gMonth, gMonthDay, gYear, gYearMonth, and time) that represent the information in the numerical form. * New binary serialization examples: binary/boost, which shows how to save/load the object model to/from a custom format using the Boost serialization library as an example, and binary/xdr, which shows how to save/load the object model to/from XDR (eXternal Data Representation) binary format using the XDR API provided as part of Sun RPC. * The non-copying modifier functions can now be used to assemble object models from scratch. For more information see Section 4.4, "Creating the Object Model from Scratch" in the C++/Tree Mapping Getting Started Guide as well as Section 2.8, "Mapping for Local Elements and Attributes" in the C++/Tree Mapping User Manual. * Doxygen documentation was added to the XSD runtime for the built-in XML Schema types, exceptions, etc. This allows linking of the generated documentation to the XSD runtime documentation using the Doxygen tags mechanism. The Doxygen configuration file for the XSD runtime is provided in the documentation/cxx/tree/reference/ directory. * Support for customization of anyType. Because anyType is a base type for every generated type, customizing it allows one to implement custom functionality that spans the entire type system. See the comments example in the examples/cxx/tree/custom/ directory. * New option, --omit-default-attributes, triggers generation of extra checks that exclude attributes with default and fixed values from the serialized XML documents. * The parsing functions that used to read from DOMInputSource were changed to use InputSource to ease support of Xerces-C++ 3 and 2 series in the same code base. * The parsing function that used to parse DOMDocument* was changed to parse xml_schema::dom::auto_ptr& instead. If the keep_dom and own_dom flags are specified then this parsing function resets the passed automatic pointer and the returned object model assumes ownership of the DOM document. xml_schema::dom::auto_ptr is a simple automatic pointer for Xerces-C++ DOM with the same interface as std::auto_ptr. * The xml_schema::tree_node_key DOM user data key was moved to xml_schema::dom::tree_node_key. C++/Parser * New option, --generate-polymorphic, triggers generation of polymorphism- aware code. This option should be used on XML vocabularies which use xsi:type and/or substitution groups. For more information see Section 5.4, "Support for Polymorphism" in the C++/Parser Mapping Getting Started Guide we well as the polymorphism and polyroot examples in the example/cxx/parser/ directory. * The date/time types (date, dateTime, gDay, gMonth, gMonthDay, gYear, gYearMonth, and time) now represent time zone in the numerical form. * In order to support parsing of polymorphic XML documents, the signatures of the start_* functions (_start_element, _start_any_element, and start_root_element) have changed to include a third argument of type const ro_string*. This argument contains the resolved type name and namespace in case the xsi:type attribute was specified. With this version we have also added support for Windows Vista and Visual Studio 2008/9.0 (including Express Edition). Furthermore, the precompiled binary distributions for Windows (both .zip and .msi) now come with separate project/solution files for Visual Studio 7.1, 8.0, and 9.0 with the latter two versions including 64-bit build configurations. The .msi package contains precompiled Xerces-C++ libraries for Visual Studio 7.1 (32-bit), 8.0 (32 and 64-bit), and 9.0 (32 and 64-bit). Thanks to the following individuals for reporting bugs as well as suggesting fixes and improvements: Jeroen N. Witmond Shivakumar Balasubramanyam Uri Karagila Raul Huertas Kroizman Guy Michael Forstner David Moss Ray Lischner Nicholas Yue Roger Goff Mark Hoffmann Shaun Mangelsdorf Roger Nell Seungmin We Vinay K Mogulothu Jeff Yu Rutger Vos Stefan Stettler Esben Skovenborg Raymond Rizzuto Michael Alig Francis Rammeloo Alexander Petry Robert Wruck Precompiled binary distributions are available from the product's download page: http://www.codesynthesis.com/products/xsd/download.xhtml Source code for this release is available from the project's web page: http://www.codesynthesis.com/projects/xsd/ SHA1 checksums for the files: 463d69ae6304fb54ac5b4dac51d99fd4031b93cf xsd-3.1.0.tar.bz2 113e73b2570afdd9afd7aaec221f133ab52f5988 xsd-3.1.0-powerpc-aix.tar.gz 2a5aa49d985fcf352194e576db33af0325f0f5f9 xsd_3.1.0-1_i386.deb 809891e660372a489a3fc90767ac334b9bf94f7f xsd-3.1.0-1.i686.rpm a7bf9b26ff5ab577fcfeccc9ea76134da88ec7e2 xsd-3.1.0-i686-linux-gnu.tar.bz2 d861388815e409cd38e7a135c1b53aa5e7c83020 xsd_3.1.0-1_amd64.deb 2c2df669bc845846c502bc04f35c7e8ee9e8eedc xsd-3.1.0-1.x86_64.rpm 22228e928a750c173bcac7023ba704c4d3b7454a xsd-3.1.0-x86_64-linux-gnu.tar.bz2 00b3bbd6247bdb7936600d184efe3c525ef3a6b2 xsd-3.1.0-powerpc-linux-gnu.tar.bz2 3a4f3bdd20153ad160db10191832dc2ee5dc921a xsd-3.1.0-ia64-linux-gnu.tar.bz2 f37f022f7b085bad1f79b593c35c120587fd970e xsd-3.1.0-hppa-hpux.tar.gz 723f15227b9baf30e93636fb1556e7958a48af11 xsd-3.1.0-powerpc-macosx.tar.bz2 0483a5bb88e5bb5c0fc01953867571a4f835a9e0 xsd-3.1.0-i686-macosx.tar.bz2 4c8c5784473c3b8827a11c81c862a008a5810138 xsd-3.1.0-sparc-solaris.tar.gz 7a9f8442eaba9909b19c6935384ecd1f3020b628 xsd-3.1.0-i686-solaris.tar.gz 4fcd68f5311a01665e9926531724be49f604be43 xsd-3.1.0-i686-windows.zip e4643a0a0fdda69cf64bc0abf1ca1a681b626397 xsd-3.1.msi Enjoy, Boris -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 652 bytes Desc: Digital signature Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20080207/b5642ae4/attachment.pgp From petry at itwm.fhg.de Fri Feb 8 04:25:28 2008 From: petry at itwm.fhg.de (Alexander Petry) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] [Bug?] generated enumeration uses #defined value Message-ID: <20080208092528.GD19810@bench.jakalx.net> Hi list! I am currently working on a project that uses the JSDL, a language for job submission. JSDL is defined in XML Schema and uses an enumeration "OperatingSystemTypeEnumeration" which restricts the xsd:string type. Well, so far so good, but the restriction includes a value "LINUX" that gets translated by the "xsd" compiler to an enum value LINUX. Unfortunately, on my system, this value is a #defined value which results in a compile time error. Is there a standard procedure to deal with such a case? My first guess would be to include a prologue statement that #undef the problematic values. Maybe it would be nice to have a warning issued by the xsd compiler in case that such a condition occured. Info about my system: g++ (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4) CodeSynthesis XSD XML Schema to C++ compiler 3.1.0 Linux xen-o-rama 2.6.19-4-generic-amd64 #2 SMP Thu Apr 5 05:57:13 UTC 2007 x86_64 GNU/Linux [1] JSDL Specification: http://schemas.ggf.org/jsdl/2005/11/jsdl -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20080208/53ed7594/attachment.pgp From petry at itwm.fhg.de Fri Feb 8 04:45:09 2008 From: petry at itwm.fhg.de (Alexander Petry) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] [Bug?] generated enumeration uses #defined value In-Reply-To: <20080208092528.GD19810@bench.jakalx.net> References: <20080208092528.GD19810@bench.jakalx.net> Message-ID: <20080208094509.GE19810@bench.jakalx.net> * Alexander Petry [080208 10:28]: > Hi list! > > I am currently working on a project that uses the JSDL, a language for job > submission. JSDL is defined in XML Schema and uses an enumeration > "OperatingSystemTypeEnumeration" which restricts the xsd:string > type. Well, so far so good, but the restriction includes a value "LINUX" > that gets translated by the "xsd" compiler to an enum value > LINUX. Unfortunately, on my system, this value is a #defined value which > results in a compile time error. > > Is there a standard procedure to deal with such a case? My first guess > would be to include a prologue statement that #undef the problematic > values. Maybe it would be nice to have a warning issued by the xsd > compiler in case that such a condition occured. Just found the answer: --reserved-name "LINUX=LINUX_OS" fixed my problems ;-) Thanks anyways, Alex -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20080208/a13926ba/attachment.pgp From techlane64 at gmail.com Fri Feb 8 16:42:34 2008 From: techlane64 at gmail.com (Lane Wimberley) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] XInclude support? Message-ID: Hi Boris. I apologize if this has been asked before (I searched, but have only been XSDing for a couple months now so am still a neophyte), but is there, or will there be support for XInclude (assuming this is still on-track with W3C)? My goal is to create an interface that supports use of an XML-based configuration file that can include another config file. For example, if a site has a site-wide configuration with global defaults for run-time application parameters, etc., but a particular user of the application wishes to over-ride some of those, he or she would be able to construct a simple personal config file that first includes the site config file, then simply re-defines a few parameters that they care about. Perhaps there is already some simpler way to accomplish this ... ? Or, is it simply a matter of including/importing the XInclude schema into mine, and then processing the "include" elements myself "by hand?" That seems like a lot of work, when what I really would prefer is something akin to the C preprocessor #include, although I realize this is no trivial matter, with things like namespaces and scopes to consider. Thanks for any help. -Lane Wimberley Austin, TX From boris at codesynthesis.com Sat Feb 9 12:13:43 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] XInclude support? In-Reply-To: References: Message-ID: <20080209171343.GA15679@karelia> Hi Lane, Lane Wimberley writes: > Hi Boris. I apologize if this has been asked before (I searched, but have > only been XSDing for a couple months now so am still a neophyte), but is > there, or will there be support for XInclude (assuming this is still > on-track with W3C)? XInclude is a generic XML fragment inclusion mechanism and, if supported, is normally handled by the XML parser transparently. That is you get a DOM document or SAX events as if the xi:include elements were never there and instead the document fragments were included in the XML document directly. From my experience, however, XInclude is not widely used. Now about support in XSD, or rather in the underlying XML parser that it uses. Current version of Xerces-C++ (2.8.0) does not support XInclude thought it is probably not too hard to create a post-processor for DOM that will handle basic cases and then feed the result to the generated parsing functions. Upcoming Xerces-C++ 3.0.0 provides built-in support for XInclude in DOM parsers (and that's what the C++/Tree mapping is using), however, XInclude elements are handled after XML Schema validation which may or may not be what you want. > My goal is to create an interface that supports use of an XML-based > configuration file that can include another config file. For example, if a > site has a site-wide configuration with global defaults for run-time > application parameters, etc., but a particular user of the application > wishes to over-ride some of those, he or she would be able to construct a > simple personal config file that first includes the site config file, then > simply re-defines a few parameters that they care about. Hm, you are not going to get any "redefine logic" with XInclude. It is a generic XML inclusion mechanism that doesn't know anything about the semantics of the data being included. > Perhaps there is already some simpler way to accomplish this ... ? Or, is > it simply a matter of including/importing the XInclude schema into mine, and > then processing the "include" elements myself "by hand?" Yes, that's one way to do it. However, I would probably ditch XInclude and implement my own inclusion mechanism that is part of the vocabulary. After all, your inclusion elements will only make sense at certain points and have an added semantics of overriding things that were defined/include before. Here is how I would approach it. Let's say we have the following types for our "Configuration" vocabulary: That is, our configuration XML file consists of an optional sequence of 'include' elements followed by an optional sequence of 'property' elements which are defined as name-value pairs. The subsequent properties override previous values of properties with the same name. Two major differences with XInclude here: first the place where the users of our vocabulary can use include elements is restricted to the beginning of the file. With XIclude the user can use it in any place, for example to include a value for the 'name' or 'value' element (unless you explicitly specify where xi:include elements can be used in your schema). The next step is to process the include elements so that the users of our object model (as generated by XSD) only deal with lists of properties. The cleanest way to do this is to customize the Configuration class by inheriting from the generated version and adding include processing code to the parsing constructors. This way everything will be handled completely transparently for the user. For an idea on how to do all this, see the 'wildcard' example in the examples/cxx/tree/custom/ directory as well as the C++/Tree Mapping Customization Guide: The 'wildcard' example overrides the parsing c-tor and serialization operator to extract data matched by an XML Schema wildcard. In your case, your parsing c-tor could perform the following tasks instead: 1. Allow the base parser to extract the data from DOMElement and fill in the include and property sequences. 2. Create an std::map instance. This will automatically take care of the override logic as long as you insert the data in the correct order. 3. Iterate over the include sequence and parser each included file into an object model (at this stage this constructor can be called recursively if the included files contain any include elements themselves). Once you get the object model for a file, iterate over the property sequence and copy the properties into the map. 4. After all include elements are handled, iterate over the property sequence and copy the properties into the map. The resulting map contains the final property values. You can now clear the property sequence and copy properties from the map back into it. Or, you can go one step further in customizing the Configuration class and make it store the properties not as a sequence of name value pairs but as a map. Users of your object model will probably find this handy. If you do this then you also don't need to inherit from the generated Configuration class (you can just use it the implementation of your c-tor) which has an added benefit of not exposing the include sequence to the users. HTH, Boris From ivan at mapsoft.co.yu Mon Feb 11 03:36:34 2008 From: ivan at mapsoft.co.yu (Ivan Markovic) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] "Save as XML" question Message-ID: <001f01c86c89$37fbb020$0300a8c0@ivan> Hi all, I need to make "Save as XML" option for existing app. What is the right approach? 1. To create schema file first, parse it to get the set of hxx/cxx classes and then use them. In this case I need to deploy xsd and use it each time I start my app? 2. Or, I can start from scratch, create set hxx/cpp classes and just use them for serialization? Please, direct me to some useful example. Thanks, ivan From petry at itwm.fhg.de Mon Feb 11 05:19:42 2008 From: petry at itwm.fhg.de (Alexander Petry) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] "Save as XML" question In-Reply-To: <001f01c86c89$37fbb020$0300a8c0@ivan> References: <001f01c86c89$37fbb020$0300a8c0@ivan> Message-ID: <20080211101942.GF19810@bench.jakalx.net> Hi Ivan, * Ivan Markovic [080211 09:39]: > Hi all, > > I need to make "Save as XML" option for existing app. What is the right approach? > > > > 1. To create schema file first, parse it to get the set of hxx/cxx classes and then use them. In this case I need to deploy xsd and use it each time I start my app? I believe the first part of this approach is the right one. Simply create the XML Schema that fits your demands and create the hxx/cxx files with xsd (have a look at the option --generate-serialization). You only need to perform this step in case you change your schema not each time you run your application. Finally you have to use the serialization functions generated by the xsd compiler from within your application and recompile it. That should do the trick. Have a look at the following manual, especially chapter 4 (Serialization): http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/ > > 2. Or, I can start from scratch, create set hxx/cpp classes and just use them for serialization? I don't understand what you mean by "start from scratch", but the xsd compiler is able to generate serialization functions for the generated classes. Alex -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20080211/776a4f57/attachment.pgp From techlane64 at gmail.com Mon Feb 11 16:54:54 2008 From: techlane64 at gmail.com (Lane Wimberley) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Polymorphism w/ substitution groups, but without xsi:type Message-ID: I am attempting to implement a variable-content container as per the first method described in http://www.xfront.com/VariableContentContainers.pdf My schema code is structurally identical to the implementation described on pp 47-50. I have my abstract base element defined in one file (with the element definition "ref"-erenced in the sequence definition of the containing type), and then I define a derived type and element in a separate file wherein I first include the base definition file. Everything builds just fine, but when I attempt to parse an instance file, the parser doesn't recognize the derived type (analogous to CD on pg 50) -- it says the instance of the derived type is an "unknown element." I just updated my xsd version to the latest -- 3.1.0-1 (Debian), and I'm using C++/Tree. (I saw something about polymorphism not being supported completely in C++/Parser ... yet ... ) Thanks (again!) for any help you can provide. -Lane Wimberley Zebra Imaging Austin, TX From boris at codesynthesis.com Tue Feb 12 08:51:29 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Polymorphism w/ substitution groups, but without xsi:type In-Reply-To: References: Message-ID: <20080212135129.GB4068@karelia> Hi Lane, Lane Wimberley writes: > Everything builds just fine, but when I attempt to parse an instance file, > the parser doesn't recognize the derived type (analogous to CD on pg 50) -- > it says the instance of the derived type is an "unknown element." You need to compile your schemas with the --generate-polymorphic option. See Section 2.11, "Mapping for xsi:type and Substitution Groups" in the C++/Tree Mapping User Manual for more information: http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.11 The 'polymorphism' example in the examples/cxx/tree/ directory can also be useful. > I just updated my xsd version to the latest -- 3.1.0-1 (Debian), and I'm > using C++/Tree. (I saw something about polymorphism not being supported > completely in C++/Parser ... yet ... ) Actually, from XSD 3.1.0 polymorphism is completely support in both C++/Tree and C++/Parser mappings. Boris From boris at codesynthesis.com Tue Feb 12 09:20:51 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Re: [xsde-users] vc8 + expat 2.0.1 compilation errors In-Reply-To: <3054411AF4728548AD6D7137190D56B30C4760@admin1.aeromap.com> References: <3054411AF4728548AD6D7137190D56B30C4760@admin1.aeromap.com> Message-ID: <20080212142051.GD4068@karelia> Hi Gennady, Please send questions/bug reports for CodeSynthesis XSD to the xsd-users@codesynthesis.com mailing list (which I've CC'ed to my reply). This mailing list (xsde-users) is for CodeSynthesis XSD/e[1]. Gennady Khokhorin writes: > Got compilation errors for hello parser example using latest > Codesynthesis XSD: > > Error 1 error C2061: syntax error : identifier 'atts' > c:\program files\codesynthesis xsd > 3.1\include\xsd\cxx\parser\expat\elements.txx 579 > Error 2 error C2659: '+=' : function as left operand > c:\program files\codesynthesis xsd > 3.1\include\xsd\cxx\parser\expat\elements.txx 580 > Error 3 error C2664: 'xsd::cxx::parser::expat::bits::split_name' > : cannot convert parameter 1 from 'const XML_Char **(void)' to 'const > XML_Char *' c:\program files\codesynthesis xsd > 3.1\include\xsd\cxx\parser\expat\elements.txx 582 > Error 4 error C2296: '+' : illegal, left operand has type 'const > XML_Char **(__cdecl *)(void)' c:\program files\codesynthesis xsd > 3.1\include\xsd\cxx\parser\expat\elements.txx 598 > > Any idea how to fix it, please. The problem appears to be in this initialization on line 579: const XML_Char** p (atts); Changing it to use assignment makes the errors go away: const XML_Char** p = atts; I thought Microsoft fixed this kind of problems (which are quite common in VC 6.0) in 7.1 but apparently not all of them. Thanks for reporting this! [1] http://www.codesynthesis.com/products/xsde/ Boris From boris at codesynthesis.com Tue Feb 12 09:31:07 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Re: [xsde-users] how to insert/remove elements? In-Reply-To: <3054411AF4728548AD6D7137190D56B30C4761@admin1.aeromap.com> References: <3054411AF4728548AD6D7137190D56B30C4761@admin1.aeromap.com> Message-ID: <20080212143107.GE4068@karelia> Hi Gennady, [Removed xsde-users from CC list and added xsd-users.] Gennady Khokhorin writes: > I'm implementing an xml editor. Have xml template on input and need to > add/edit/remove some elements and store the results. > Is Tree generated code is appropriate to approach this task? If you are implementing a generic XML editor that should be able to edit any XML documents then something like DOM would probably be more appropriate. If, on the other hand, you are creating a special-purpose XML editor to edit documents belonging to a predefined set of XML vocabularies (for which you have schemas) then the C++/Tree mapping is a good choice. > Which xsd.exe options should be involved? Since you will want to save the modified documents back to XML, you will need to generate serialization code with the --generate-serialization option. For more information on how to parse, modify, and serialize XML documents using the C++/Tree mapping see the C++/Tree Mapping Getting Started Guide: http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/ Boris From jelari at gmail.com Wed Feb 13 02:46:42 2008 From: jelari at gmail.com (Ramprakash Jelari thinakaran) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Hi Message-ID: Hi all, Kindly barewith my basic question. I am trying to deseralize the XML output received from JAXB. JAXB by deafult adds 'ns2' namespace in the XML reply. But the deseralization function in codesynthesis catches the exception saying 'ns2' no namespace?... It could be nice if you let know is this a common issue or something can be done in the codesynthesis? Have not registed in codesynthesis. Kindly replyback to this mail id. Regards, Jelari From boris at codesynthesis.com Wed Feb 13 06:35:43 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Hi In-Reply-To: References: Message-ID: <20080213113543.GA26065@karelia> Hi Jelari, Ramprakash Jelari thinakaran writes: > Kindly barewith my basic question. I am trying to deseralize the XML output > received from JAXB. JAXB by deafult adds 'ns2' namespace in the XML reply. > But the deseralization function in codesynthesis catches the exception > saying 'ns2' no namespace?... I am not sure what you mean by "adds 'ns2'". Can you post a small XML fragment that shows what exactly is going on? Also, have you tried to catch the exception and print it (as in examples)? If so, what does the error message say? Boris From boris at codesynthesis.com Wed Feb 13 14:34:53 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] More information on the 3.1.0 release Message-ID: <20080213193453.GG27114@karelia> Hi, I have just published a blog post that goes into a bit more detail on a few major features in XSD 3.1.0, namely the file-per-type compilation mode and configurable identifier naming conventions: http://www.codesynthesis.com/~boris/blog/2008/02/13/codesynthesis-xsd-3-1-0-released/ Boris From boris at codesynthesis.com Wed Feb 13 14:46:30 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Re: [xsde-users] how to handle xsd:include? In-Reply-To: <3054411AF4728548AD6D7137190D56B30C4764@admin1.aeromap.com> References: <3054411AF4728548AD6D7137190D56B30C4764@admin1.aeromap.com> Message-ID: <20080213194630.GI27114@karelia> Hi Gennady, You have sent your questions to the wrong mailing list again. Please send questions about CodeSynthesis XSD to the xsd-users@codesynthesis.com mailing list, not to xsde-users. Gennady Khokhorin writes: > Have a complex metadata xsd with include statement: > > main.xsd: > > > XSD.exe generated classes for main.xsd fine and in .hxx it includes > additional schemas like that: > #include "sect01.hxx" > > As I'm guessing I have run now XSD.exe on sect01.xsd but got an errors > about types declared in main.xsd: > Unknown base type myType for type <...> > where myType declared in main.xsd like that: > > main.xsd: > > > > > > > Does somebody knows how to handle included xsd and global types in > XSD.exe? It appears that your sect01.xsd does not include/import all the type definitions that it uses and as a result it is not valid by itself. You have two options: 1. Fix sect01.xsd to include all the necessary schemas so that it becomes self-sufficient. 2. Use the file-per-type compilation mode that was introduced in XSD 3.1.0. In this mode the compiler will generate a set of source files for each XML Schema type. To use this mode you will invoke the compiler like so: xsd.exe cxx-tree --file-per-type main.xsd Note that in this mode you won't need to compile sect01.xsd or any other schema that main.xsd may import or include separately. For more information about the file-per-type mode, please see the following blog post: http://www.codesynthesis.com/~boris/blog/2008/02/13/codesynthesis-xsd-3-1-0-released/ Boris From boris at codesynthesis.com Wed Feb 13 15:00:43 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Re: [xsde-users] how to insert/remove elements? In-Reply-To: <3054411AF4728548AD6D7137190D56B30C4763@admin1.aeromap.com> References: <3054411AF4728548AD6D7137190D56B30C4763@admin1.aeromap.com> Message-ID: <20080213200043.GJ27114@karelia> Hi Gennady, In the future please keep your replies CC'ed to the xsd-users mailing list. This way other developers who may have experienced a similar problem can provide you with a solution. Plus questions and answers will be archived and available to others with similar problems. Gennady Khokhorin writes: > One tiny question/wish: streaming out xml with std::ofstream created an > extra carriage return symbol after each element: > > > > Hello > > its me > > > > How to drop it? XSD uses DOMWriter provided by Xerces-C++ to serialize to XML. It turns the format-pretty-print feature on by default which produces the result you see (BTW, I believe it adds extra new lines only for element that are directly under the root so real documents with several nesting levels actually look better with these extra newlines than without them). You only other option is to turn pretty-printing off altogether in which case you will get unformatted XML. To do this you will need to set the DOM-to-XML serialization stage yourself and switch the format-pretty-print feature off on the DOMWriter object. For more information see Q3.2 in the C++/Tree Mapping FAQ: http://wiki.codesynthesis.com/Tree/FAQ As well as the Xerces-C++ DOMWriter documentation: http://xerces.apache.org/xerces-c/program-dom.html#DOMWriterFeatures Boris From Ryan.Prather at peterson.af.mil Wed Feb 13 18:05:39 2008 From: Ryan.Prather at peterson.af.mil (Prather, Ryan C SSgt USAF AFSPC SYAG/SED) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Seg Fault In-Reply-To: <20080205193427.GA14976@karelia> References: <20080204181233.GE11442@karelia> <20080204202655.GG11442@karelia> <20080204205509.GH11442@karelia> <20080205193427.GA14976@karelia> Message-ID: I am getting an error when trying to look at it that says that "xml_schema::flags::dont_initialize" is declared but never defined SSgt Prather -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Tuesday, February 05, 2008 12:34 PM To: Prather, Ryan C SSgt USAF AFSPC SYAG/SED Cc: xsd-users@codesynthesis.com Subject: Re: [xsd-users] Seg Fault Hi Ryan, Prather, Ryan C SSgt USAF AFSPC SYAG/SED writes: > Manager is fine...it has a memory address, but gramPool is "(nil)". Hm, this is find then, gramPool should be 0. > I will work on the strip down version, but it will take me a while. I am out of ideas here. I am pretty sure there is something special about how you set up the parser and without having the code it is hard to guess what it is. Boris From techlane64 at gmail.com Wed Feb 13 17:52:22 2008 From: techlane64 at gmail.com (Lane Wimberley) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] hxx file not including superclass type Message-ID: Sorry if this description is a bit on the long side. I have an XSD file that is including another file, which in turn includes one other. The generated header file for the first is not including the definition of a class it uses as a superclass of another. Here's the top-most file, zConfig.xsd ... The SimpleParam.xsd contains, in part, the following ... And, finally, zConfig-base.xsd ... Everything compiles with xsd just fine, but when I attempt to compile zConfig.cxx, I get errors because in zConfig.hxx there is ... class simpleParam_t: public ::ZebraConfig::configParam_t ...but ::ZebraConfig::configParam_t is defined in zConfig-base.hxx, which is not included. Since I am still learning this stuff, I suspect that there is a more elegant (or correct) way to do what I'm trying to do. The difficulties arose when I introduced the namespace (ZebraConfig), which I'm not sure I've done correctly. Or, maybe I need to manually include zConfig-base.hxx in a prologue at xsd compile-time ... ? Or, maybe I need to use the new "file per type" option ... ? BTW, here's what my xsd compile line looks like ... xsd cxx-tree --generate-serialization --generate-doxygen --generate-polymorphic --generate-inline --generate-ostream --root-element config --custom-type configParam_t=/configParam_base --hxx-epilogue '#include "configParam-custom.hxx"' zConfig-base.xsd xsd cxx-tree --generate-serialization --generate-doxygen --generate-polymorphic --generate-inline --generate-ostream --root-element config SimpleParam.xsd xsd cxx-tree --generate-serialization --generate-doxygen --generate-polymorphic --generate-inline --generate-ostream --root-element config zConfig.xsd Sorry for any inconveniences. I hope this is not so convoluted as to be a pain. -Lane Wimberley Austin, TX From boris at codesynthesis.com Thu Feb 14 01:56:42 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Seg Fault In-Reply-To: References: <20080204181233.GE11442@karelia> <20080204202655.GG11442@karelia> <20080204205509.GH11442@karelia> <20080205193427.GA14976@karelia> Message-ID: <20080214065642.GA29106@karelia> Hi Ryan, Prather, Ryan C SSgt USAF AFSPC SYAG/SED writes: > I am getting an error when trying to look at it that says that > "xml_schema::flags::dont_initialize" is declared but never defined Hm, that's strange. I just tried to add this flag to one of the examples (in both 3.0.0 and 3.1.0) and everything compiles fine. Which version of XSD and which C++ compiler/version are using? Boris From boris at codesynthesis.com Thu Feb 14 02:40:41 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] hxx file not including superclass type In-Reply-To: References: Message-ID: <20080214074041.GC29106@karelia> Hi Lane, Lane Wimberley writes: > Everything compiles with xsd just fine, but when I attempt to compile > zConfig.cxx, I get errors because in zConfig.hxx there is ... > > class simpleParam_t: public ::ZebraConfig::configParam_t > > ...but ::ZebraConfig::configParam_t is defined in zConfig-base.hxx, > which is not included. I tried to compile your sample schemas without the --custom-type options and then compiled the generated C++ code and everything works fine. zConfig-base.hxx is included in zConfig.hxx indirectly via SimpleParam.hxx. When you add the "--custom-type configParam_t=/configParam_base" option, the XSD compiler generates only a forward declaration for configParam_t and if this type is not defined by you later, you will get the error when trying to inherit from this type (you cannot inherit from a forward-declared class). I suspect that something is not right in configParam-custom.hxx. Feel free to send its contents if you cannot spot the problem yourself. Boris From Ryan.Prather at peterson.af.mil Thu Feb 14 07:01:02 2008 From: Ryan.Prather at peterson.af.mil (Prather, Ryan C SSgt USAF AFSPC SYAG/SED) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Seg Fault In-Reply-To: <20080214065642.GA29106@karelia> References: <20080204181233.GE11442@karelia> <20080204202655.GG11442@karelia> <20080204205509.GH11442@karelia> <20080205193427.GA14976@karelia> <20080214065642.GA29106@karelia> Message-ID: XSD - 3.0.0b (I can't change this for CM reasons) Solaris CC compiler from SunStudio 11 SSgt Prather -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Wednesday, February 13, 2008 11:57 PM To: Prather, Ryan C SSgt USAF AFSPC SYAG/SED Cc: xsd-users@codesynthesis.com Subject: Re: [xsd-users] Seg Fault Hi Ryan, Prather, Ryan C SSgt USAF AFSPC SYAG/SED writes: > I am getting an error when trying to look at it that says that > "xml_schema::flags::dont_initialize" is declared but never defined Hm, that's strange. I just tried to add this flag to one of the examples (in both 3.0.0 and 3.1.0) and everything compiles fine. Which version of XSD and which C++ compiler/version are using? Boris From uri at hyperroll.com Thu Feb 14 08:21:16 2008 From: uri at hyperroll.com (Uri Karagila) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Warning 6005 Message-ID: <783879783B65E44995520FEF376C4538398A85@ilexch1.int.hyperroll.com> Hi, Please advise, The warning appears many times: Warning 6005: Exact position unknown; near ["/usr/include/sys/_inttypes.h", line 86]. # [line 0 xsd::cxx::tree::_type::_clone(xsd::cxx::tree::flags,xsd::cxx::tree::_typ e *) const] Infinite loop detected. Check for spinning on non-volatile variable. (6005) The warning has no relation to the /usr/include/sys/_inttypes.h file, actually. I suppose, it's because of _clone() function in libxsd/xsd/cxx/tree/elements.hxx file, line 322. Versioning info: >uname -a HP-UX ring B.11.11 U 9000/800 1868900601 unlimited-user license >aCC -AA -V aCC: HP ANSI C++ B3910B A.03.63 >xsd version CodeSynthesis XSD XML Schema to C++ compiler 3.1.0 Copyright (C) 2005-2008 Code Synthesis Tools CC This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Regards Uri From boris at codesynthesis.com Thu Feb 14 08:28:04 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Seg Fault In-Reply-To: References: <20080204181233.GE11442@karelia> <20080204202655.GG11442@karelia> <20080204205509.GH11442@karelia> <20080205193427.GA14976@karelia> <20080214065642.GA29106@karelia> Message-ID: <20080214132804.GB1502@karelia> Hi Ryan, Prather, Ryan C SSgt USAF AFSPC SYAG/SED writes: > XSD - 3.0.0b (I can't change this for CM reasons) > Solaris CC compiler from SunStudio 11 This gets stranger and stranger: I modified line 67 in driver.cxx in examples/cxx/parser/library/: doc_p.parse (argv[1]); To read: doc_p.parse (argv[1], xml_schema::flags::dont_initialize); After that I tried to compile this example with Studio 11 CC (CC -V says "Sun C++ 5.8 Patch 121017-01 2005/12/11") and everything works fine. Can you try to make the same change and see what you get? If the above test works fine, then there is something special about the way you use xml_schema::flags::dont_initialize though I can't think of anything that would cause this. If you could send me an example that reproduces this problem then I could try to figure out what's going on. Boris From boris at codesynthesis.com Thu Feb 14 08:36:27 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Warning 6005 In-Reply-To: <783879783B65E44995520FEF376C4538398A85@ilexch1.int.hyperroll.com> References: <783879783B65E44995520FEF376C4538398A85@ilexch1.int.hyperroll.com> Message-ID: <20080214133627.GC1502@karelia> Hi Uri, Uri Karagila writes: > Warning 6005: Exact position unknown; near > ["/usr/include/sys/_inttypes.h", line 86]. # [line 0 > xsd::cxx::tree::_type::_clone(xsd::cxx::tree::flags,xsd::cxx::tree::_typ > e *) const] Infinite loop detected. Check for spinning on non-volatile > variable. (6005) This appears to be a compiler bug. At least we don't get it with aCC A.03.77. > The warning has no relation to the /usr/include/sys/_inttypes.h file, > actually. I suppose, it's because of _clone() function in > libxsd/xsd/cxx/tree/elements.hxx file, line 322. I don't see anything in line 322 that could possibly cause this. On the other hand, line 299 could be it. Can you try to comment the while loop on this line and let me know if the warning goes away? Thanks, Boris From gkr at as-guides.com Fri Feb 15 06:54:05 2008 From: gkr at as-guides.com (Gordon Kramer) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] unhandled exception when using cxx-tree --omit-default-attributes and attribute with use="required" in xsd Message-ID: <1203076445.11292.20.camel@asdtvg-desktop-server> Hi, when using xsd cxx-tree --generate-serialization --omit-default-attributes a.xsd schema adapted from xsd-3.1.0/tests/cxx/tree/default/test.xsd: and is also attached results in: terminate called after throwing an instance of 'FrontendElements::Context::NoEntry' Aborted (core dumped) I'd like to help but was not able to get xsd compiled with debug information yet. Best regards Gordon -------------- next part -------------- A non-text attachment was scrubbed... Name: a.xsd Type: application/xml Size: 388 bytes Desc: not available Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20080215/2016b119/a.xml From boris at codesynthesis.com Fri Feb 15 06:53:59 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] unhandled exception when using cxx-tree --omit-default-attributes and attribute with use="required" in xsd In-Reply-To: <1203076445.11292.20.camel@asdtvg-desktop-server> References: <1203076445.11292.20.camel@asdtvg-desktop-server> Message-ID: <20080215115359.GA6799@karelia> Hi Gordon, Gordon Kramer writes: > terminate called after throwing an instance of > 'FrontendElements::Context::NoEntry' > Aborted (core dumped) This a bug, thanks for reporting it! I have a fix in my workspace which will appear in the next release. I can also build you a pre- release binary with this fix (let me which platform you are using). Boris From gok at aerometric-ak.com Thu Feb 14 23:04:51 2008 From: gok at aerometric-ak.com (Gennady Khokhorin) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] RE: [xsde-users] how to handle xsd:include? Message-ID: <3054411AF4728548AD6D7137190D56B30C4769@admin1.aeromap.com> Boris, thanks for pointing to the right place for this discussion. Still getting compilation errors like: error C2039: 'myType' : is not a member of '`global namespace'' and c2504 'myType' :base class undefined Did try both approaches: 1. including main.xsd (myType declared here) in sect01.xsd: just before myType declaration. main.xsd has the same include: 2. using --file-per-type option for main.xsd only. This produced double declarations for otherTypes in sect01.hxx and in otherType.hxx For instance in case 1 myType (see sample below) declared as: main.hxx: class myType; .. class myType: public ::xml_schema::String {..} sect01.hxx: #include class otherType; .. class otherType: public ::myType // error c2504: 'myType' base class undefined Command line looks like: xsd.exe cxx-tree --generate-intellisense --generate-serialization --type-naming ucc --function-naming lcc --root-element-all main.xsd xsd.exe cxx-tree --generate-intellisense --generate-serialization --root-element-all sect01.xsd Please, let me know what other options I should try. Thanks in advance. Gennady -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Wednesday, February 13, 2008 10:47 AM To: Gennady Khokhorin Cc: xsd-users@codesynthesis.com Subject: Re: [xsde-users] how to handle xsd:include? Hi Gennady, You have sent your questions to the wrong mailing list again. Please send questions about CodeSynthesis XSD to the xsd-users@codesynthesis.com mailing list, not to xsde-users. Gennady Khokhorin writes: > Have a complex metadata xsd with include statement: > > main.xsd: > > > XSD.exe generated classes for main.xsd fine and in .hxx it includes > additional schemas like that: > #include "sect01.hxx" > > As I'm guessing I have run now XSD.exe on sect01.xsd but got an errors > about types declared in main.xsd: > Unknown base type myType for type <...> where myType declared in > main.xsd like that: > > main.xsd: > > > > > > > Does somebody knows how to handle included xsd and global types in > XSD.exe? It appears that your sect01.xsd does not include/import all the type definitions that it uses and as a result it is not valid by itself. You have two options: 1. Fix sect01.xsd to include all the necessary schemas so that it becomes self-sufficient. 2. Use the file-per-type compilation mode that was introduced in XSD 3.1.0. In this mode the compiler will generate a set of source files for each XML Schema type. To use this mode you will invoke the compiler like so: xsd.exe cxx-tree --file-per-type main.xsd Note that in this mode you won't need to compile sect01.xsd or any other schema that main.xsd may import or include separately. For more information about the file-per-type mode, please see the following blog post: http://www.codesynthesis.com/~boris/blog/2008/02/13/codesynthesis-xsd-3- 1-0-released/ Boris From boris at codesynthesis.com Fri Feb 15 08:02:26 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Re: [xsde-users] how to handle xsd:include? In-Reply-To: <3054411AF4728548AD6D7137190D56B30C4769@admin1.aeromap.com> References: <3054411AF4728548AD6D7137190D56B30C4769@admin1.aeromap.com> Message-ID: <20080215130226.GC6799@karelia> Hi Gennady, Gennady Khokhorin writes: > Did try both approaches: > 1. including main.xsd (myType declared here) in sect01.xsd: schemaLocation="main.xsd"/> > just before myType declaration. main.xsd has the same include: > >From your description I gather that the dependency between main.xsd and sect01.xsd involves inheritance. If that's the case then this approach won't work (in C++ you cannot have two headers including each other with a type in one header inheriting from a type in the other). > 2. using --file-per-type option for main.xsd only. This produced double > declarations for otherTypes in sect01.hxx and in otherType.hxx I guess I haven't explained this clear enough. With the --file-per-type option you *only* compile your root schema (main.xsd). You don't run the XSD compiler on sect01.xsd in this mode since sect01.hxx will be automatically generated while you are compiling main.xsd. Boris From gok at aerometric-ak.com Fri Feb 15 21:32:12 2008 From: gok at aerometric-ak.com (Gennady Khokhorin) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] RE: [xsde-users] how to handle xsd:include? Message-ID: <3054411AF4728548AD6D7137190D56B30C476D@admin1.aeromap.com> Hello, Boris. Did make approach #2 (one file for each type) to compile. My xsd's considered have a cross-reference like that: main.xsd (defines global data types, references to element from sect01.xsd): ---------- (this element defined in sect01.xsd) .. sect01.xsd (using global data type defined in main.xsd, define element referenced in main.xsd): ---------- ... Thanks for your help! Gennady -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Friday, February 15, 2008 4:02 AM To: Gennady Khokhorin Cc: xsd-users@codesynthesis.com Subject: Re: [xsde-users] how to handle xsd:include? Hi Gennady, Gennady Khokhorin writes: > Did try both approaches: > 1. including main.xsd (myType declared here) in > sect01.xsd: just before myType > declaration. main.xsd has the same include: > >From your description I gather that the dependency between main.xsd and sect01.xsd involves inheritance. If that's the case then this approach won't work (in C++ you cannot have two headers including each other with a type in one header inheriting from a type in the other). > 2. using --file-per-type option for main.xsd only. This produced > double declarations for otherTypes in sect01.hxx and in otherType.hxx I guess I haven't explained this clear enough. With the --file-per-type option you *only* compile your root schema (main.xsd). You don't run the XSD compiler on sect01.xsd in this mode since sect01.hxx will be automatically generated while you are compiling main.xsd. Boris From gok at aerometric-ak.com Fri Feb 15 22:00:11 2008 From: gok at aerometric-ak.com (Gennady Khokhorin) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] how to insert/remove elements? Message-ID: <3054411AF4728548AD6D7137190D56B30C476E@admin1.aeromap.com> Boris, I went to the next studying level, compiled my own xml driver. Can not figure out how to edit items in the tree. I can add/edit/remove items in-memory and see its happened using std::cout. But storing tree to external file has no effect, its stored in original state. Classes was built with --generate-serialization option. Input and output looks like: can not change it Code snippet: std::auto_ptr h (metadata (argv[1], ::xml_schema::Flags::dont_validate) ); IdinfoType idInfo = h->idinfo(); CitationType citation = idInfo.citation(); CiteinfoType citeInfo=citation.citeinfo(); CiteinfoType::OriginSequence originator=citeInfo.origin(); originator.clear(); originator.push_back("gok"); for ( CiteinfoType::OriginIterator it = originator.begin(); it != originator.end(); ++it ) { // control tree changes std::cout << "originator:" << *it << std::endl; } // Serialize to a file. std::ofstream ofs ("d:\\mine_o.xml"); metadata(ofs, *h, map, "UTF-8", 0); Should the tree somehow be updated before streaming it out? It is not a case for hello sample, all in-place changes I can see in output file. Please, give me an idea why its not acting as expected. Regards, Gennady -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Wednesday, February 13, 2008 11:01 AM To: Gennady Khokhorin Cc: xsd-users@codesynthesis.com Subject: Re: [xsde-users] how to insert/remove elements? Hi Gennady, In the future please keep your replies CC'ed to the xsd-users mailing list. This way other developers who may have experienced a similar problem can provide you with a solution. Plus questions and answers will be archived and available to others with similar problems. Gennady Khokhorin writes: > One tiny question/wish: streaming out xml with std::ofstream created > an extra carriage return symbol after each element: > > > Hello > > its me > > > > How to drop it? XSD uses DOMWriter provided by Xerces-C++ to serialize to XML. It turns the format-pretty-print feature on by default which produces the result you see (BTW, I believe it adds extra new lines only for element that are directly under the root so real documents with several nesting levels actually look better with these extra newlines than without them). You only other option is to turn pretty-printing off altogether in which case you will get unformatted XML. To do this you will need to set the DOM-to-XML serialization stage yourself and switch the format-pretty-print feature off on the DOMWriter object. For more information see Q3.2 in the C++/Tree Mapping FAQ: http://wiki.codesynthesis.com/Tree/FAQ As well as the Xerces-C++ DOMWriter documentation: http://xerces.apache.org/xerces-c/program-dom.html#DOMWriterFeatures Boris From uri at hyperroll.com Sun Feb 17 03:11:45 2008 From: uri at hyperroll.com (Uri Karagila) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Warning 6005 In-Reply-To: <20080214133627.GC1502@karelia> Message-ID: <783879783B65E44995520FEF376C4538398ACB@ilexch1.int.hyperroll.com> file libxsd/xsd/cxx/tree/elements.hxx, line 319: virtual type* _clone (flags f = 0, container* c = 0) const { return new type (*this, f, c); // <<< This line causes warning 6005; if simple "return 0;" used, no warning generated. } [line 0 xsd::cxx::tree::_type::_clone(xsd::cxx::tree::flags,xsd::cxx::tree::_typ e *) const] Infinite loop detected. Check for spinning on non-volatile variable. (6005) Compiler upgraded: > aCC -V aCC: HP ANSI C++ B3910B A.03.80 Regards Uri -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Thursday, February 14, 2008 3:36 PM To: Uri Karagila Cc: xsd-users@codesynthesis.com Subject: Re: [xsd-users] Warning 6005 Hi Uri, Uri Karagila writes: > Warning 6005: Exact position unknown; near > ["/usr/include/sys/_inttypes.h", line 86]. # [line 0 > xsd::cxx::tree::_type::_clone(xsd::cxx::tree::flags,xsd::cxx::tree::_typ > e *) const] Infinite loop detected. Check for spinning on non-volatile > variable. (6005) This appears to be a compiler bug. At least we don't get it with aCC A.03.77. > The warning has no relation to the /usr/include/sys/_inttypes.h file, > actually. I suppose, it's because of _clone() function in > libxsd/xsd/cxx/tree/elements.hxx file, line 322. I don't see anything in line 322 that could possibly cause this. On the other hand, line 299 could be it. Can you try to comment the while loop on this line and let me know if the warning goes away? Thanks, Boris From boris at codesynthesis.com Sun Feb 17 04:01:42 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Warning 6005 In-Reply-To: <783879783B65E44995520FEF376C4538398ACB@ilexch1.int.hyperroll.com> References: <20080214133627.GC1502@karelia> <783879783B65E44995520FEF376C4538398ACB@ilexch1.int.hyperroll.com> Message-ID: <20080217090142.GA13956@karelia> Hi Uri, Uri Karagila writes: > file libxsd/xsd/cxx/tree/elements.hxx, line 319: > virtual type* > _clone (flags f = 0, container* c = 0) const > { > return new type (*this, f, c); // <<< This line causes > warning 6005; if simple "return 0;" used, no warning generated. > } This line is unchanged from the previous version which I believe didn't have this warning. If you look closely at it, you will see that the inline copy c-tor is called. This copy c-tor was changed compared to the previous version. It also has a no-op loop (see line 299) which is used to squash the "unused variable" king of warnings. So I strongly suspect that it is this while loop that is causing the warning. Since I cannot check it myself (we have a newer version of the compiler), I am asking you to try to comment line 299 out and let me know if this warning is still there. Thank you, Boris From boris at codesynthesis.com Sun Feb 17 07:26:06 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] New wiki pages Message-ID: <20080217122606.GB13956@karelia> Hi, A couple of new Wiki pages have been created for the 3.1.0 release. These are: Schema compilation checklist http://wiki.codesynthesis.com/XSD/Schema_compilation_checklist This page provides a checklist-like run through the most commonly used XSD command line options. Using XSD with Microsoft Visual Studio http://wiki.codesynthesis.com/Using_XSD_with_Microsoft_Visual_Studio This page discusses various ways of integrating the XSD compiler with the Microsoft Visual Studio IDE as well as other Visual Studio-specific topics (e.g., how to build a DLL out of the generated code). Boris -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 652 bytes Desc: Digital signature Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20080217/39f97c51/attachment.pgp From uri at hyperroll.com Mon Feb 18 03:56:42 2008 From: uri at hyperroll.com (Uri Karagila) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Warning 6005 In-Reply-To: <20080217090142.GA13956@karelia> Message-ID: <783879783B65E44995520FEF376C4538398B21@ilexch1.int.hyperroll.com> Hi, The aCC (HP ANSI C++ B3910B A.03.80) is the most updated version of the compiler for HP-UX 11.11. Yes, the commenting out the cycle at line 299 removes the warning. And I don't understand how this loop helps you in squashing warnings. Regards Uri -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Sunday, February 17, 2008 11:02 AM To: Uri Karagila Cc: xsd-users@codesynthesis.com Subject: Re: [xsd-users] Warning 6005 Hi Uri, Uri Karagila writes: > file libxsd/xsd/cxx/tree/elements.hxx, line 319: > virtual type* > _clone (flags f = 0, container* c = 0) const > { > return new type (*this, f, c); // <<< This line causes > warning 6005; if simple "return 0;" used, no warning generated. > } This line is unchanged from the previous version which I believe didn't have this warning. If you look closely at it, you will see that the inline copy c-tor is called. This copy c-tor was changed compared to the previous version. It also has a no-op loop (see line 299) which is used to squash the "unused variable" king of warnings. So I strongly suspect that it is this while loop that is causing the warning. Since I cannot check it myself (we have a newer version of the compiler), I am asking you to try to comment line 299 out and let me know if this warning is still there. Thank you, Boris From boris at codesynthesis.com Mon Feb 18 08:59:07 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Warning 6005 In-Reply-To: <783879783B65E44995520FEF376C4538398B21@ilexch1.int.hyperroll.com> References: <20080217090142.GA13956@karelia> <783879783B65E44995520FEF376C4538398B21@ilexch1.int.hyperroll.com> Message-ID: <20080218135907.GA17034@karelia> Hi Uri, Uri Karagila writes: > The aCC (HP ANSI C++ B3910B A.03.80) is the most updated version of the > compiler for HP-UX 11.11. Hm, I guess then it should be triggered by the compiler options. Perhaps when optimization is turned on... > Yes, the commenting out the cycle at line 299 removes the warning. Great! I am going to get rid of this loop in the next release. For the time being you can keep it commented out or you can disables the warning with the +W6005 option. > And I don't understand how this loop helps you in squashing warnings. Some compilers issue a warning if a function argument is declared but never used. Adding a no-op loop like this: while (&arg == 0); helps silence those compilers. Boris From boris at codesynthesis.com Mon Feb 18 09:08:08 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] how to insert/remove elements? In-Reply-To: <3054411AF4728548AD6D7137190D56B30C476E@admin1.aeromap.com> References: <3054411AF4728548AD6D7137190D56B30C476E@admin1.aeromap.com> Message-ID: <20080218140808.GB17034@karelia> Hi Gennady, Gennady Khokhorin writes: > IdinfoType idInfo = h->idinfo(); > CitationType citation = idInfo.citation(); > CiteinfoType citeInfo=citation.citeinfo(); > CiteinfoType::OriginSequence originator=citeInfo.origin(); You need to use references instead of making copies. If you are making copies and modify them then your modifications have no effect on the original tree: IdinfoType& idInfo = h->idinfo(); CitationType& citation = idInfo.citation(); CiteinfoType& citeInfo = citation.citeinfo(); CiteinfoType::OriginSequence& originator = citeInfo.origin(); BTW, this exact point is covered in Section 4.3, "Modifying the Object Model", in the C++/Tree Mapping Getting Started Guide: http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/#4.3 Boris From uri at hyperroll.com Tue Feb 19 01:47:26 2008 From: uri at hyperroll.com (Uri Karagila) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Warning 6005 In-Reply-To: <20080218135907.GA17034@karelia> Message-ID: <783879783B65E44995520FEF376C4538398B64@ilexch1.int.hyperroll.com> Well, I can make another offer: replace the code at the _type constructor: _type (const type& x, flags f = 0, container* c = 0) : container_ (c) { while (&f == 0) /* unused */; if (x.dom_info_.get ()) { std::auto_ptr r (x.dom_info_->clone (*this, c)); dom_info_ = r; } } With the following code (note the new comments, and the removed line): _type (const type& x, flags/* f*/ = 0, container* c = 0) : container_ (c) { if (x.dom_info_.get ()) { std::auto_ptr r (x.dom_info_->clone (*this, c)); dom_info_ = r; } } And if my offer is accepted, I can do it in my current installation base right now until next version or next issue :-) -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Monday, February 18, 2008 3:59 PM To: Uri Karagila Cc: xsd-users@codesynthesis.com Subject: Re: [xsd-users] Warning 6005 Hi Uri, Uri Karagila writes: > The aCC (HP ANSI C++ B3910B A.03.80) is the most updated version of the > compiler for HP-UX 11.11. Hm, I guess then it should be triggered by the compiler options. Perhaps when optimization is turned on... > Yes, the commenting out the cycle at line 299 removes the warning. Great! I am going to get rid of this loop in the next release. For the time being you can keep it commented out or you can disables the warning with the +W6005 option. > And I don't understand how this loop helps you in squashing warnings. Some compilers issue a warning if a function argument is declared but never used. Adding a no-op loop like this: while (&arg == 0); helps silence those compilers. Boris From boris at codesynthesis.com Tue Feb 19 05:04:23 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Warning 6005 In-Reply-To: <783879783B65E44995520FEF376C4538398B64@ilexch1.int.hyperroll.com> References: <20080218135907.GA17034@karelia> <783879783B65E44995520FEF376C4538398B64@ilexch1.int.hyperroll.com> Message-ID: <20080219100423.GA19833@karelia> Hi Uri, Uri Karagila writes: > With the following code (note the new comments, and the removed line): > _type (const type& x, flags/* f*/ = 0, container* c = 0) This fix will break the doxygen comment that documents this copy c-tor. The proper fix (which will be in the next release) is to move the body of this c-tor out of the class definition. Boris From abhishek.soni at rancoretech.com Tue Feb 19 13:18:25 2008 From: abhishek.soni at rancoretech.com (Abhishek soni) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] (no subject) Message-ID: <40BD4764AF464F76BF9338826E731014@abhisheksoni> Am trying to compile my hello.cxx file and driver.cxx file as it is in your http://codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/#0 example. At first everything went right. Even hello.xml file was generated. But on second try it generated errors. I've attached the txt file named "errors-compling.txt" containing all the errors. I've been trying to figure out the problem cause but no success yet. Kindly help. Regards Abhishek Soni Rancore Technologies Gurgaon INDIA Office - 0124-4200707 -------------- next part -------------- In file included from hello.hxx:59, from driver.cxx:2: /usr/include/xsd/cxx/tree/elements.hxx:27:35: error: xercesc/dom/DOMNode.hpp: No such file or directory /usr/include/xsd/cxx/tree/elements.hxx:28:35: error: xercesc/dom/DOMAttr.hpp: No such file or directory /usr/include/xsd/cxx/tree/elements.hxx:29:38: error: xercesc/dom/DOMElement.hpp: No such file or directory /usr/include/xsd/cxx/tree/elements.hxx:30:39: error: xercesc/dom/DOMDocument.hpp: No such file or directory /usr/include/xsd/cxx/tree/elements.hxx:31:43: error: xercesc/dom/DOMNamedNodeMap.hpp: No such file or directory In file included from /usr/include/xsd/cxx/tree/elements.hxx:33, from hello.hxx:59, from driver.cxx:2: /usr/include/xsd/cxx/xml/elements.hxx:11:42: error: xercesc/util/PlatformUtils.hpp: No such file or directory In file included from /usr/include/xsd/cxx/tree/elements.hxx:1324, from hello.hxx:59, from driver.cxx:2: /usr/include/xsd/cxx/tree/elements.txx:6:39: error: xercesc/util/XMLUniDefs.hpp: No such file or directory In file included from /usr/include/xsd/cxx/tree/types.hxx:3786, from hello.hxx:60, from driver.cxx:2: /usr/include/xsd/cxx/tree/types.txx:6:35: error: xercesc/util/Base64.hpp: No such file or directory /usr/include/xsd/cxx/tree/types.txx:7:38: error: xercesc/util/XMLString.hpp: No such file or directory /usr/include/xsd/cxx/tree/types.txx:8:42: error: xercesc/util/XercesVersion.hpp: No such file or directory In file included from /usr/include/xsd/cxx/tree/types.txx:12, from /usr/include/xsd/cxx/tree/types.hxx:3786, from hello.hxx:60, from driver.cxx:2: /usr/include/xsd/cxx/xml/std-memory-manager.hxx:10:47: error: xercesc/framework/MemoryManager.hpp: No such file or directory In file included from /usr/include/xsd/cxx/tree/parsing.txx:10, from /usr/include/xsd/cxx/tree/parsing.hxx:9, from hello.hxx:66, from driver.cxx:2: /usr/include/xsd/cxx/xml/string.hxx:12:48: error: xercesc/util/XercesDefs.hpp: No such file or directory In file included from /usr/include/xsd/cxx/tree/text.hxx:28, from /usr/include/xsd/cxx/tree/parsing.txx:19, from /usr/include/xsd/cxx/tree/parsing.hxx:9, from hello.hxx:66, from driver.cxx:2: /usr/include/xsd/cxx/tree/text.txx:6:35: error: xercesc/dom/DOMText.hpp: No such file or directory In file included from driver.cxx:2: hello.hxx:308:39: error: xercesc/sax/InputSource.hpp: No such file or directory hello.hxx:310:43: error: xercesc/dom/DOMErrorHandler.hpp: No such file or directory driver.cxx:1: error: expected constructor, destructor, or type conversion before \u2018<\u2019 token /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/i386-redhat-linux/bits/c++config.h:47: error: \u2018__gnu_debug_def\u2019 is not a namespace-name /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/i386-redhat-linux/bits/c++config.h:47: error: expected namespace-name before \u2018;\u2019 token /usr/include/xsd/cxx/xml/elements.hxx: In function \u2018void xsd::cxx::xml::initialize()\u2019: /usr/include/xsd/cxx/xml/elements.hxx:80: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/xml/elements.hxx: In function \u2018void xsd::cxx::xml::terminate()\u2019: /usr/include/xsd/cxx/xml/elements.hxx:86: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx: At global scope: /usr/include/xsd/cxx/tree/elements.hxx:194: error: \u2018XMLCh\u2019 does not name a type /usr/include/xsd/cxx/tree/elements.hxx:346: error: expected \u2018,\u2019 or \u2018...\u2019 before \u2018::\u2019 token /usr/include/xsd/cxx/tree/elements.hxx:356: error: expected \u2018,\u2019 or \u2018...\u2019 before \u2018::\u2019 token /usr/include/xsd/cxx/tree/elements.hxx:356: error: \u2018xsd::cxx::tree::_type::_type(int)\u2019 cannot be overloaded /usr/include/xsd/cxx/tree/elements.hxx:346: error: with \u2018xsd::cxx::tree::_type::_type(int)\u2019 /usr/include/xsd/cxx/tree/elements.hxx:369: error: expected \u2018,\u2019 or \u2018...\u2019 before \u2018::\u2019 token /usr/include/xsd/cxx/tree/elements.hxx:488: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:488: error: expected \u2018;\u2019 before \u2018*\u2019 token /usr/include/xsd/cxx/tree/elements.hxx:500: error: expected `;' before \u2018xercesc\u2019 /usr/include/xsd/cxx/tree/elements.hxx:500: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:500: error: expected \u2018;\u2019 before \u2018*\u2019 token /usr/include/xsd/cxx/tree/elements.hxx:510: error: expected `;' before \u2018class\u2019 /usr/include/xsd/cxx/tree/elements.hxx:538: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:538: error: expected \u2018,\u2019 or \u2018...\u2019 before \u2018*\u2019 token /usr/include/xsd/cxx/tree/elements.hxx:674: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:674: error: \u2018DOMNode\u2019 declared as a \u2018virtual\u2019 field /usr/include/xsd/cxx/tree/elements.hxx:674: error: expected \u2018;\u2019 before \u2018*\u2019 token /usr/include/xsd/cxx/tree/elements.hxx:687: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:687: error: expected `)' before \u2018&\u2019 token driver.cxx:25: error: expected `}' at end of input driver.cxx:25: error: expected unqualified-id at end of input driver.cxx:25: error: expected `}' at end of input /usr/include/xsd/cxx/tree/elements.hxx: In destructor \u2018virtual xsd::cxx::tree::_type::~_type()\u2019: /usr/include/xsd/cxx/tree/elements.hxx:269: error: \u2018map_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx: In constructor \u2018xsd::cxx::tree::_type::_type()\u2019: /usr/include/xsd/cxx/tree/elements.hxx:282: error: class \u2018xsd::cxx::tree::_type\u2019 does not have any field named \u2018container_\u2019 /usr/include/xsd/cxx/tree/elements.hxx: In copy constructor \u2018xsd::cxx::tree::_type::_type(const xsd::cxx::tree::type&, xsd::cxx::tree::flags, xsd::cxx::tree::container*)\u2019: /usr/include/xsd/cxx/tree/elements.hxx:297: error: class \u2018xsd::cxx::tree::_type\u2019 does not have any field named \u2018container_\u2019 /usr/include/xsd/cxx/tree/elements.hxx:301: error: \u2018const class xsd::cxx::tree::_type\u2019 has no member named \u2018dom_info_\u2019 /usr/include/xsd/cxx/tree/elements.hxx:303: error: \u2018const class xsd::cxx::tree::_type\u2019 has no member named \u2018dom_info_\u2019 /usr/include/xsd/cxx/tree/elements.hxx:304: error: \u2018dom_info_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx: In member function \u2018const xsd::cxx::tree::container* xsd::cxx::tree::_type::_container() const\u2019: /usr/include/xsd/cxx/tree/elements.hxx:401: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx: In member function \u2018xsd::cxx::tree::container* xsd::cxx::tree::_type::_container()\u2019: /usr/include/xsd/cxx/tree/elements.hxx:414: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx: In member function \u2018virtual void xsd::cxx::tree::_type::_container(xsd::cxx::tree::container*)\u2019: /usr/include/xsd/cxx/tree/elements.hxx:426: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:430: error: \u2018map_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:434: error: \u2018map\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:434: error: expected `;' before \u2018i\u2019 /usr/include/xsd/cxx/tree/elements.hxx:435: error: \u2018i\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:435: error: \u2018e\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx: In member function \u2018const xsd::cxx::tree::container* xsd::cxx::tree::_type::_root() const\u2019: /usr/include/xsd/cxx/tree/elements.hxx:454: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:456: error: \u2018const class xsd::cxx::tree::_type\u2019 has no member named \u2018container_\u2019 /usr/include/xsd/cxx/tree/elements.hxx: In member function \u2018xsd::cxx::tree::container* xsd::cxx::tree::_type::_root()\u2019: /usr/include/xsd/cxx/tree/elements.hxx:471: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:473: error: \u2018class xsd::cxx::tree::_type\u2019 has no member named \u2018container_\u2019 /usr/include/xsd/cxx/tree/elements.hxx: In member function \u2018void xsd::cxx::tree::_type::_node(int)\u2019: /usr/include/xsd/cxx/tree/elements.hxx:540: error: \u2018n\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:542: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:544: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:548: error: no matching function for call to \u2018xsd::cxx::tree::_type::_node()\u2019 /usr/include/xsd/cxx/tree/elements.hxx:538: note: candidates are: void xsd::cxx::tree::_type::_node(int) /usr/include/xsd/cxx/tree/elements.hxx:549: error: no matching function for call to \u2018xsd::cxx::tree::_type::_node()\u2019 /usr/include/xsd/cxx/tree/elements.hxx:538: note: candidates are: void xsd::cxx::tree::_type::_node(int) /usr/include/xsd/cxx/tree/elements.hxx:554: error: \u2018dom_info_factory\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:555: error: expected type-specifier before \u2018xercesc\u2019 /usr/include/xsd/cxx/tree/elements.hxx:555: error: expected `>' before \u2018xercesc\u2019 /usr/include/xsd/cxx/tree/elements.hxx:555: error: expected `(' before \u2018xercesc\u2019 /usr/include/xsd/cxx/tree/elements.hxx:555: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:555: error: expected primary-expression before \u2018>\u2019 token /usr/include/xsd/cxx/tree/elements.hxx:557: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:559: error: \u2018dom_info_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:562: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:566: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:567: error: no matching function for call to \u2018xsd::cxx::tree::_type::_node()\u2019 /usr/include/xsd/cxx/tree/elements.hxx:538: note: candidates are: void xsd::cxx::tree::_type::_node(int) /usr/include/xsd/cxx/tree/elements.hxx:568: error: no matching function for call to \u2018xsd::cxx::tree::_type::_node()\u2019 /usr/include/xsd/cxx/tree/elements.hxx:538: note: candidates are: void xsd::cxx::tree::_type::_node(int) /usr/include/xsd/cxx/tree/elements.hxx:572: error: \u2018dom_info_factory\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:573: error: expected type-specifier before \u2018xercesc\u2019 /usr/include/xsd/cxx/tree/elements.hxx:573: error: expected `>' before \u2018xercesc\u2019 /usr/include/xsd/cxx/tree/elements.hxx:573: error: expected `(' before \u2018xercesc\u2019 /usr/include/xsd/cxx/tree/elements.hxx:573: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:573: error: expected primary-expression before \u2018>\u2019 token /usr/include/xsd/cxx/tree/elements.hxx:576: error: \u2018dom_info_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx: In member function \u2018void xsd::cxx::tree::_type::_register_id(const xsd::cxx::tree::identity&, xsd::cxx::tree::type*)\u2019: /usr/include/xsd/cxx/tree/elements.hxx:592: error: \u2018map_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:593: error: expected type-specifier before \u2018map\u2019 /usr/include/xsd/cxx/tree/elements.hxx:593: error: expected `)' before \u2018map\u2019 /usr/include/xsd/cxx/tree/elements.hxx:599: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:602: error: \u2018map_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx: In member function \u2018void xsd::cxx::tree::_type::_unregister_id(const xsd::cxx::tree::identity&)\u2019: /usr/include/xsd/cxx/tree/elements.hxx:623: error: \u2018map_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:625: error: \u2018map\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:625: error: expected `;' before \u2018it\u2019 /usr/include/xsd/cxx/tree/elements.hxx:627: error: \u2018it\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:631: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx: In member function \u2018xsd::cxx::tree::type* xsd::cxx::tree::_type::_lookup_id(const xsd::cxx::tree::identity&) const\u2019: /usr/include/xsd/cxx/tree/elements.hxx:644: error: \u2018map_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:646: error: \u2018map\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:646: error: expected `;' before \u2018it\u2019 /usr/include/xsd/cxx/tree/elements.hxx:648: error: \u2018it\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx: At global scope: /usr/include/xsd/cxx/tree/elements.hxx:669: error: expected unqualified-id at end of input /usr/include/xsd/cxx/tree/elements.hxx:669: error: expected `}' at end of input /usr/include/xsd/cxx/tree/elements.hxx:669: error: expected `}' at end of input /usr/include/xsd/cxx/tree/elements.hxx:669: error: expected `}' at end of input In file included from hello.hxx:59, from hello.cxx:41: /usr/include/xsd/cxx/tree/elements.hxx:27:35: error: xercesc/dom/DOMNode.hpp: No such file or directory /usr/include/xsd/cxx/tree/elements.hxx:28:35: error: xercesc/dom/DOMAttr.hpp: No such file or directory /usr/include/xsd/cxx/tree/elements.hxx:29:38: error: xercesc/dom/DOMElement.hpp: No such file or directory /usr/include/xsd/cxx/tree/elements.hxx:30:39: error: xercesc/dom/DOMDocument.hpp: No such file or directory /usr/include/xsd/cxx/tree/elements.hxx:31:43: error: xercesc/dom/DOMNamedNodeMap.hpp: No such file or directory In file included from /usr/include/xsd/cxx/tree/elements.hxx:33, from hello.hxx:59, from hello.cxx:41: /usr/include/xsd/cxx/xml/elements.hxx:11:42: error: xercesc/util/PlatformUtils.hpp: No such file or directory In file included from /usr/include/xsd/cxx/tree/elements.hxx:1324, from hello.hxx:59, from hello.cxx:41: /usr/include/xsd/cxx/tree/elements.txx:6:39: error: xercesc/util/XMLUniDefs.hpp: No such file or directory In file included from /usr/include/xsd/cxx/tree/types.hxx:3786, from hello.hxx:60, from hello.cxx:41: /usr/include/xsd/cxx/tree/types.txx:6:35: error: xercesc/util/Base64.hpp: No such file or directory /usr/include/xsd/cxx/tree/types.txx:7:38: error: xercesc/util/XMLString.hpp: No such file or directory /usr/include/xsd/cxx/tree/types.txx:8:42: error: xercesc/util/XercesVersion.hpp: No such file or directory In file included from /usr/include/xsd/cxx/tree/types.txx:12, from /usr/include/xsd/cxx/tree/types.hxx:3786, from hello.hxx:60, from hello.cxx:41: /usr/include/xsd/cxx/xml/std-memory-manager.hxx:10:47: error: xercesc/framework/MemoryManager.hpp: No such file or directory In file included from /usr/include/xsd/cxx/tree/parsing.txx:10, from /usr/include/xsd/cxx/tree/parsing.hxx:9, from hello.hxx:66, from hello.cxx:41: /usr/include/xsd/cxx/xml/string.hxx:12:48: error: xercesc/util/XercesDefs.hpp: No such file or directory In file included from /usr/include/xsd/cxx/tree/text.hxx:28, from /usr/include/xsd/cxx/tree/parsing.txx:19, from /usr/include/xsd/cxx/tree/parsing.hxx:9, from hello.hxx:66, from hello.cxx:41: /usr/include/xsd/cxx/tree/text.txx:6:35: error: xercesc/dom/DOMText.hpp: No such file or directory In file included from hello.cxx:41: hello.hxx:308:39: error: xercesc/sax/InputSource.hpp: No such file or directory hello.hxx:310:43: error: xercesc/dom/DOMErrorHandler.hpp: No such file or directory In file included from /usr/include/xsd/cxx/xml/dom/parsing-source.hxx:131, from hello.cxx:89: /usr/include/xsd/cxx/xml/dom/parsing-source.txx:9:40: error: xercesc/dom/DOMBuilder.hpp: No such file or directory /usr/include/xsd/cxx/xml/dom/parsing-source.txx:12:45: error: xercesc/dom/DOMImplementation.hpp: No such file or directory /usr/include/xsd/cxx/xml/dom/parsing-source.txx:13:53: error: xercesc/dom/DOMImplementationRegistry.hpp: No such file or directory /usr/include/xsd/cxx/xml/dom/parsing-source.txx:15:55: error: xercesc/util/XMLUni.hpp: No such file or directory /usr/include/xsd/cxx/xml/dom/parsing-source.txx:18:53: error: xercesc/framework/Wrapper4InputSource.hpp: No such file or directory In file included from /usr/include/xsd/cxx/xml/dom/parsing-source.txx:21, from /usr/include/xsd/cxx/xml/dom/parsing-source.hxx:131, from hello.cxx:89: /usr/include/xsd/cxx/xml/dom/bits/error-handler-proxy.hxx:9:36: error: xercesc/dom/DOMError.hpp: No such file or directory /usr/include/xsd/cxx/xml/dom/bits/error-handler-proxy.hxx:10:38: error: xercesc/dom/DOMLocator.hpp: No such file or directory In file included from hello.cxx:186: /usr/include/xsd/cxx/xml/sax/std-input-source.hxx:14:43: error: xercesc/util/BinInputStream.hpp: No such file or directory /usr/include/xsd/cxx/xml/elements.hxx: In function \u2018void xsd::cxx::xml::initialize()\u2019: /usr/include/xsd/cxx/xml/elements.hxx:80: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/xml/elements.hxx: In function \u2018void xsd::cxx::xml::terminate()\u2019: /usr/include/xsd/cxx/xml/elements.hxx:86: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx: At global scope: /usr/include/xsd/cxx/tree/elements.hxx:194: error: \u2018XMLCh\u2019 does not name a type /usr/include/xsd/cxx/tree/elements.hxx:346: error: expected \u2018,\u2019 or \u2018...\u2019 before \u2018::\u2019 token /usr/include/xsd/cxx/tree/elements.hxx:356: error: expected \u2018,\u2019 or \u2018...\u2019 before \u2018::\u2019 token /usr/include/xsd/cxx/tree/elements.hxx:356: error: \u2018xsd::cxx::tree::_type::_type(int)\u2019 cannot be overloaded /usr/include/xsd/cxx/tree/elements.hxx:346: error: with \u2018xsd::cxx::tree::_type::_type(int)\u2019 /usr/include/xsd/cxx/tree/elements.hxx:369: error: expected \u2018,\u2019 or \u2018...\u2019 before \u2018::\u2019 token /usr/include/xsd/cxx/tree/elements.hxx:488: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:488: error: expected \u2018;\u2019 before \u2018*\u2019 token /usr/include/xsd/cxx/tree/elements.hxx:500: error: expected `;' before \u2018xercesc\u2019 /usr/include/xsd/cxx/tree/elements.hxx:500: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:500: error: expected \u2018;\u2019 before \u2018*\u2019 token /usr/include/xsd/cxx/tree/elements.hxx:510: error: expected `;' before \u2018class\u2019 /usr/include/xsd/cxx/tree/elements.hxx:538: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:538: error: expected \u2018,\u2019 or \u2018...\u2019 before \u2018*\u2019 token /usr/include/xsd/cxx/tree/elements.hxx:674: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:674: error: \u2018DOMNode\u2019 declared as a \u2018virtual\u2019 field /usr/include/xsd/cxx/tree/elements.hxx:674: error: expected \u2018;\u2019 before \u2018*\u2019 token /usr/include/xsd/cxx/tree/elements.hxx:687: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:687: error: expected `)' before \u2018&\u2019 token hello.cxx:461: error: expected `}' at end of input hello.cxx:461: error: expected unqualified-id at end of input hello.cxx:461: error: expected `}' at end of input /usr/include/xsd/cxx/tree/elements.hxx: In destructor \u2018virtual xsd::cxx::tree::_type::~_type()\u2019: /usr/include/xsd/cxx/tree/elements.hxx:269: error: \u2018map_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx: In constructor \u2018xsd::cxx::tree::_type::_type()\u2019: /usr/include/xsd/cxx/tree/elements.hxx:282: error: class \u2018xsd::cxx::tree::_type\u2019 does not have any field named \u2018container_\u2019 /usr/include/xsd/cxx/tree/elements.hxx: In copy constructor \u2018xsd::cxx::tree::_type::_type(const xsd::cxx::tree::type&, xsd::cxx::tree::flags, xsd::cxx::tree::container*)\u2019: /usr/include/xsd/cxx/tree/elements.hxx:297: error: class \u2018xsd::cxx::tree::_type\u2019 does not have any field named \u2018container_\u2019 /usr/include/xsd/cxx/tree/elements.hxx:301: error: \u2018const class xsd::cxx::tree::_type\u2019 has no member named \u2018dom_info_\u2019 /usr/include/xsd/cxx/tree/elements.hxx:303: error: \u2018const class xsd::cxx::tree::_type\u2019 has no member named \u2018dom_info_\u2019 /usr/include/xsd/cxx/tree/elements.hxx:304: error: \u2018dom_info_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx: In member function \u2018const xsd::cxx::tree::container* xsd::cxx::tree::_type::_container() const\u2019: /usr/include/xsd/cxx/tree/elements.hxx:401: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx: In member function \u2018xsd::cxx::tree::container* xsd::cxx::tree::_type::_container()\u2019: /usr/include/xsd/cxx/tree/elements.hxx:414: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx: In member function \u2018virtual void xsd::cxx::tree::_type::_container(xsd::cxx::tree::container*)\u2019: /usr/include/xsd/cxx/tree/elements.hxx:426: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:430: error: \u2018map_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:434: error: \u2018map\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:434: error: expected `;' before \u2018i\u2019 /usr/include/xsd/cxx/tree/elements.hxx:435: error: \u2018i\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:435: error: \u2018e\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx: In member function \u2018const xsd::cxx::tree::container* xsd::cxx::tree::_type::_root() const\u2019: /usr/include/xsd/cxx/tree/elements.hxx:454: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:456: error: \u2018const class xsd::cxx::tree::_type\u2019 has no member named \u2018container_\u2019 /usr/include/xsd/cxx/tree/elements.hxx: In member function \u2018xsd::cxx::tree::container* xsd::cxx::tree::_type::_root()\u2019: /usr/include/xsd/cxx/tree/elements.hxx:471: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:473: error: \u2018class xsd::cxx::tree::_type\u2019 has no member named \u2018container_\u2019 /usr/include/xsd/cxx/tree/elements.hxx: In member function \u2018void xsd::cxx::tree::_type::_node(int)\u2019: /usr/include/xsd/cxx/tree/elements.hxx:540: error: \u2018n\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:542: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:544: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:548: error: no matching function for call to \u2018xsd::cxx::tree::_type::_node()\u2019 /usr/include/xsd/cxx/tree/elements.hxx:538: note: candidates are: void xsd::cxx::tree::_type::_node(int) /usr/include/xsd/cxx/tree/elements.hxx:549: error: no matching function for call to \u2018xsd::cxx::tree::_type::_node()\u2019 /usr/include/xsd/cxx/tree/elements.hxx:538: note: candidates are: void xsd::cxx::tree::_type::_node(int) /usr/include/xsd/cxx/tree/elements.hxx:554: error: \u2018dom_info_factory\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:555: error: expected type-specifier before \u2018xercesc\u2019 /usr/include/xsd/cxx/tree/elements.hxx:555: error: expected `>' before \u2018xercesc\u2019 /usr/include/xsd/cxx/tree/elements.hxx:555: error: expected `(' before \u2018xercesc\u2019 /usr/include/xsd/cxx/tree/elements.hxx:555: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:555: error: expected primary-expression before \u2018>\u2019 token /usr/include/xsd/cxx/tree/elements.hxx:557: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:559: error: \u2018dom_info_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:562: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:566: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:567: error: no matching function for call to \u2018xsd::cxx::tree::_type::_node()\u2019 /usr/include/xsd/cxx/tree/elements.hxx:538: note: candidates are: void xsd::cxx::tree::_type::_node(int) /usr/include/xsd/cxx/tree/elements.hxx:568: error: no matching function for call to \u2018xsd::cxx::tree::_type::_node()\u2019 /usr/include/xsd/cxx/tree/elements.hxx:538: note: candidates are: void xsd::cxx::tree::_type::_node(int) /usr/include/xsd/cxx/tree/elements.hxx:572: error: \u2018dom_info_factory\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:573: error: expected type-specifier before \u2018xercesc\u2019 /usr/include/xsd/cxx/tree/elements.hxx:573: error: expected `>' before \u2018xercesc\u2019 /usr/include/xsd/cxx/tree/elements.hxx:573: error: expected `(' before \u2018xercesc\u2019 /usr/include/xsd/cxx/tree/elements.hxx:573: error: \u2018xercesc\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:573: error: expected primary-expression before \u2018>\u2019 token /usr/include/xsd/cxx/tree/elements.hxx:576: error: \u2018dom_info_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx: In member function \u2018void xsd::cxx::tree::_type::_register_id(const xsd::cxx::tree::identity&, xsd::cxx::tree::type*)\u2019: /usr/include/xsd/cxx/tree/elements.hxx:592: error: \u2018map_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:593: error: expected type-specifier before \u2018map\u2019 /usr/include/xsd/cxx/tree/elements.hxx:593: error: expected `)' before \u2018map\u2019 /usr/include/xsd/cxx/tree/elements.hxx:599: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:602: error: \u2018map_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx: In member function \u2018void xsd::cxx::tree::_type::_unregister_id(const xsd::cxx::tree::identity&)\u2019: /usr/include/xsd/cxx/tree/elements.hxx:623: error: \u2018map_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:625: error: \u2018map\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:625: error: expected `;' before \u2018it\u2019 /usr/include/xsd/cxx/tree/elements.hxx:627: error: \u2018it\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:631: error: \u2018container_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx: In member function \u2018xsd::cxx::tree::type* xsd::cxx::tree::_type::_lookup_id(const xsd::cxx::tree::identity&) const\u2019: /usr/include/xsd/cxx/tree/elements.hxx:644: error: \u2018map_\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx:646: error: \u2018map\u2019 has not been declared /usr/include/xsd/cxx/tree/elements.hxx:646: error: expected `;' before \u2018it\u2019 /usr/include/xsd/cxx/tree/elements.hxx:648: error: \u2018it\u2019 was not declared in this scope /usr/include/xsd/cxx/tree/elements.hxx: At global scope: /usr/include/xsd/cxx/tree/elements.hxx:669: error: expected unqualified-id at end of input /usr/include/xsd/cxx/tree/elements.hxx:669: error: expected `}' at end of input /usr/include/xsd/cxx/tree/elements.hxx:669: error: expected `}' at end of input /usr/include/xsd/cxx/tree/elements.hxx:669: error: expected `}' at end of input [abhisheks@testlab2 abhi]$ From boris at codesynthesis.com Tue Feb 19 13:33:31 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] xercesc headers not found In-Reply-To: <40BD4764AF464F76BF9338826E731014@abhisheksoni> References: <40BD4764AF464F76BF9338826E731014@abhisheksoni> Message-ID: <20080219183331.GA20634@karelia> Hi Abhishek, In the future please use a descriptive subject in your posts to the mailing lists. An email with empty subject has a very good chance of being ignored. Abhishek soni writes: > /usr/include/xsd/cxx/tree/elements.hxx:27:35: error: xercesc/dom/DOMNode.hpp: No such file or directory The generated code uses Xerces-C++ library as the underlying XML parser. You will need to install it before you can compile the generated code. Seeing that you are using RedHat Linux, I suggest that you search your RPM repository for the Xerces-C++ package. Alternatively, you can download a precompiled binary from the Xerces-C++ website: http://xerces.apache.org/xerces-c/download.cgi If you decide to use a precompiled binary instead of the package, make sure you use the -I and -L compiler options to point to the directory where you have installed Xerces-C++. I however, suggest that you go with the .rpm package since it is much more straightforward. Boris From sbalasub at qualcomm.com Tue Feb 19 17:22:56 2008 From: sbalasub at qualcomm.com (Balasubramanyam, Shivakumar) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Q on Binary Serialization Message-ID: Hi, I have a question for folks using XSD with custom binary serializers. Have you seen a need for defining types in XSD that would be serialized in bits over the wire? For example, let's say I have a userid that would represent 20 bits in the wire format. I was thinking, I could define xsd data type called bits which would have length as the wire format. So here are two questions, 1. Anyone else trying to write a serializer that supports bit level packing? 2. Any generic XSD datatypes to represent the same? I was thinking of using the boost libraries in conjunction with the XSD/Code Synthesis to achieve this http://www.boost.org/libs/dynamic_bitset/dynamic_bitset.html This would allow us to define all protocol messages in XSD and generate code for serialization. Thanks, Shiva From uri at hyperroll.com Wed Feb 20 03:03:35 2008 From: uri at hyperroll.com (Uri Karagila) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Warning 6005 In-Reply-To: <20080219100423.GA19833@karelia> Message-ID: <783879783B65E44995520FEF376C4538398C0E@ilexch1.int.hyperroll.com> So, can you send us a patched version of that file, so we can work with less warnings on all platforms? Uri -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Tuesday, February 19, 2008 12:04 PM To: Uri Karagila Cc: xsd-users@codesynthesis.com Subject: Re: [xsd-users] Warning 6005 Hi Uri, Uri Karagila writes: > With the following code (note the new comments, and the removed line): > _type (const type& x, flags/* f*/ = 0, container* c = 0) This fix will break the doxygen comment that documents this copy c-tor. The proper fix (which will be in the next release) is to move the body of this c-tor out of the class definition. Boris From boris at codesynthesis.com Wed Feb 20 03:09:16 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Warning 6005 In-Reply-To: <783879783B65E44995520FEF376C4538398C0E@ilexch1.int.hyperroll.com> References: <20080219100423.GA19833@karelia> <783879783B65E44995520FEF376C4538398C0E@ilexch1.int.hyperroll.com> Message-ID: <20080220080916.GD22787@karelia> Hi Uri, Uri Karagila writes: > So, can you send us a patched version of that file, so we can work with > less warnings on all platforms? Sure, here is the patch: http://www.codesynthesis.com/~boris/tmp/xsd-3.1.0-W6005.patch Boris From sbalasub at qualcomm.com Wed Feb 20 12:54:30 2008 From: sbalasub at qualcomm.com (Balasubramanyam, Shivakumar) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Performance of XML versus XDR Message-ID: Hi, Is there any test results and/or test suite for code synthesis performance for XML/XDR serialization? Thanks, Shiva From boris at codesynthesis.com Wed Feb 20 13:24:36 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Performance of XML versus XDR In-Reply-To: References: Message-ID: <20080220182436.GA24635@karelia> Hi Shiva, Balasubramanyam, Shivakumar writes: > Is there any test results and/or test suite for code synthesis > performance for XML/XDR serialization? We did some testing for a client with the XDR being about 10 times faster than XML parsing on the sample data set. The result, however, will vary depending on the vocabulary. That is, the difference will be greater if your XML contains mostly numerical data with a lot of markup. I can send you the test we use internally if you would like. Boris From sbalasub at qualcomm.com Wed Feb 20 13:42:35 2008 From: sbalasub at qualcomm.com (Balasubramanyam, Shivakumar) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Performance of XML versus XDR In-Reply-To: <20080220182436.GA24635@karelia> References: <20080220182436.GA24635@karelia> Message-ID: Boris, Thanks for heads up. Sure, I will appreciate if you could share any tests. Shiva -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Wednesday, February 20, 2008 10:25 AM To: Balasubramanyam, Shivakumar Cc: xsd-users@codesynthesis.com Subject: Re: [xsd-users] Performance of XML versus XDR Hi Shiva, Balasubramanyam, Shivakumar writes: > Is there any test results and/or test suite for code synthesis > performance for XML/XDR serialization? We did some testing for a client with the XDR being about 10 times faster than XML parsing on the sample data set. The result, however, will vary depending on the vocabulary. That is, the difference will be greater if your XML contains mostly numerical data with a lot of markup. I can send you the test we use internally if you would like. Boris From boris at codesynthesis.com Wed Feb 20 13:34:21 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Q on Binary Serialization In-Reply-To: References: Message-ID: <20080220183421.GB24635@karelia> Hi Shiva, Balasubramanyam, Shivakumar writes: > For example, let's say I have a userid that would represent 20 bits in > the wire format. I was thinking, I could define xsd data type called > bits which would have length as the wire format. > > 2. Any generic XSD datatypes to represent the same? There are no XML Schema types that represent bit sets (it would be a somewhat unnatural type for text-based XML). The closest you can get is by using base64Binary or hexBinary though for smaller bit sets it would probably be more economical to use byte, short, int, or long. Once you derive a type from base64Binary or hexBinary, you can use type customization to completely override XML and/or binary parsing and serialization code for this type which allows you to choose pretty much any over-the-wire representation you like. Boris From rlischner at proteus-technologies.com Wed Feb 20 15:15:16 2008 From: rlischner at proteus-technologies.com (Ray Lischner) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Q on Binary Serialization References: Message-ID: ASN.1 PER is a standard, highly packed, binary representation that would work well with Code Synthesis. I haven't implemented it, but I have implemented ASN.1 DER, which is less densely packed. It worked well, but in the end, we decided to use a custom format that falls somewhere in between DER and PER--trying to balance bandwidth and encoding/decoding time. I don't know of any open-source implementations of ASN.1 PER, but I haven't looked hard. There are a couple commercial implementations you could use. Ray Lischner, Senior Member of Technical Staff 133 National Business Pkwy, Ste 150 t. 443.539.3448 Annapolis Junction, MD 20701 c. 301.377.7390 rlischner@proteus-technologies.com f. 443.539.3370 This electronic message and any files transmitted with it contain information which may be privileged and/or proprietary. The information is intended for use solely by the intended recipient(s). If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of this information is prohibited. If you have received this electronic message in error, please advise the sender by reply email or by telephone (443.539.3400) and delete the message. ________________________________ From: xsd-users-bounces@codesynthesis.com on behalf of Balasubramanyam, Shivakumar Sent: Tue 2/19/2008 5:22 PM To: xsd-users@codesynthesis.com Subject: [xsd-users] Q on Binary Serialization Hi, I have a question for folks using XSD with custom binary serializers. Have you seen a need for defining types in XSD that would be serialized in bits over the wire? For example, let's say I have a userid that would represent 20 bits in the wire format. I was thinking, I could define xsd data type called bits which would have length as the wire format. So here are two questions, 1. Anyone else trying to write a serializer that supports bit level packing? 2. Any generic XSD datatypes to represent the same? I was thinking of using the boost libraries in conjunction with the XSD/Code Synthesis to achieve this http://www.boost.org/libs/dynamic_bitset/dynamic_bitset.html This would allow us to define all protocol messages in XSD and generate code for serialization. Thanks, Shiva From boris at codesynthesis.com Wed Feb 20 15:15:55 2008 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:01 2009 Subject: [xsd-users] Performance of XML versus XDR In-Reply-To: References: <20080220182436.GA24635@karelia> Message-ID: <20080220201555.GE24635@karelia> Hi Shiva, Balasubramanyam, Shivakumar writes: > Thanks for heads up. Sure, I will appreciate if you could share any > tests. You can get the test here: http://www.codesynthesis.com/~boris/tmp/perftest.tar.gz I cleaned it up a bit but still keep in mind that it is our internal test and is provided "as-is". In particular, check (and adjust) the source code of each test before making any interpretations of the results. For instance, the xml test only measures the DOM-to-object model stage. You can generate a sample file of a different size with the gen.cxx program. Boris