From andy.ward at hevday.com Tue May 2 01:49:06 2006 From: andy.ward at hevday.com (Andrew Ward) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Class generated with sequence cardinality Message-ID: <4456F2D2.4040608@hevday.com> Hello, Given the following schema: And using the command: xsd cxx-tree hello.xsd I get element X::S being generated with sequence cardinality, when I would have thought it should have been generated with optional cardinality. This is what is generated: class X { ... // S // public: struct S { typedef ::xml_schema::string type; typedef ::xsd::cxx::tree::traits< type > traits; typedef ::xsd::cxx::tree::sequence< type > container; typedef container::iterator iterator; typedef container::const_iterator const_iterator; }; Am I right in my assumption? Regards, Andrew Ward. From boris at codesynthesis.com Tue May 2 07:54:52 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] xsd 2.1.1 released Message-ID: <20060502115452.GA17388@karelia> Good day, We've released xsd 2.1.1. This is a maintenance release which means that there are no significant user-visible changes. The NEWS file entries for this version are as follows: C++/Tree * New option, --namespace-map, allows direct mapping of XML Schema namespaces to C++ namespaces without the use of regular expressions. * Further optimizations in the container code and enum mapping to reduce generated code size. * Number of bug fixes in the generated code. C++/Parser * New option, --namespace-map, allows direct mapping of XML Schema namespaces to C++ namespaces without the use of regular expressions. With this version we also added support for GNU g++ 4.1.x. Thanks to the following individuals for reporting bugs and/or suggesting fixes and improvements: Andrew Ward Precompiled binary distributions for various platforms are available from the product's download page: http://codesynthesis.com/products/xsd/download.xhtml Source code for this release is available from the project's web page: http://codesynthesis.com/projects/xsd/ SHA1 checksums for the files: 4cc3a0424de05af4237b536f1436097791cfbcc8 xsd-2.1.1.tar.bz2 44a0856212474ba7395531823923384f87ca2b21 xsd_2.1.1-1_i386.deb e9a076442a5f34652ca277bb1f35adc1a5036702 xsd-2.1.1-1.i686.rpm 75f481dd2db81bd7161233747b53bf30656763ff xsd-2.1.1-i686-linux-gnu.tar.bz2 2f8337955ba9df2c5591a83687619e27163a770d xsd_2.1.1-1_amd64.deb 717edebc0833034ce79c6b6feb7b75e7223f9358 xsd-2.1.1-1.x86_64.rpm 6b877411e6adc54a14c373e4418744600d582fd7 xsd-2.1.1-x86_64-linux-gnu.tar.bz2 98ee3d8a99d3464ceb57c1c276df53afc4575963 xsd-2.1.1-hppa-hpux.tar.gz 84f7c1bbf7ef4e9885790a979a2f6ad2aa3b50ce xsd-2.1.1-hppa-hpux.tar.bz2 daede7981fbbfda10e2dc9671d9b439427ea45fd xsd-2.1.1-powerpc-macosx.tar.bz2 f3bd710784a5ba87c4c6ffc077b92848a868cef9 xsd-2.1.1-sparc-solaris.tar.gz 6ac44e3b52d44aebe372aa8b99622eb3d318bfb7 xsd-2.1.1-sparc-solaris.tar.bz2 f16eb9231e1dbe5e838c8edffef1d805edb3b7d3 xsd-2.1.1-i686-windows.zip have fun, -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/20060502/f4edf959/attachment.pgp From boris at codesynthesis.com Tue May 2 08:45:36 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Class generated with sequence cardinality In-Reply-To: <4456F2D2.4040608@hevday.com> References: <4456F2D2.4040608@hevday.com> Message-ID: <20060502124536.GB17521@karelia> Hi Andrew, Andrew Ward writes: > Given the following schema: > > ... > > > I get element X::S being generated with sequence cardinality, when I > would have thought it should have been generated with optional > cardinality. This is a bug. We've fixed it in 2.1.1 (along with the other bug you reported) which was released a few minutes ago. Thanks for reporting this and we really appreciate the minimal test cases you've been providing. Please let me know if you have any problems with 2.1.1. thanks, -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/20060502/f5acffd8/attachment.pgp From Ricky_H_Linh at raytheon.com Wed May 3 14:30:46 2006 From: Ricky_H_Linh at raytheon.com (Ricky H Linh) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Serialization to XML Message-ID: Hi All, I am looking for an example of how to use Serialization to XML. I am working with a large data which can't all fit in memory. ie: I am streaming in data from a file, processing the data and want to write the processed data out into xml. Is the data have to be all in memory before I can Serialize to file? Thanks for any help, -ricky -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codesynthesis.com/pipermail/xsd-users/attachments/20060503/e2a84a93/attachment.htm From boris at codesynthesis.com Wed May 3 15:01:37 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Serialization to XML In-Reply-To: References: Message-ID: <20060503190137.GA21291@karelia> Hi Ricky, Ricky H Linh writes: > I am looking for an example of how to use Serialization to XML. I am > working with a large data which can't all fit in memory. > ie: I am streaming in data from a file, processing the data and want to > write the processed data out into xml. > > Is the data have to be all in memory before I can Serialize to file? Hm, serialization is only supported in the C++/Tree mapping at the moment and it does require the whole document to be in memory before serialization can start. BTW, are you using the C++/Parser to read in the input data or is it not XML? One way to work around this would be to serialize a portion of processed data into an in-memory buffer and then append it to the output file. Let me know if you would like an example on how to do this. hth, -boris P.S. Just curious: did you have a chance to try the generated code on AIX with XL C++? -------------- 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/20060503/cfebe10c/attachment.pgp From Ricky_H_Linh at RAYTHEON.COM Wed May 3 15:44:59 2006 From: Ricky_H_Linh at RAYTHEON.COM (Ricky H Linh) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Serialization to XML In-Reply-To: <20060503190137.GA21291@karelia> Message-ID: Hi Boris, Thanks for the quick respond. The data I am streaming in is not in XML format. Only the processed data that will output in XML. If you don't mind, I would like to see an example of the work around. As for the AIX, I did not have the platform to try the generated code on yet. Our admin still try to put thing together. Thanks again, -ricky Boris Kolpackov 05/03/2006 12:01 PM To Ricky H Linh cc xsd-users Subject Re: [xsd-users] Serialization to XML Hi Ricky, Ricky H Linh writes: > I am looking for an example of how to use Serialization to XML. I am > working with a large data which can't all fit in memory. > ie: I am streaming in data from a file, processing the data and want to > write the processed data out into xml. > > Is the data have to be all in memory before I can Serialize to file? Hm, serialization is only supported in the C++/Tree mapping at the moment and it does require the whole document to be in memory before serialization can start. BTW, are you using the C++/Parser to read in the input data or is it not XML? One way to work around this would be to serialize a portion of processed data into an in-memory buffer and then append it to the output file. Let me know if you would like an example on how to do this. hth, -boris P.S. Just curious: did you have a chance to try the generated code on AIX with XL C++? [attachment "signature.asc" deleted by Ricky H Linh/US/Raytheon] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codesynthesis.com/pipermail/xsd-users/attachments/20060503/c6ad39a4/attachment.htm From boris at codesynthesis.com Wed May 3 16:47:49 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Serialization to XML In-Reply-To: References: <20060503190137.GA21291@karelia> Message-ID: <20060503204749.GA21552@karelia> Hi Ricky, Ricky H Linh writes: > If you don't mind, I would like to see an example of the work around. Ok, suppose you have the following schema: Here I assume that you generate one Record at a time and you generate a lot of them so that constructing the whole tree in-memory is not an option. Below is a test program that generates 1K records into a file, one at a time. As you can see, there is some wrestling with DOM in order to get rid of the XML declaration () when we serialize individual records: #include #include "test.hxx" using std::endl; int main () { std::ofstream ofs ("out.xml"); // We will need to create XML declaration as well as open and close // the root tag ourselves. // ofs << "" << endl << "" << endl; xercesc::XMLPlatformUtils::Initialize (); for (unsigned long i (1); i < 1000; ++i) { // Create the next record. // Record r ("data"); using namespace xercesc; namespace xml = xsd::cxx::xml; // Create a DOM document. // xml_schema::namespace_infomap map; xml::dom::auto_ptr doc ( xml::dom::serialize ("record", "", map)); // Serialize the record to DOM. // record (*doc, r); // Serialize (append) DOM to file. // DOMImplementation* impl ( DOMImplementationRegistry::getDOMImplementation ( xml::string ("LS").c_str ())); xml::dom::auto_ptr writer (impl->createDOMWriter ()); writer->setEncoding(xml::string ("UTF-8").c_str ()); writer->setFeature (XMLUni::fgDOMWRTDiscardDefaultContent, true); writer->setFeature (XMLUni::fgDOMWRTFormatPrettyPrint, true); writer->setFeature (XMLUni::fgDOMXMLDeclaration, false); xml::dom::ostream_format_target oft (ofs); writer->writeNode (&oft, *doc); } xercesc::XMLPlatformUtils::Terminate (); ofs << "" << endl; } Also note that there is no serialization to temporary in-memory buffer, things go directly into the file. I think this technique could be generally useful so I am planning to support it in the next version by adding the no_xml_declaration flag. With this flag, the code above will become: #include #include "test.hxx" using std::endl; int main () { std::ofstream ofs ("out.xml"); // We will need to create XML declaration as well as open and close // the root tag ourselves. // ofs << "" << endl << "" << endl; for (unsigned long i (1); i < 1000; ++i) { // Create the next record. // Record r ("data"); // Serialize (append) the record to the file. // record (ofs, r, xml_schema::no_xml_declaration); } ofs << "" << endl; } hth, -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/20060503/163fbf8d/attachment.pgp From boris at codesynthesis.com Wed May 3 16:50:48 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Serialization to XML In-Reply-To: <20060503204749.GA21552@karelia> References: <20060503190137.GA21291@karelia> <20060503204749.GA21552@karelia> Message-ID: <20060503205048.GB21552@karelia> BTW, test.xsd was compiled with the following options: xsd cxx-tree --generate-serialization --root-element-all test.xsd -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/20060503/671290a4/attachment.pgp From Ricky_H_Linh at raytheon.com Wed May 3 17:16:14 2006 From: Ricky_H_Linh at raytheon.com (Ricky H Linh) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Serialization to XML In-Reply-To: <20060503205048.GB21552@karelia> Message-ID: Thank you very much, Boris. The example is very helpful. -ricky Boris Kolpackov 05/03/2006 01:50 PM To Ricky H Linh cc xsd-users Subject Re: [xsd-users] Serialization to XML BTW, test.xsd was compiled with the following options: xsd cxx-tree --generate-serialization --root-element-all test.xsd -boris [attachment "signature.asc" deleted by Ricky H Linh/US/Raytheon] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codesynthesis.com/pipermail/xsd-users/attachments/20060503/479a6827/attachment.html From david.r.moss at selex-comm.com Fri May 5 04:29:45 2006 From: david.r.moss at selex-comm.com (Moss, David R (SELEX Comms) (UK Christchurch)) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Validation of element content against element tags Message-ID: All, In an xml file I want to define some regular expressions (in the schema they can just be string types, unless there is a way to enforce that the content is a valid regular expression - is there a regular expression for regular expressions...) and some composite expressions formed of the basic elements (probably string lists in the schema): [1-4][0-9]{2} [0-9]{5} ([9]+) thirdSequence firstSequence secondSequence The issue is in validating the composite content i.e. that elements with those names in the list exist. I'm guessing one way to do it is, once parsed into an xsd tree, to traverse the DOM node associated with the 'basic' type comparing each tag local name (firstSequence, secondSequence etc) against the items in the list. Having found a match I also want to get back to the xsd type which looks feasible from reading some of the other posts here (each element of 'basic' being of the same type basic_t) : DOMNode const* matched_basic_node = ... xml_schema::type& t ( *reinterpret_cast ( matched_basic_node->getUserData(xml_schema::tree_node_key))); basic_t& b( dynamic_cast(t) ); Is there a fundamentally different way of going about the list validation - in an ideal world the content would be validated when the xml is parsed in the first place, which I realise is unlikely due to the seemingly bespoke nature of the problem. Any help greatly appreciated. Dave Moss SELEX Communications Grange Road Christchurch Dorset BH23 4JE United Kingdom Tel: + 44 (0) 1202 404841 Email: david.r.moss@selex-comm.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codesynthesis.com/pipermail/xsd-users/attachments/20060505/0bcbcbe3/attachment.htm From boris at codesynthesis.com Fri May 5 06:54:42 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Validation of element content against element tags In-Reply-To: References: Message-ID: <20060505105442.GA25700@karelia> Hi David, Moss, David R (SELEX Comms) (UK Christchurch) writes: > In an xml file I want to define some regular expressions (in the schema > they can just be string types, unless there is a way to enforce that the > content is a valid regular expression - is there a regular expression > for regular expressions...) I've never heard of such a thing. If there is one, it must be really hard to read since virtually every character will be escaped ;-). > ... > > > > [1-4][0-9]{2} > [0-9]{5} > ([9]+) > > > > thirdSequence firstSequence secondSequence > > > > ... > > Is there a fundamentally different way of going about the list > validation - in an ideal world the content would be validated when the > xml is parsed in the first place, which I realise is unlikely due to the > seemingly bespoke nature of the problem. I think given the constrains, the approach you suggested is as good as it gets. If, however, you can change the structure a little bit to have explicit names (instead of using element names), then you can make XML Schema and XSD do all the work for you, e.g., [1-4][0-9]{2} [0-9]{5} ([9]+) thirdSequence firstSequence secondSequence The schema will look like this (it uses XSD extension to statically-type IDREFS): Then in your code you will write: CompositeType const& c = ... typedef CompositeType::compositeOne::type RefList; RefList const& rl (c.compositeOne ()); for (RefList::const_iterator i (rl.begin ()); i != rl.end (); ++i) { RegexType const& b (**i); cerr << *i << " : " << b << endl; } Prints: thirdSequence : ([9]+) firstSequence : [1-4][0-9]{2} secondSequence : [0-9]{5} You can also use enumerations to restrict the set of possible names used. hth, -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/20060505/cbf101ea/attachment.pgp From andy.ward at hevday.com Sun May 7 23:10:40 2006 From: andy.ward at hevday.com (Andrew Ward) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Erasing elements Message-ID: <445EB6B0.5070603@hevday.com> Hi, Using the hello.xsd example from the XSD website and the following code: #include #include "hello.hxx" int main() { hello_type ht("hi"); ht.name().push_back("1"); ht.name().push_back("2"); ht.name().push_back("3"); hello_type::name::iterator it(ht.name().begin()), end(ht.name().end()); while(it != end) { std::cout << "erasing " << (*it) << std::endl; it = ht.name().erase(it); if(it != end) std::cout << (*it) << " comes next" << std::endl; else std::cout << "all erased" << std::endl; } } After "3" is erased "it != end" still evaluates to true and the program crashes. Is this code valid and is there an alternative? Regards, Andrew Ward. From boris at codesynthesis.com Mon May 8 03:36:47 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Erasing elements In-Reply-To: <445EB6B0.5070603@hevday.com> References: <445EB6B0.5070603@hevday.com> Message-ID: <20060508073647.GA1083@karelia> Hi Andrew, Andrew Ward writes: > int main() > { > hello_type ht("hi"); > ht.name().push_back("1"); > ht.name().push_back("2"); > ht.name().push_back("3"); > > hello_type::name::iterator it(ht.name().begin()), end(ht.name().end()); > > while(it != end) > { > std::cout << "erasing " << (*it) << std::endl; > it = ht.name().erase(it); > if(it != end) > std::cout << (*it) << " comes next" << std::endl; > else > std::cout << "all erased" << std::endl; > } > } > > After "3" is erased "it != end" still evaluates to true and the program > crashes. Is this code valid and is there an alternative? XSD sequence containers behave like (and, in fact, are based on) std::vector (Section 2.8.3 of the manual) which does not guarantee iterator stability for the erase operation (unlike std::list). This means that you cannot cache the end position as you did above. Instead, you will need to write: while(it != ht.name().end()) { std::cout << "erasing " << (*it) << std::endl; it = ht.name().erase(it); if(it != ht.name().end()) std::cout << (*it) << " comes next" << std::endl; else std::cout << "all erased" << std::endl; } After this change, your example prints: erasing 1 2 comes next erasing 2 3 comes next erasing 3 all erased hth, -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/20060508/32a345dc/attachment.pgp From david.r.moss at selex-comm.com Mon May 8 03:48:15 2006 From: david.r.moss at selex-comm.com (Moss, David R (SELEX Comms) (UK Christchurch)) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Validation of element content against element tags In-Reply-To: <20060505105442.GA25700@karelia> Message-ID: Boris, Thanks for that - your alternative structure looks like it should work a lot better! Cheers, Dave. Dave Moss SELEX Communications Grange Road Christchurch Dorset BH23 4JE United Kingdom Tel: + 44 (0) 1202 404841 Email: david.r.moss@selex-comm.com -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: 05 May 2006 11:55 To: Moss, David R (SELEX Comms) (UK Christchurch) Cc: xsd-users@codesynthesis.com Subject: Re: [xsd-users] Validation of element content against element tags Hi David, Moss, David R (SELEX Comms) (UK Christchurch) writes: > In an xml file I want to define some regular expressions (in the schema > they can just be string types, unless there is a way to enforce that the > content is a valid regular expression - is there a regular expression > for regular expressions...) I've never heard of such a thing. If there is one, it must be really hard to read since virtually every character will be escaped ;-). > ... > > > > [1-4][0-9]{2} > [0-9]{5} > ([9]+) > > > > thirdSequence firstSequence secondSequence > > > > ... > > Is there a fundamentally different way of going about the list > validation - in an ideal world the content would be validated when the > xml is parsed in the first place, which I realise is unlikely due to the > seemingly bespoke nature of the problem. I think given the constrains, the approach you suggested is as good as it gets. If, however, you can change the structure a little bit to have explicit names (instead of using element names), then you can make XML Schema and XSD do all the work for you, e.g., [1-4][0-9]{2} [0-9]{5} ([9]+) thirdSequence firstSequence secondSequence The schema will look like this (it uses XSD extension to statically-type IDREFS): Then in your code you will write: CompositeType const& c = ... typedef CompositeType::compositeOne::type RefList; RefList const& rl (c.compositeOne ()); for (RefList::const_iterator i (rl.begin ()); i != rl.end (); ++i) { RegexType const& b (**i); cerr << *i << " : " << b << endl; } Prints: thirdSequence : ([9]+) firstSequence : [1-4][0-9]{2} secondSequence : [0-9]{5} You can also use enumerations to restrict the set of possible names used. hth, -boris From david.r.moss at selex-comm.com Thu May 11 08:19:52 2006 From: david.r.moss at selex-comm.com (Moss, David R (SELEX Comms) (UK Christchurch)) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Partial update of in-memory structures & network transfer. Message-ID: All, I'm looking for a generic way to update an in-memory structure given a (possibly very nested) sub-element of that structure. This update will be in the form of a byte array off the network (or from another file). The updates can be requests to add, remove and update elements / attributes and their content (where the schema permits it). Given the following schema (forgive the example but I couldn't cope with abstract 'item1, item2..sub-item_a' etc scenarios!): there could be a point at runtime where the in-memory model contains the following data: 5 1 1 1 2 2 2 5 Some data comes from the network that represents a new wheel (as the schema will be big, the entire document won't be retransmitted every time, plus this gives the flexibility of allowing different clients to manage different areas of the schema e.g. the chassis dept. doesn't need to know about the engine dept - they just know they exist as part of a car) : 3 3 3 Obviously this fragment isn't valid against the schema but it is constructible (as xsd allows invalid (against schema) objects using the --generate-default-ctor command). The first issue here is how to stream data to and from xsd objects - is your planned work to allow serialisation to (and from?!) compact binary formats for over-the-wire transfer something that would be able to address this? It would be nice if something like this could be done: // Get the data from the network BYTE* pCarFragment =... // Put the fragment into an xsd object - the main car object knows where a wheel lives. car_t car; pCarFragment >> car; // operator of choice, or +=, member Add( type& ) etc... Next, given that it will be possible to do something like that, it would be possible to build / update some master data record from separate sources: car_t masterCar =... car_t wheelFragment = ... car_t chassisFragment = ... masterCar += wheelFragment; masterCar += chassisFragment; This would also mean the different parts of the instance document could live in physically separate files e.g. engine.xml 5 and chassis.xml. 1 1 1 2 2 2 5 and be combined into one object when loaded. A mechanism to allow data to be removed or updated would also be required: Change the tyre pressure: 99 car_t pressureChange = ... car_t masterCar = ... masterCar.Update( pressureChange ); Instead or as well as member functions, operators could be overloaded; maybe ~= or *= for Update()? To remove some data, the member function Remove(...) or operator -= could be used. The Add / Remove / Update operations could return failure (or throw an exception) if the operation was invalid against the schema e.g. adding / updating something to an out of range value or trying to remove a mandatory element. When the in-memory validation is available it would also be possible to do bool isValid = masterCar.valid(); to check that the overall content was correct against the schema (I seem to remember reading something to this effect on this forum!). I realise this is quite a philosophical email and there probably aren't any solid answers ( other than "what?!" :-) ), but it's something to think about... Cheers, Dave. Dave Moss SELEX Communications Grange Road Christchurch Dorset BH23 4JE United Kingdom Tel: + 44 (0) 1202 404841 Email: david.r.moss@selex-comm.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codesynthesis.com/pipermail/xsd-users/attachments/20060511/17642116/attachment.html From david.r.moss at selex-comm.com Fri May 12 06:09:42 2006 From: david.r.moss at selex-comm.com (Moss, David R (SELEX Comms) (UK Christchurch)) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Reading from istream Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: main.xml Type: text/xml Size: 340 bytes Desc: main.xml Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20060512/2131ae39/main.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: main.xsd Type: application/octet-stream Size: 828 bytes Desc: main.xsd Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20060512/2131ae39/main.obj From boris at codesynthesis.com Fri May 12 07:47:55 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Reading from istream In-Reply-To: References: Message-ID: <20060512114755.GB14020@karelia> Hi David, I am still replying to your previous email. ;-) Moss, David R (SELEX Comms) (UK Christchurch) writes: > string str (" xmlns:mn=\"http://www.d_moss.com/dm_schema/main\" > xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" > xsi:schemaLocation=\"http://www.d_moss.com/dm_schema/main > main.xsd\">
88
"); > > istringstream iss( str ); > auto_ptr r( mainCfg(iss) ); > cout << *r << endl; > > outputs > > main: > item: 88 > > Is it possible to read a fragment of xml (e.g. "88") > without having to include all the namespace information? I've had a play > around with the properties:: schema_location() into the mainCfg > constructor without any success! Generated constructors that are used to create the tree from XML expect pre-parsed DOM elements, not a text representation of XML. The easiest way to achieve what you want (especially if you want the fragment to be validated) is to add a global element for the fragment into your schema: This achieves two things: (1) it makes the fragment's root element a valid document root (needed for validation) and (2) XSD will generate parsing functions for it which we can use. While you can specify the schema to be used for validation outside your fragment (see FAQ 2.4[1]), you will still need to add namespace- to-prefix mapping to your fragment since it's the only place this can be done, for example string str ( "88"); istringstream iss (str); auto_ptr r ( item (iss, /* use property for external schema, FAQ 2.4*/)); cout << *r << endl; Should print: 88 [1] http://codesynthesis.com/projects/xsd/documentation/cxx/tree/faq/#2.4 hth, -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/20060512/7ffc283e/attachment.pgp From david.r.moss at selex-comm.com Fri May 12 09:32:50 2006 From: david.r.moss at selex-comm.com (Moss, David R (SELEX Comms) (UK Christchurch)) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Reading from istream In-Reply-To: <20060512114755.GB14020@karelia> Message-ID: Boris, > From: Boris Kolpackov [mailto:boris@codesynthesis.com] > Sent: 12 May 2006 12:48 > I am still replying to your previous email. ;-) Just keeping you busy! :-) > The easiest > way to achieve what you want (especially if you want the fragment to > be validated) is to add a global element for the fragment into your > schema: Although this works, would you not end up in a situation where all types are made valid document roots just because fragment validation is required...? > While you can specify the schema to be used for validation outside > your fragment (see FAQ 2.4[1]), you will still need to add namespace- > to-prefix mapping to your fragment since it's the only place this can > be done Thanks for that - forgot to look at the FAQ! Cheers, Dave. Dave Moss SELEX Communications Grange Road Christchurch Dorset BH23 4JE United Kingdom Tel: + 44 (0) 1202 404841 Email: david.r.moss@selex-comm.com > -----Original Message----- > From: Boris Kolpackov [mailto:boris@codesynthesis.com] > Sent: 12 May 2006 12:48 > To: Moss, David R (SELEX Comms) (UK Christchurch) > Cc: xsd-users@codesynthesis.com > Subject: Re: [xsd-users] Reading from istream > > Hi David, > > I am still replying to your previous email. ;-) > > Moss, David R (SELEX Comms) (UK Christchurch) comm.com> writes: > > > string str (" > xmlns:mn=\"http://www.d_moss.com/dm_schema/main\" > > xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" > > xsi:schemaLocation=\"http://www.d_moss.com/dm_schema/main > > main.xsd\">
88
"); > > > > istringstream iss( str ); > > auto_ptr r( mainCfg(iss) ); > > cout << *r << endl; > > > > outputs > > > > main: > > item: 88 > > > > Is it possible to read a fragment of xml (e.g. "88") > > without having to include all the namespace information? I've had a play > > around with the properties:: schema_location() into the mainCfg > > constructor without any success! > > Generated constructors that are used to create the tree from XML expect > pre-parsed DOM elements, not a text representation of XML. The easiest > way to achieve what you want (especially if you want the fragment to > be validated) is to add a global element for the fragment into your > schema: > > > > This achieves two things: (1) it makes the fragment's root element > a valid document root (needed for validation) and (2) XSD will > generate parsing functions for it which we can use. > > While you can specify the schema to be used for validation outside > your fragment (see FAQ 2.4[1]), you will still need to add namespace- > to-prefix mapping to your fragment since it's the only place this can > be done, for example > > > string str ( > "88"); > > istringstream iss (str); > auto_ptr r ( > item (iss, /* use property for external schema, FAQ 2.4*/)); > cout << *r << endl; > > Should print: > > 88 > > [1] http://codesynthesis.com/projects/xsd/documentation/cxx/tree/faq/#2.4 > > hth, > -boris From boris at codesynthesis.com Fri May 12 09:57:29 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Reading from istream In-Reply-To: References: <20060512114755.GB14020@karelia> Message-ID: <20060512135729.GA14392@karelia> Hi David, Moss, David R (SELEX Comms) (UK Christchurch) writes: > > The easiest > > way to achieve what you want (especially if you want the fragment to > > be validated) is to add a global element for the fragment into your > > schema: > > Although this works, would you not end up in a situation where all types > are made valid document roots just because fragment validation is > required...? Well, to be valid, your fragment's root should be a valid document root per XML Schema. So I guess the answer is yes. You can always create a separate schema which imports the original one and defines global elements for each fragment. When we have validation in generated code, it will be possible to instantiate an instance of some type from a DOM sub-tree with validation. In that case you won't need document roots. hth, -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/20060512/80beadfe/attachment.pgp From boris at codesynthesis.com Sun May 14 04:45:31 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Partial update of in-memory structures & network transfer. In-Reply-To: References: Message-ID: <20060514084531.GA19237@karelia> Hi David, Moss, David R (SELEX Comms) (UK Christchurch) writes: > ... > > there could be a point at runtime where the in-memory model contains the > following data: > > > > 5 > > > > > 1 > 1 > 1 > > > 2 > 2 > 2 > > 5 > > > > > ... > > > > > 3 > 3 > 3 > > > > > > > The first issue here is how to stream data to and from xsd objects - is > your planned work to allow serialisation to (and from?!) compact binary > formats for over-the-wire transfer something that would be able to > address this? Yes, that's exactly the type of a situation serialization to/from a compact representation is supposed to address. The idea so far is to (optionally) generate serialization operators (to) and c-tors (from). Also they will be operator and c-tor templates in order to accommodate any stream type you want to use: class car_t { template car_t (S& is); }; temlate S& operator<< (S& os, car_t const&); Then one will only need to wrap their stream type to expose interface compatible with those expected by the generated templates. I was also planning to provide a sample implementation for the ACE CDR streams. > It would be nice if something like this could be done: > > // Get the data from the network > BYTE* pCarFragment =... > > // Put the fragment into an xsd object - the main car object knows where > // a wheel lives. > // > car_t car; > pCarFragment >> car; > That would be: car_t car = ... ACE_OuputCDR ocdr; ocdr << car; // One can extract binary representation of car from ocdr now. ACE_InputCDR icdr (ocdr); car_t car_copy (icdr); Is this something that would be useful to you? I could probably implement this in a couple of days if you are interested. > Next, given that it will be possible to do something like that, it would > be possible to build / update some master data record from separate > sources: I think what you are suggesting is some sort of a query language. The simplified version that you describes below has a few problems, biggest of which is that you assume that "the system" somehow knows which parts are new and which ones need to be updated, removed, etc (i.e., it knows, for example, that wheels are identified by the id attribute). One will need to provide such information explicitly: car_t car = ... car_t fragment = ... update u (where (eq (wheel_t::id)); u.run (car.chassis ().wheels (), fragment.chassis ().wheels ()); > A mechanism to allow data to be removed or updated would also be > required: > > Change the tyre pressure: > > > > 99 > > > > > car_t pressureChange = ... > > car_t masterCar = ... > > masterCar.Update( pressureChange ); Again, the system needs to know that wheels are identified by id's: update u (wheel_t::pressure, where (eq (wheel_t::id)); u.run (masterCar.chassis ().wheels (), pressureChange.chassis ().wheels ()); > When the in-memory validation is available it would also be possible to > do > > bool isValid = masterCar.valid(); > > to check that the overall content was correct against the schema (I seem > to remember reading something to this effect on this forum!). Right, that the plan so far. > I realise this is quite a philosophical email and there probably aren't > any solid answers ( other than "what?!" :-) ), but it's something to > think about... Yes, I've been thinking about the query language for a while now. This is, however, quite a big chunk of work and will require a lot more thinking than what I sketched above. Also, there seem to be a lot of overlap with the standard algorithms so we need to think carefully to make sure we don't reinvent the wheel here. In other words, if there is somebody who really needs it and is prepared to go through the process of working out details, trying prototypes, etc, we can go ahead and start working on this. hth, -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/20060514/44b57a5b/attachment.pgp From fcheung at kns.com Mon May 15 03:33:08 2006 From: fcheung at kns.com (Cheung, Yeung Franklin) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Ask for binary xsd run on VC++ 6.0 Message-ID: Hi, Since I don't have a .net IDE, is it possible for you to pass me the VC++6.0 version of XSD for trial? Thanks. Franklin Cheung Senior Software Engineer New Architecture Team Engineering Division Kulicke & Soffa Pte Ltd 6 Serangoon North Avenue 5 #03-16 Singapore 554910 65-6880-9455 DID -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codesynthesis.com/pipermail/xsd-users/attachments/20060515/d375b951/attachment.htm From boris at codesynthesis.com Mon May 15 03:42:53 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Ask for binary xsd run on VC++ 6.0 In-Reply-To: References: Message-ID: <20060515074253.GB21826@karelia> Hi, Cheung, Yeung Franklin writes: > Since I don't have a .net IDE, is it possible for you to pass me the > VC++6.0 version of XSD for trial? VC++ 6.0 is a very old compiler and does not conform to the C++ standard in too many ways. As a result, XSD is not supported on this compiler. You can, however, get Visual C++ 2005 Express Edition for free. It includes the C++ compiler, IDE, debugger, etc: http://msdn.microsoft.com/vstudio/express/visualc/download/ hth, -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/20060515/98e992cd/attachment.pgp From david.r.moss at selex-comm.com Mon May 15 05:36:25 2006 From: david.r.moss at selex-comm.com (Moss, David R (SELEX Comms) (UK Christchurch)) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Partial update of in-memory structures & network transfer. In-Reply-To: <20060514084531.GA19237@karelia> Message-ID: Boris, > That would be: > > car_t car = ... > ACE_OuputCDR ocdr; > > ocdr << car; > > // One can extract binary representation of car from ocdr now. > > ACE_InputCDR icdr (ocdr); > car_t car_copy (icdr); > > Is this something that would be useful to you? I could probably implement > this in a couple of days if you are interested. This definitely sounds like something we could try out if it's not diverting you from your planned development :-) > Again, the system needs to know that wheels are identified by id's: > > update u (wheel_t::pressure, where (eq (wheel_t::id)); > u.run (masterCar.chassis ().wheels (), pressureChange.chassis ().wheels > ()); This also sounds very useful. The key thing is to keep the mechanism generic - if some xml fragment has been streamed into an ACE_OuputCDR object (for example), all that is known is that the root is car_t so how best to discover that an update of wheel_t is required? Obviously we can send an replace / insert / remove tag with the fragment to decide on the required xsd operation but we don't really want to have to know about the structure beneath the root to perform that operation. Ideally: car_t masterCar ...; // main data car_t carPart ...; // from network / some other source. replace< car_t > r; // could also be insert or remove. r.run( masterCar, carPart ); then if the schema changed beneath the root, no code change would be required. If the schema enforced that wheels have a unique id would that help? We need to think a bit more about the details at this end but would certainly be willing to work with you on prototypes etc. Cheers, Dave. Dave Moss SELEX Communications Grange Road Christchurch Dorset BH23 4JE United Kingdom Tel: + 44 (0) 1202 404841 Email: david.r.moss@selex-comm.com > -----Original Message----- > From: Boris Kolpackov [mailto:boris@codesynthesis.com] > Sent: 14 May 2006 09:46 > To: Moss, David R (SELEX Comms) (UK Christchurch) > Cc: xsd-users@codesynthesis.com > Subject: Re: [xsd-users] Partial update of in-memory structures & network > transfer. > > Hi David, > > Moss, David R (SELEX Comms) (UK Christchurch) comm.com> writes: > > > ... > > > > there could be a point at runtime where the in-memory model contains the > > following data: > > > > > > > > 5 > > > > > > > > > > 1 > > 1 > > 1 > > > > > > 2 > > 2 > > 2 > > > > 5 > > > > > > > > > > ... > > > > > > > > > > 3 > > 3 > > 3 > > > > > > > > > > > > > > The first issue here is how to stream data to and from xsd objects - is > > your planned work to allow serialisation to (and from?!) compact binary > > formats for over-the-wire transfer something that would be able to > > address this? > > Yes, that's exactly the type of a situation serialization to/from a > compact > representation is supposed to address. The idea so far is to (optionally) > generate serialization operators (to) and c-tors (from). Also they will > be operator and c-tor templates in order to accommodate any stream type > you want to use: > > > class car_t > { > template > car_t (S& is); > }; > > temlate > S& > operator<< (S& os, car_t const&); > > > Then one will only need to wrap their stream type to expose interface > compatible with those expected by the generated templates. I was also > planning to provide a sample implementation for the ACE CDR streams. > > > > It would be nice if something like this could be done: > > > > // Get the data from the network > > BYTE* pCarFragment =... > > > > // Put the fragment into an xsd object - the main car object knows where > > // a wheel lives. > > // > > car_t car; > > pCarFragment >> car; > > > > That would be: > > car_t car = ... > ACE_OuputCDR ocdr; > > ocdr << car; > > // One can extract binary representation of car from ocdr now. > > ACE_InputCDR icdr (ocdr); > > car_t car_copy (icdr); > > > Is this something that would be useful to you? I could probably implement > this in a couple of days if you are interested. > > > > Next, given that it will be possible to do something like that, it would > > be possible to build / update some master data record from separate > > sources: > > I think what you are suggesting is some sort of a query language. The > simplified version that you describes below has a few problems, biggest > of which is that you assume that "the system" somehow knows which > parts are new and which ones need to be updated, removed, etc (i.e., > it knows, for example, that wheels are identified by the id attribute). > One will need to provide such information explicitly: > > car_t car = ... > car_t fragment = ... > > update u (where (eq (wheel_t::id)); > u.run (car.chassis ().wheels (), fragment.chassis ().wheels ()); > > > > A mechanism to allow data to be removed or updated would also be > > required: > > > > Change the tyre pressure: > > > > > > > > 99 > > > > > > > > > > car_t pressureChange = ... > > > > car_t masterCar = ... > > > > masterCar.Update( pressureChange ); > > Again, the system needs to know that wheels are identified by id's: > > update u (wheel_t::pressure, where (eq (wheel_t::id)); > u.run (masterCar.chassis ().wheels (), pressureChange.chassis ().wheels > ()); > > > > When the in-memory validation is available it would also be possible to > > do > > > > bool isValid = masterCar.valid(); > > > > to check that the overall content was correct against the schema (I seem > > to remember reading something to this effect on this forum!). > > Right, that the plan so far. > > > > I realise this is quite a philosophical email and there probably aren't > > any solid answers ( other than "what?!" :-) ), but it's something to > > think about... > > Yes, I've been thinking about the query language for a while now. This > is, however, quite a big chunk of work and will require a lot more > thinking than what I sketched above. Also, there seem to be a lot of > overlap with the standard algorithms so we need to think carefully to > make sure we don't reinvent the wheel here. > > In other words, if there is somebody who really needs it and is prepared > to go through the process of working out details, trying prototypes, etc, > we can go ahead and start working on this. > > hth, > -boris From castellim8 at hotmail.com Mon May 15 11:57:13 2006 From: castellim8 at hotmail.com (mauro castelli) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] xml 1.1 support in xsd Message-ID: Hi, could you please clarify if support for xml 1.1 parsing is forseen in the forthcoming releases of xsd? I'm interested in xml 1.1 only for the unicode and control characters support extension. Thanks and regards, Mauro Castelli _________________________________________________________________ Vuoi trovare tutto e subito? Prova MSN Toolbar! http://toolbar.msn.it/ From boris at codesynthesis.com Mon May 15 14:03:51 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] xml 1.1 support in xsd In-Reply-To: References: Message-ID: <20060515180351.GA23835@karelia> Hi Mauro, mauro castelli writes: > could you please clarify if support for xml 1.1 parsing is forseen in the > forthcoming releases of xsd? > I'm interested in xml 1.1 only for the unicode and control characters > support extension. If you are using Xerces-C++ as the underlying XML parser (which is the only parser supported by the C++/Tree mapping at the moment) then you have full support for XML 1.1 except for normalization checking (Section 2.13). See Xerces-C++ page for the list of supported standards: http://xml.apache.org/xerces-c/ hth, -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/20060515/422445b9/attachment.pgp From boris at codesynthesis.com Tue May 16 05:26:37 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Building examples with Visual Studio 2005 Message-ID: <20060516092637.GA25481@karelia> Hi Franklin, I've CC'ed xsd-users mailing list to my reply. In general, please post questions about XSD to this mailing list instead of directly to me. This way the information will be archived and available for others who may have the same questions. Thanks! Cheung, Yeung Franklin writes: > I have managed to install 2005 Visual Studio .NET. > My question now is how to run the Hello example of xsd in the IDE. > Can you drop me a clue? You will need to set up a couple of paths and then simply open the solution files that come with the XSD distribution and build them. This is described in details in the README that comes with the XSD distribution. It is also available online at http://codesynthesis.com/products/xsd/download.xhtml See the README link on the right for your platform (Windows/i686). Let us know if you run into any problems. hth, -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/20060516/120ac9df/attachment.pgp From fcheung at kns.com Tue May 16 05:43:55 2006 From: fcheung at kns.com (Cheung, Yeung Franklin) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] RE: Building examples with Visual Studio 2005 Message-ID: Hi Boris, I have downloaded xerces-c-2.7.0-i686-windows-vc-8.0-rtti.zip. After decompressing, the example file directory cannot be found. Where can I find the solution files for the hello example? Should it be included in the received? Thanks. Franklin -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Tuesday, May 16, 2006 5:27 PM To: Cheung, Yeung Franklin Cc: xsd-users@codesynthesis.com Subject: Building examples with Visual Studio 2005 Hi Franklin, I've CC'ed xsd-users mailing list to my reply. In general, please post questions about XSD to this mailing list instead of directly to me. This way the information will be archived and available for others who may have the same questions. Thanks! Cheung, Yeung Franklin writes: > I have managed to install 2005 Visual Studio .NET. > My question now is how to run the Hello example of xsd in the IDE. > Can you drop me a clue? You will need to set up a couple of paths and then simply open the solution files that come with the XSD distribution and build them. This is described in details in the README that comes with the XSD distribution. It is also available online at http://codesynthesis.com/products/xsd/download.xhtml See the README link on the right for your platform (Windows/i686). Let us know if you run into any problems. hth, -boris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codesynthesis.com/pipermail/xsd-users/attachments/20060516/7a52f7ce/attachment.htm From boris at codesynthesis.com Tue May 16 05:47:46 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Re: Building examples with Visual Studio 2005 In-Reply-To: References: Message-ID: <20060516094746.GA25582@karelia> Hi Franklin, Cheung, Yeung Franklin writes: > I have downloaded xerces-c-2.7.0-i686-windows-vc-8.0-rtti.zip. > After decompressing, the example file directory cannot be found. > Where can I find the solution files for the hello example? > Should it be included in the received? You will need to download both xerces-c-2.7.0-i686-windows-vc-8.0-rtti.zip and xsd-2.1.1-i686-windows.zip. After decompressing, read the README file in xsd-2.1.1-i686-windows - it describes how to set everything up (e.g., include paths, etc.). The examples directory is in xsd-2.1.1-i686-windows. hth, -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/20060516/d20e224c/attachment.pgp From boris at codesynthesis.com Tue May 16 08:32:25 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Partial update of in-memory structures & network transfer. In-Reply-To: References: <20060514084531.GA19237@karelia> Message-ID: <20060516123225.GC25818@karelia> Hi David, Moss, David R (SELEX Comms) (UK Christchurch) writes: > This definitely sounds like something we could try out if it's not > diverting you from your planned development :-) Well, I planned to implement this feature for a while. Now that there is someone needing this functionality I might as well do it. Will let you know when I have something to try. BTW, are you already using ACE in your project? > This also sounds very useful. The key thing is to keep the mechanism > generic - if some xml fragment has been streamed into an ACE_OuputCDR > object (for example), all that is known is that the root is car_t so how > best to discover that an update of wheel_t is required? Obviously we can > send an replace / insert / remove tag with the fragment to decide on the > required xsd operation but we don't really want to have to know about > the structure beneath the root to perform that operation. Ideally: > > car_t masterCar ...; // main data > car_t carPart ...; // from network / some other source. > > replace< car_t > r; // could also be insert or > remove. > r.run( masterCar, carPart ); > > then if the schema changed beneath the root, no code change would be > required. If the schema enforced that wheels have a unique id would that > help? Hm, I don't know about this. The idea of the query language I had is that it is a light-weight mechanism with minimal or no support in the generated code. What you are talking about is some sort of a non- trivial, schema-guided document merge facility with a lot of questions that I don't have good answers to, e.g.: 1. How do we distinguish parts that need to be replaced/updated compared to those that need to be added. I guess ID/key/keyref mechanisms can be used here but it could be too restrictive a requirement. 2. When some parts are inserted, in which order does it happen wrt existing parts? 3. For the remove operation, all one needs are IDs of parts to be removed. Creating (valid) documents with fake data seems like an overkill to me. I underhand you want to handle such merges generically without knowing which individual parts need to be updated. I, however, don't see a clear picture of how this can be done yet. Maybe we should think about a mechanism that would allow generic navigation/modification of the tree (higher-level than DOM but lower-lever than static typing). > We need to think a bit more about the details at this end but would > certainly be willing to work with you on prototypes etc. Ok, that sounds great. -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/20060516/7ce7d5d4/attachment.pgp From Clifford.Johnstun at gdc4s.com Tue May 16 17:00:04 2006 From: Clifford.Johnstun at gdc4s.com (Johnstun, Cliff-p98697) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Problem building Hello example using Visual Studio 2003 .NET Message-ID: Using Visual Studio 2003 .Net IDE, I tried to compile the Hello example and get the following error: xsd hello.xsd Microsoft (R) Xml Schemas/DataTypes support utility [Microsoft (R) .NET Framework, Version 1.1.4322.573] Copyright (C) Microsoft Corporation 1998-2002. All rights reserved. Error: invalid command line argument: 'cxx-parser'. If you would like more help, please type "xsd /?". Project : error PRJ0019: A tool returned an error code from "xsd hello.xsd" I ran xsd from a command window and it generated the hello.cxx, hello.hxx, & hello.txx files. My build log from visual studio: COMMAND LINES Creating temporary file "d:\Profiles\P98697\projects\xsd-x.y.z\examples\cxx\parser\hello\Debug\B AT000001.bat" with contents [ @echo off xsd cxx-parser hello.xsd if errorlevel 1 goto VCReportError goto VCEnd :VCReportError echo Project : error PRJ0019: A tool returned an error code from "xsd hello.xsd" exit 1 :VCEnd ] Creating command line ""d:\Profiles\P98697\projects\xsd-x.y.z\examples\cxx\parser\hello\Debug\ BAT000001.bat"" OUTPUT WINDOW xsd hello.xsd Microsoft (R) Xml Schemas/DataTypes support utility [Microsoft (R) .NET Framework, Version 1.1.4322.573] Copyright (C) Microsoft Corporation 1998-2002. All rights reserved. Error: invalid command line argument: 'cxx-parser'. If you would like more help, please type "xsd /?". Project : error PRJ0019: A tool returned an error code from "xsd hello.xsd" RESULTS Build log was saved at "file://d:\Profiles\P98697\projects\xsd-x.y.z\examples\cxx\parser\hello\ Debug\BuildLog.htm" hello - 1 error(s), 0 warning(s) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codesynthesis.com/pipermail/xsd-users/attachments/20060516/99ae1a28/attachment.html From fcheung at kns.com Tue May 16 23:11:17 2006 From: fcheung at kns.com (Cheung, Yeung Franklin) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] RE: Building examples with Visual Studio 2005 Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: BuildLog.htm Type: application/octet-stream Size: 4600 bytes Desc: not available Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20060517/c301d313/BuildLog.obj From boris at codesynthesis.com Wed May 17 03:52:46 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Re: Building examples with Visual Studio 2005 In-Reply-To: References: Message-ID: <20060517075246.GA27762@karelia> Hi Franklin, Cheung, Yeung Franklin writes: > Thanks for the advice, Boris. I have been able to rebuild the hello example > in .NET 2005 with 1 error report. > Do you have any suggestion to fix the issue? > > xsd hello.xsd > Microsoft (R) Xml Schemas/DataTypes support utility > [Microsoft (R) .NET Framework, Version 2.0.50727.42] > Copyright (C) Microsoft Corporation. All rights reserved. > Error: invalid command line argument: 'cxx-tree'. > If you would like more help, please type "xsd /?". > Project : error PRJ0019: A tool returned an error code from "xsd hello.xsd" > This error indicates that the IDE is invoking Microsoft's XSD tool instead of ours. The cause of this is either that you didn't set the PATH environment variable (Section 2.b of the README file) or haven't restarted the Visual Studio IDE after changing the PATH (Section 3 of the README file). Can you make sure you've done both steps and try again? If you are still having problems please let me know. > After opening the project file, .NET 2005 asked me to update the original > format, which may cause some trouble. No, we've tested this and it didn't cause any problems. hth, -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/20060517/65b7f618/attachment.pgp From boris at codesynthesis.com Wed May 17 05:53:32 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Re: Building examples with Visual Studio 2005 In-Reply-To: References: Message-ID: <20060517095332.GA28121@karelia> Hi Franklin, Cheung, Yeung Franklin writes: > I have setup all the things as instructed. Please refer to the bmp files > for checking. > Still the rebuild got stuck there after restart twice. What did you exactly > do for building the hello example in .NET 2005? I think I know what the problem is. Try the following step: In the Visual C++ IDE, select "Tools"/"Options"/"Projects"/"VC++ Directories". Then, in the "Show directories for" field, select "Executable files" and create a new entry with the value "C:\projects\xsd-x.y.z\bin". Make sure it is the first line in the list of directories (use the "Up" button to move the directory up, if necessary). (Don't forget to change "C:\projects\xsd-x.y.z\bin" to the real path above). Please let me know if it solves the problem and thanks for bearing with me. -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/20060517/df100f8c/attachment.pgp From boris at codesynthesis.com Wed May 17 07:52:44 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Problem building Hello example using Visual Studio 2003 .NET In-Reply-To: References: Message-ID: <20060517115244.GA28477@karelia> Hi, Johnstun, Cliff-p98697 writes: > Using Visual Studio 2003 .Net IDE, I tried to compile the Hello example > and get the following error: > > xsd hello.xsd > Microsoft (R) Xml Schemas/DataTypes support utility > [Microsoft (R) .NET Framework, Version 1.1.4322.573] > Copyright (C) Microsoft Corporation 1998-2002. All rights reserved. > Error: invalid command line argument: 'cxx-parser'. > If you would like more help, please type "xsd /?". > Project : error PRJ0019: A tool returned an error code from "xsd > hello.xsd" I think I know what the problem is. Try to do the following: In the Visual C++ IDE, select "Tools"/"Options"/"Projects"/"VC++ Directories". Then, in the "Show directories for" field, select "Executable files" and create a new entry with the value "C:\projects\xsd-x.y.z\bin". Make sure it is the first line in the list of directories (use the "Up" button to move the new entry up, if necessary). Please let me know if this works. -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/20060517/b9a001ce/attachment.pgp From boris at codesynthesis.com Wed May 17 10:18:42 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] xsd-2.1.1-1-i686-windows.zip released Message-ID: <20060517141842.GA30738@karelia> Hi, We've just released a new precompiled binary distribution for Windows. The only difference compared to 2.1.1 is updated README file with corrected instructions on how to set XSD up on Windows. The new README is also available online: http://codesynthesis.com/download/xsd/2.1/windows/README Thanks to Cheung, Yeung Franklin and Johnstun, Clifford for helping to track the problem down. You can download the distribution from the usual place: http://codesynthesis.com/products/xsd/download.xhtml The SHA1 checksum for the file: 2ff05149b7603af6dde5b1b89e59ca7d6e1d13da xsd-2.1.1-1-i686-windows.zip Have fun, -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/20060517/35ace291/attachment.pgp From fcheung at kns.com Wed May 17 21:25:23 2006 From: fcheung at kns.com (Cheung, Yeung Franklin) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] RE: Building examples with Visual Studio 2005 Message-ID: Hi Boris, After completing the step below, the rebuild was successful. Thanks. My question now is: how to run the hello example within the .NET environment? Thanks a lot. Franklin -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Wednesday, May 17, 2006 5:54 PM To: Cheung, Yeung Franklin Cc: xsd-users@codesynthesis.com Subject: Re: Building examples with Visual Studio 2005 Hi Franklin, Cheung, Yeung Franklin writes: > I have setup all the things as instructed. Please refer to the bmp files > for checking. > Still the rebuild got stuck there after restart twice. What did you exactly > do for building the hello example in .NET 2005? I think I know what the problem is. Try the following step: In the Visual C++ IDE, select "Tools"/"Options"/"Projects"/"VC++ Directories". Then, in the "Show directories for" field, select "Executable files" and create a new entry with the value "C:\projects\xsd-x.y.z\bin". Make sure it is the first line in the list of directories (use the "Up" button to move the directory up, if necessary). (Don't forget to change "C:\projects\xsd-x.y.z\bin" to the real path above). Please let me know if it solves the problem and thanks for bearing with me. -boris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codesynthesis.com/pipermail/xsd-users/attachments/20060518/1ecf8e4e/attachment.htm From boris at codesynthesis.com Thu May 18 05:38:04 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Re: Building examples with Visual Studio 2005 In-Reply-To: References: Message-ID: <20060518093804.GA749@karelia> Hi Franklin, Cheung, Yeung Franklin writes: > After completing the step below, the rebuild was successful. Thanks. My > question now is: how to run the hello example within the .NET environment? As you would do any other application. You can set a breakpoint somewhere in main(), start the program and step through the code. You may also need to enter hello.xsd as a command line argument in "Projects"/"Properties"/ "Configuration Properties"/"Debugging"/"Command Arguments". hth, -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/20060518/3058d492/attachment.pgp From fcheung at kns.com Wed May 24 01:56:39 2006 From: fcheung at kns.com (Cheung, Yeung Franklin) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] RE: Building examples with Visual Studio 2005 Message-ID: Hi Boris, Can the XML-data binding framework work on VxWorks and in a non-.NET environment? Please comment. Thanks. Franklin -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Thursday, May 18, 2006 5:38 PM To: Cheung, Yeung Franklin Cc: xsd-users@codesynthesis.com Subject: Re: Building examples with Visual Studio 2005 Hi Franklin, Cheung, Yeung Franklin writes: > After completing the step below, the rebuild was successful. Thanks. My > question now is: how to run the hello example within the .NET environment? As you would do any other application. You can set a breakpoint somewhere in main(), start the program and step through the code. You may also need to enter hello.xsd as a command line argument in "Projects"/"Properties"/ "Configuration Properties"/"Debugging"/"Command Arguments". hth, -boris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codesynthesis.com/pipermail/xsd-users/attachments/20060524/2f4f5a94/attachment.htm From boris at codesynthesis.com Wed May 24 04:00:52 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Re: Building examples with Visual Studio 2005 In-Reply-To: References: Message-ID: <20060524080052.GA19770@karelia> Hi Franklin, Cheung, Yeung Franklin writes: > Hi Boris, > > After following your suggestion, I successfully built the hello and "start > without debugging" leads to the following error. What should I do to fix the > problem? > > The procedure entry point > ?transcode@XMLString@xercesc_2_7@@SAPA_WQBD@Z could not be located in > the dynamic link library xerces-c_2_7D.dll. > I get exactly the same error if I try to use Xerces-C++ built using VC++ 7.1 (aka Visual Studio .NET 2003) with an application built using VC++ 8 (aka Visual Studio 2005). So please make sure you use xerces-c-2.7.0-i686-windows-vc-8.0-rtti.zip You can download it from http://codesynthesis.com/products/xsd/download.xhtml hth, -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/20060524/65c46c73/attachment.pgp From boris at codesynthesis.com Wed May 24 04:55:46 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:45 2009 Subject: [xsd-users] Using XSD with VxWorks Message-ID: <20060524085546.GC19770@karelia> Hi Franklin, Cheung, Yeung Franklin writes: > Can the XML-data binding framework work on VxWorks and in a non-.NET > environment? XSD generates standard C++ which works on a wide range of platforms[1] (as opposed to managed C++ that works only on Microsoft .NET platform). It should be possible to use the generated code and the runtime on VxWorks though we haven't tried it. It also very much depends on which version of VxWorks and development tools you are using and which C++ mapping you want to use (C++/Parser is a lightweight mapping more suitable for memory-constrained, embedded systems, compared to C++/Tree which is more suitable for desktop/server environment, though it too can be used in embedded systems is some circumstances). We can also provide you with support for XSD on VxWorks on a commercial basis. Please let me know if you are interested. [1] http://codesynthesis.com/products/xsd/platforms.xhtml hth, -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/20060524/d6e6a9de/attachment.pgp From fcheung at kns.com Wed May 24 04:47:07 2006 From: fcheung at kns.com (Cheung, Yeung Franklin) Date: Sun Oct 11 15:33:46 2009 Subject: [xsd-users] RE: Building examples with Visual Studio 2005 Message-ID: Hi Boris, I do remember the zip was decompressed and the directory xerces-c-2.7-i686-windows-vc-8.0-rtti was created and is still there with full content. I don't have 7.1 zip file nor the directory. So I am supposed to have been using the correct version. Besides I have only Visual Studio 2005 on my laptop. So what really happens now? Thanks. Franklin -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Wednesday, May 24, 2006 4:01 PM To: Cheung, Yeung Franklin Cc: xsd-users@codesynthesis.com Subject: Re: Building examples with Visual Studio 2005 Hi Franklin, Cheung, Yeung Franklin writes: > Hi Boris, > > After following your suggestion, I successfully built the hello and "start > without debugging" leads to the following error. What should I do to fix the > problem? > > The procedure entry point > ?transcode@XMLString@xercesc_2_7@@SAPA_WQBD@Z could not be located in > the dynamic link library xerces-c_2_7D.dll. > I get exactly the same error if I try to use Xerces-C++ built using VC++ 7.1 (aka Visual Studio .NET 2003) with an application built using VC++ 8 (aka Visual Studio 2005). So please make sure you use xerces-c-2.7.0-i686-windows-vc-8.0-rtti.zip You can download it from http://codesynthesis.com/products/xsd/download.xhtml hth, -boris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codesynthesis.com/pipermail/xsd-users/attachments/20060524/6eb1a7d5/attachment.html From boris at codesynthesis.com Wed May 24 05:14:33 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:46 2009 Subject: [xsd-users] Re: Building examples with Visual Studio 2005 In-Reply-To: References: Message-ID: <20060524091433.GD19770@karelia> Hi Franklin, Cheung, Yeung Franklin writes: > I do remember the zip was decompressed and the directory > xerces-c-2.7-i686-windows-vc-8.0-rtti was created and is still there with > full content. I don't have 7.1 zip file nor the directory. So I am supposed > to have been using the correct version. Besides I have only Visual Studio > 2005 on my laptop. So what really happens now? Hm, that's strange. Can you verify that the proper DLL is loading? For this, hit F5 (Start Debugging) in the IDE, then, after closing the dialog box with the error message, look in to the Output window at the bottom. There you will see a list of all DLLs that were loaded. Check that the correct xerces-c_2_7D.dll is loaded. For example, my output has the following line: 'hello.exe': Loaded 'C:\projects\xerces-c-2.7.0-i686-windows-vc-8.0-rtti\lib\xerces-c_2_7D.dll', Symbols loaded. hth, -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/20060524/9ccf0c9a/attachment.pgp From boris at codesynthesis.com Wed May 24 08:54:07 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:46 2009 Subject: [xsd-users] Partial update of in-memory structures & network transfer. In-Reply-To: References: <20060514084531.GA19237@karelia> Message-ID: <20060524125407.GA20619@karelia> Hi David, Moss, David R (SELEX Comms) (UK Christchurch) writes: > > car_t car = ... > > ACE_OuputCDR ocdr; > > > > ocdr << car; > > > > // One can extract binary representation of car from ocdr now. > > > > ACE_InputCDR icdr (ocdr); > > car_t car_copy (icdr); > > > > This definitely sounds like something we could try out if it's not > diverting you from your planned development :-) I have ACE CDR stream insertion and extraction implemented for non- polymorphic case. Testing it on a 1051 bytes XML file (library.xml) resulted in 351 bytes of binary representation. For comparison, zip- compressing the same file resulted in 595 bytes. Would you like a pre-release binary? hth, -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/20060524/779b9280/attachment.pgp From david.r.moss at selex-comm.com Wed May 24 12:01:39 2006 From: david.r.moss at selex-comm.com (Moss, David R (SELEX Comms) (UK Christchurch)) Date: Sun Oct 11 15:33:46 2009 Subject: [xsd-users] Partial update of in-memory structures & network transfer. In-Reply-To: <20060524125407.GA20619@karelia> Message-ID: Boris, > Would you like a pre-release binary? Yes, that would be great. > Maybe we should think about a mechanism that would allow generic > navigation/modification of the tree (higher-level than DOM but lower-lever > than static typing). Priorities have shifted a bit here so my thoughts on this maybe a bit intermittent! I was thinking about somehow extracting the schema path of the fragment (along with ids for sequence resolution) and passing that to access the area of data to be changed: car_t master ...; car_t fragment ...; database db; db.query( master, // object to update fragment, // the 'request' fragment.path(), // e.g. fragment.keys(), // collection of xsd:any to resolve sequences e.g. wheel id. "replace" // replace, insert, remove. ); Not sure how to indicate the update mode. Not sure about any of it to be honest! Cheers, Dave Dave Moss SELEX Communications Grange Road Christchurch Dorset BH23 4JE United Kingdom Tel: + 44 (0) 1202 404841 Email: david.r.moss@selex-comm.com > -----Original Message----- > From: Boris Kolpackov [mailto:boris@codesynthesis.com] > Sent: 24 May 2006 13:54 > To: Moss, David R (SELEX Comms) (UK Christchurch) > Cc: xsd-users@codesynthesis.com > Subject: Re: [xsd-users] Partial update of in-memory structures & network > transfer. > > Hi David, > > Moss, David R (SELEX Comms) (UK Christchurch) comm.com> writes: > > > > car_t car = ... > > > ACE_OuputCDR ocdr; > > > > > > ocdr << car; > > > > > > // One can extract binary representation of car from ocdr now. > > > > > > ACE_InputCDR icdr (ocdr); > > > car_t car_copy (icdr); > > > > > > > This definitely sounds like something we could try out if it's not > > diverting you from your planned development :-) > > I have ACE CDR stream insertion and extraction implemented for non- > polymorphic case. Testing it on a 1051 bytes XML file (library.xml) > resulted in 351 bytes of binary representation. For comparison, zip- > compressing the same file resulted in 595 bytes. > > Would you like a pre-release binary? > > hth, > -boris From sonu.sudhakaran at hp.com Thu May 25 00:55:16 2006 From: sonu.sudhakaran at hp.com (Sudhakaran, Sonu (STSD)) Date: Sun Oct 11 15:33:46 2009 Subject: [xsd-users] Help on XALAN VC8.0 Bits Message-ID: <6EB4FC130DA18748A32CB65BCF911EEC05ACB334@BGEEXC02.asiapacific.cpqcorp.net> Hello @, I found VC8.0 compiled bits for Xerces 2.70 on your site and I am thankful to you for that. Now I would need Xalan - 1.10 libraries and executables built on VC8.0 which I couldn't find it in your archive. Would you be able to provide me XALAN libraries as well, it would be of great help to us. Many Thanks in advance, Sonu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codesynthesis.com/pipermail/xsd-users/attachments/20060525/c6232d9f/attachment.htm From boris at codesynthesis.com Thu May 25 04:59:04 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:46 2009 Subject: [xsd-users] Help on XALAN VC8.0 Bits In-Reply-To: <6EB4FC130DA18748A32CB65BCF911EEC05ACB334@BGEEXC02.asiapacific.cpqcorp.net> References: <6EB4FC130DA18748A32CB65BCF911EEC05ACB334@BGEEXC02.asiapacific.cpqcorp.net> Message-ID: <20060525085904.GA23647@karelia> Hi Sonu, Sudhakaran, Sonu (STSD) writes: > I found VC8.0 compiled bits for Xerces 2.70 on your site and I am > thankful to you for that. > > Now I would need Xalan - 1.10 libraries and executables built on VC8.0 > which I couldn't find it in your archive. Would you be able to provide > me XALAN libraries as well, it would be of great help to us. We provide precompiled Xerces-C++ libraries as part of our product - XML Schema to C++ data binding compiler (XSD). Since XSD does not use XALAN, we don't have any reason to provide precompiled libraries for that project. I suggest you ask on the XALAN mailing list. hth, -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/20060525/44c170ff/attachment.pgp From boris at codesynthesis.com Thu May 25 14:16:46 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:46 2009 Subject: [xsd-users] Partial update of in-memory structures & network transfer. In-Reply-To: References: <20060524125407.GA20619@karelia> Message-ID: <20060525181646.GA26745@karelia> Hi David, Moss, David R (SELEX Comms) (UK Christchurch) writes: > > Would you like a pre-release binary? > > Yes, that would be great. Ok, here is the version for Windows: http://codesynthesis.com/~boris/tmp/xsd-2.1.1-2-i686-windows.zip There is an example in examples/cxx/tree called binary which round-trips an in-memory representation through a CDR stream printing interesting information along the way. The solution file that includes this example is tree-with-ace.sln in examples/cxx/tree. > Not sure how to indicate the update mode. Not sure about any of it to be > honest! Me neither. hth, -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/20060525/ec08acc8/attachment.pgp From boris at codesynthesis.com Mon May 29 06:09:19 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:46 2009 Subject: [xsd-users] C++/Tree manual available in PDF and PostScript Message-ID: <20060529100919.GB32593@karelia> Hi, C++/Tree Mapping User Manual is now available in PDF and PostScript: http://codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/cxx-tree-manual.pdf http://codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/cxx-tree-manual.ps -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/20060529/073516da/attachment.pgp From Doug.Bengtson at wnco.com Tue May 30 13:12:22 2006 From: Doug.Bengtson at wnco.com (Doug Bengtson) Date: Sun Oct 11 15:33:46 2009 Subject: [xsd-users] "Not valid after content" Message-ID: <4609983093AEEB4A8F59ECC573E389F9095B8C@SWAMAIL01.LUV.AD.SWACORP.COM> I've been trying to get xsd-tree code to work with an input stream and I keep getting a "Not valid after content" error thrown as an exception. I took the library example from /tree and change the driver.cxx file as follows: > //std::auto_ptr l (catalog (argv[1])); > std::ifstream fileStream (argv[1]); > std::auto_ptr l (catalog(fileStream)); When I run the example it gives me a ":54:7 error: Not valid after content" exception description. Does anyone have any suggestions or examples of code like this that work? Thanks! From boris at codesynthesis.com Tue May 30 14:19:07 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:46 2009 Subject: [xsd-users] "Not valid after content" In-Reply-To: <4609983093AEEB4A8F59ECC573E389F9095B8C@SWAMAIL01.LUV.AD.SWACORP.COM> References: <4609983093AEEB4A8F59ECC573E389F9095B8C@SWAMAIL01.LUV.AD.SWACORP.COM> Message-ID: <20060530181907.GA4950@karelia> Hi Doug, Doug Bengtson writes: > I've been trying to get xsd-tree code to work with an input stream and I > keep getting a "Not valid after content" error thrown as an exception. > > I took the library example from /tree and change the driver.cxx file as > follows: > > > //std::auto_ptr l (catalog (argv[1])); > > std::ifstream fileStream (argv[1]); > > std::auto_ptr l (catalog(fileStream)); > > When I run the example it gives me a ":54:7 error: Not valid after > content" exception description. Can you provide a sample content (and a schema, if possible) on which you get this error. Or, at least, what does line 54 look like? -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/20060530/427e4184/attachment.pgp From Doug.Bengtson at wnco.com Tue May 30 14:34:55 2006 From: Doug.Bengtson at wnco.com (Doug Bengtson) Date: Sun Oct 11 15:33:46 2009 Subject: [xsd-users] "Not valid after content" Message-ID: <4609983093AEEB4A8F59ECC573E389F9095B8F@SWAMAIL01.LUV.AD.SWACORP.COM> I am using the library.xml file located in the 2.1.1 solaris distribution. The relative path is: $XSD_HOME/examples/cxx/tree/library/library.xml. I am using it unchanged. As a side note, the example runs fine when I pass the filename into the catalog() method. It's only when I use an input stream that it doesn't work. Thanks for the response. Let me know if there's anything else you need that could help. -Doug -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Tuesday, May 30, 2006 1:19 PM To: Doug Bengtson Cc: xsd-users@codesynthesis.com Subject: Re: [xsd-users] "Not valid after content" Hi Doug, Doug Bengtson writes: > I've been trying to get xsd-tree code to work with an input stream and > I keep getting a "Not valid after content" error thrown as an exception. > > I took the library example from /tree and change the driver.cxx file > as > follows: > > > //std::auto_ptr l (catalog (argv[1])); std::ifstream > > fileStream (argv[1]); std::auto_ptr l > > (catalog(fileStream)); > > When I run the example it gives me a ":54:7 error: Not valid after > content" exception description. Can you provide a sample content (and a schema, if possible) on which you get this error. Or, at least, what does line 54 look like? -boris From boris at codesynthesis.com Tue May 30 16:05:16 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:46 2009 Subject: [xsd-users] "Not valid after content" In-Reply-To: <4609983093AEEB4A8F59ECC573E389F9095B8F@SWAMAIL01.LUV.AD.SWACORP.COM> References: <4609983093AEEB4A8F59ECC573E389F9095B8F@SWAMAIL01.LUV.AD.SWACORP.COM> Message-ID: <20060530200516.GA5181@karelia> Hi Doug, Doug Bengtson writes: > I am using the library.xml file located in the 2.1.1 solaris > distribution. The relative path is: > $XSD_HOME/examples/cxx/tree/library/library.xml. I am using it > unchanged. As a side note, the example runs fine when I pass the > filename into the catalog() method. It's only when I use an input > stream that it doesn't work. Hm, I just tried 4 combinations on Solaris 10 with your example: Sun C++ 5.7 Patch 117830-06 Sun C++ 5.8 Patch 121017-01 Xerces-C++ 2.6.0 Xerces-C++ 2.7.0 All four work fine. I guess I will need more information from you, such as the OS version, compiler version and patch level, Xerces-C++ version, and extra compiler options if any. thanks, -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/20060530/7c2825f7/attachment.pgp From thomas.biedermann at ubs.com Wed May 31 07:36:20 2006 From: thomas.biedermann at ubs.com (thomas.biedermann@ubs.com) Date: Sun Oct 11 15:33:46 2009 Subject: [xsd-users] Problem with xs:extension Message-ID: <39412E273B8370418B7EE09BAC3B7F3D384FB9@S01B1F4H.rzud.urdorf.ubs.ch> Hi there, I have encountered a problem with the schema below. xsd doesn't accept a annotation within . xsd emits the following errors: error: unexpected element 'annotation' error: expected 'attribute', 'anyAttribute', or 'attributeGroup' instead of 'sequence' If I remove the annotation tag, everything works fine. According to w3.org an annotation is allowed within an extension (although it's marked optional). It would be great if you could help me here. Many thanks in advance. Cheers, Thomas static information of a view code type -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codesynthesis.com/pipermail/xsd-users/attachments/20060531/ad2bd9d9/attachment.htm From boris at codesynthesis.com Wed May 31 08:21:54 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:46 2009 Subject: [xsd-users] Problem with xs:extension In-Reply-To: <39412E273B8370418B7EE09BAC3B7F3D384FB9@S01B1F4H.rzud.urdorf.ubs.ch> References: <39412E273B8370418B7EE09BAC3B7F3D384FB9@S01B1F4H.rzud.urdorf.ubs.ch> Message-ID: <20060531122154.GA7703@karelia> Hi Thomas, thomas.biedermann@ubs.com writes: > Hi there, > I have encountered a problem with the schema below. xsd doesn't accept a > annotation within . xsd emits the following errors: > > error: unexpected element 'annotation' > error: expected 'attribute', 'anyAttribute', or 'attributeGroup' instead > of 'sequence' > > If I remove the annotation tag, everything works fine. > According to w3.org an annotation is allowed within an extension > (although it's marked optional). It would be great if you could help me > here. This is a bug. Thanks for reporting it! I've fixed it for the next release. If you would like, I can build you a pre-release binary with the fix. Just let me know which platform(s) you need. hth, -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/20060531/65b2207f/attachment.pgp From boris at codesynthesis.com Wed May 31 11:53:33 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:46 2009 Subject: [xsd-users] XSD and Berkeley DB XML Integration Guide Message-ID: <20060531155333.GA8209@karelia> Hi, A new guide on how to use XSD-generated C++/Tree code on top of Berkeley DB XML is available at: http://codesynthesis.com/projects/xsd/documentation/cxx/tree/dbxml/ Berkeley DB XML is an embedded XML database which allows efficient storage and query of XML instance documents. The following operations are covered in the guide: * Create a new document in DB from an object representation * Create an object representation from a document in DB * Create an object representation from a document fragment in DB * Update a document fragment in DB from an object representation Have fun, -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/20060531/a9b535d3/attachment.pgp