From Giles.COPE at rbos.com Fri Nov 4 05:33:19 2005 From: Giles.COPE at rbos.com (COPE, Giles, FM) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] (no subject) Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: logo_rbs_cbfm.gif Type: image/gif Size: 3550 bytes Desc: not available Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20051104/f683ec8a/logo_rbs_cbfm.gif From Giles.COPE at rbos.com Fri Nov 4 05:43:25 2005 From: Giles.COPE at rbos.com (COPE, Giles, FM) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] IDREFS issue Message-ID: Hi, we're trialling xsd and it's looking very useful. One thing I did note is that when we add in a IDREFS attribute the generated code didn't seem to build (not compiling when we had the --generate-serialization and --generate-ostream options). It's not a biggy as we can change the schema to get round this, but thought I'd let you know. We're not yet at the account numbers and sort codes stage yet but once we are we'll let you know. (we're about 10kloc of gen source - don't want to raise your hopes too high ;-) The line in the xsd was: And the error: c:\xsd-1.5.0-i686-windows\libxsd\xsd\cxx\tree\types.hxx(1357) : error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'const xsd::cxx::tree::sequence' (or there is no acceptable conversion) with [ X=xsd::cxx::tree::idref_template ] c:\xsd-1.4.0-i686-windows\examples\cxx\tree\hello\RiskEngineXmlApi.cpp(6898) : see reference to function template instantiation 'std::basic_ostream<_Elem,_Traits> &xsd::cxx::tree::operator <<(std::basic_ostream<_Elem,_Traits> &,const xsd::cxx::tree::idrefs_template &)' being compiled with [ _Elem=char, _Traits=std::char_traits, X=xml_schema::type, C=char ] Regards Giles Cope *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our websites at: http://www.rbs.co.uk/CBFM http://www.rbsmarkets.com ******************************************************************************** From frederic.heem at telsey.it Fri Nov 4 05:47:46 2005 From: frederic.heem at telsey.it (frederic heem) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] problem during validation Message-ID: <200511041147.47194.frederic.heem@telsey.it> Hi boris, The file attached is generated by the java xml binding framework (JAXB), the problem is that xsd/xerces doesn't validate such a file whereas xmlint does. Namespace is the source of the problem. The root element is , not . Do you know a way to get around this problem ? Thanks -- ***** ? ? ----- ? ? ***** ? ? ----- ? ? ***** ? ? Frederic Heem Software Designer R&D - Telsey SpA Telecommunications Viale Industria, 1 31055 Quinto di Treviso (TV) ITALY Tel. direct phone: (+39) 0422 377819 Tel. (+39) 0422 377711 Fax. (+39) 0422 470920 website ==> www.telsey.it PRIVACY AND CONFIDENTIALITY NOTICE This email and any attachments are confidential and are intended for the addressee only. If you have received this message by mistake, please contact us immediately and then delete the message from your system. You must not copy, distribute, disclose or act upon the contents of this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: lid_conf_cpx3-mwi11-line1.xml Type: text/xml Size: 398 bytes Desc: not available Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20051104/421739ae/lid_conf_cpx3-mwi11-line1.bin From boris at codesynthesis.com Fri Nov 4 06:52:43 2005 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] IDREFS issue In-Reply-To: References: Message-ID: <20051104115243.GA5402@karelia> Giles, COPE, Giles, FM writes: > Hi, we're trialling xsd and it's looking very useful. One thing I did note > is that when we add in a IDREFS attribute the generated code didn't seem to > build (not compiling when we had the --generate-serialization and > --generate-ostream options). I am attaching patched libxsd which should fix this (simply overwrite the one you already have in xsd-1.5.0 distribution with this one). This fix will also appear in the next release. Thanks for reporting bugs! -boris -------------- next part -------------- A non-text attachment was scrubbed... Name: libxsd-1.5.0-1.zip Type: application/zip Size: 55617 bytes Desc: not available Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20051104/94e1e9b3/libxsd-1.5.0-1.zip From boris at codesynthesis.com Sat Nov 5 08:03:35 2005 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] Re: problem during validation In-Reply-To: <200511041147.47194.frederic.heem@telsey.it> References: <200511041147.47194.frederic.heem@telsey.it> Message-ID: <20051105130335.GA8520@karelia> Frederic, frederic heem writes: > The file attached is generated by the java xml binding framework (JAXB), > the problem is that xsd/xerces doesn't validate such a file whereas > xmlint does. How exactly it doesn't validate this instance (i.e., what is the error message and which schema you used for validation)? I took the sample schema and a driver from one of your previous emails (Subject: "lid_test, no regression test") and tried it on your file. Everything seems to work just fine. -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/20051105/6a52f8ee/attachment.pgp From frederic.heem at telsey.it Mon Nov 7 03:29:46 2005 From: frederic.heem at telsey.it (frederic heem) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] Re: problem during validation In-Reply-To: <20051105130335.GA8520@karelia> References: <200511041147.47194.frederic.heem@telsey.it> <20051105130335.GA8520@karelia> Message-ID: <200511070929.46498.frederic.heem@telsey.it> Hi Boris, Actually, the W3C schema file was missing from the current directory but the error message was something different: is not a valid element. Is there a way to specify the location of the schema file ? Something different from the current directory of course. At the moment, I had to copy to schema file to the current directory to work around the problem. On Saturday 05 November 2005 14:03, you wrote: > Frederic, > > frederic heem writes: > > The file attached is generated by the java xml binding framework (JAXB), > > the problem is that xsd/xerces doesn't validate such a file whereas > > xmlint does. > > How exactly it doesn't validate this instance (i.e., what is the error > message and which schema you used for validation)? I took the sample > schema and a driver from one of your previous emails (Subject: "lid_test, > no regression test") and tried it on your file. Everything seems to > work just fine. > > -boris -- ***** ? ? ----- ? ? ***** ? ? ----- ? ? ***** ? ? Frederic Heem Software Designer R&D - Telsey SpA Telecommunications Viale Industria, 1 31055 Quinto di Treviso (TV) ITALY Tel. direct phone: (+39) 0422 377819 Tel. (+39) 0422 377711 Fax. (+39) 0422 470920 website ==> www.telsey.it PRIVACY AND CONFIDENTIALITY NOTICE This email and any attachments are confidential and are intended for the addressee only. If you have received this message by mistake, please contact us immediately and then delete the message from your system. You must not copy, distribute, disclose or act upon the contents of this email. From boris at codesynthesis.com Mon Nov 7 04:07:30 2005 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] Re: problem during validation In-Reply-To: <200511070929.46498.frederic.heem@telsey.it> References: <200511041147.47194.frederic.heem@telsey.it> <20051105130335.GA8520@karelia> <200511070929.46498.frederic.heem@telsey.it> Message-ID: <20051107090730.GA12620@karelia> Frederic, frederic heem writes: > Actually, the W3C schema file was missing from the current directory but > the error message was something different: is not a valid element. No, the error message is the right one. According to the spec, schemaLocation attribute is only a hint to the schema processor; there could be other, ad-hoc, ways to specify schemas. In your case, schema processor didn't find any schemas for your instance document and, because by default validation is turned on, told your that LidConf is not a valid element since it couldn't find a schema for it. > Is there a way to specify the location of the schema file ? Something > different from the current directory of course. Since you are using a pre-release of 1.6.0 there is a way to specify schemas programmatically. Check the last argument to parsing functions. The code snippet that does this looks will look something like this: xml_schema::properties prop; char cwd[1024]; if (getcwd (cwd, 1024) == 0) { std::cerr << "CWD is longer than 1024 bytes" << std::endl; return 1; } prop.no_namespace_schema_location ( "file://" + std::string (cwd) + "/rss-2_0_1-rev10.xsd"); std::cout << *rss (argv[1], 0, prop) << std::endl; This information will also appear in the upcoming FAQ. 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/20051107/bf61f641/attachment.pgp From frederic.heem at telsey.it Tue Nov 8 12:00:20 2005 From: frederic.heem at telsey.it (frederic heem) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] xinclude Message-ID: <200511081800.21511.frederic.heem@telsey.it> Hi boris, I would like to use Xinclude inside an xml instance file, is it possible to do it with xsd ? -- ***** ? ? ----- ? ? ***** ? ? ----- ? ? ***** ? ? Frederic Heem Software Designer R&D - Telsey SpA Telecommunications Viale Industria, 1 31055 Quinto di Treviso (TV) ITALY Tel. direct phone: (+39) 0422 377819 Tel. (+39) 0422 377711 Fax. (+39) 0422 470920 website ==> www.telsey.it PRIVACY AND CONFIDENTIALITY NOTICE This email and any attachments are confidential and are intended for the addressee only. If you have received this message by mistake, please contact us immediately and then delete the message from your system. You must not copy, distribute, disclose or act upon the contents of this email. From boris at codesynthesis.com Wed Nov 9 05:00:03 2005 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] xsd 1.6.0 released Message-ID: <20051109100003.GB8860@karelia> Good day, We've released xsd 1.6.0. The NEWS file entries for this version are as follows: * Number of bug fixes in libxsd and the generated code. cxx-tree * Support for xsi:type and substitution groups in parsing and serialization. See examples/cxx/tree/polymorphism for a code sample. * Properties argument to parsing functions which allows to programmatically specify schemas for instance document validation. * Extra checks in parsing code which prevents construction of inconsistent in-memory representation from invalid instance documents. Should be useful when validation is disabled. * Accessors and modifier were made normal member functions. Before they were implemented via functors. * Workaround for g++-3.3 bug# 16650: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16650 cxx-parser * All "service" functions were renamed to start with '_'. This should prevent hiding of service functions by elements/attributes with the same names. Precompiled binary distributions for various platforms are available from the product's web page: http://codesynthesis.com/products/xsd/ Source code for this release is available from the project's web page: http://codesynthesis.com/projects/xsd/ SHA1 checksums for the files: 8a62cc9d9c37710b525df1edf28bf0f2b66e5f04 xsd-1.6.0.tar.bz2 de85f568562c13b3e4a64102b9d87e8b4aa6fa86 xsd_1.6.0-1_i386.deb c89ec2be71c5e10878ad55182381a2abc3903ed4 xsd-1.6.0-1.i686.rpm c92480af416ea343a0b0be4ed24cb6c8af4436e3 xsd-1.6.0-i686-linux-gnu.tar.bz2 c63d306dbd824c2a7465349455f3bbc2bcb1c518 xsd_1.6.0-1_amd64.deb c077362c5d43c53c929af85e5f0eb72c6f950c8b xsd-1.6.0-1.x86_64.rpm 1f319ee59eafa2463624fa400fe4f5aa1d004208 xsd-1.6.0-x86_64-linux-gnu.tar.bz2 9a424d8e115348e6bd1010dfc20ee49f2c5aa361 xsd-1.6.0-powerpc-macosx.tar.bz2 c483fd7b3557848341aed36fb13055cca641f501 xsd-1.6.0-sparc-solaris.tar.bz2 2e95b3354937a9d62ce11bbb85b163dd09895f04 xsd-1.6.0-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/20051109/1a123ca2/attachment.pgp From boris at codesynthesis.com Wed Nov 9 10:54:32 2005 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] Re: xinclude In-Reply-To: <200511081800.21511.frederic.heem@telsey.it> References: <200511081800.21511.frederic.heem@telsey.it> Message-ID: <20051109155432.GA9676@karelia> Frederic, frederic heem writes: > I would like to use Xinclude inside an xml instance file, is it > possible to do it with xsd ? xsd does not provide any special handling for XInclude so you will have to handle it yourself. One approach to this problem is to define a 'choice' between an in-line element content and an inclusion from a separate instance document: ... Having this structure, in your application you can handle include-foo by parsing the separate instance document and using the result to "fix" the tree, e.g., Bar& bar = ... if (bar.include_foo ()) { // Parse the included document. // auto_ptr f (foo (*bar.include_foo ())); // Copy the result into the original tree. // bar.foo (f); } This way the rest of your application logic does not have to worry about the inclusion and can just assume that foo is always set. 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/20051109/aff48b95/attachment.pgp From chenchang19760717 at yahoo.com Fri Nov 11 01:16:46 2005 From: chenchang19760717 at yahoo.com (Chang Chen) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] about xsd Message-ID: <20051111061647.69844.qmail@web30611.mail.mud.yahoo.com> Clean Clean DocumentEmail false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} Hi I am trying xsd, how does xsd support constraint, for example: 1) Pattern I found the generated code do not judge whether the inputstring match or mismatch pattern. 2) Date, In your library example, theborn of author is xsd::date. I still can input anystring, such as “XXXX”. How can I add validate function? Thanks Chang --------------------------------- Yahoo! FareChase - Search multiple travel sites in one click. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codesynthesis.com/pipermail/xsd-users/attachments/20051110/2ef68564/attachment.htm From boris at codesynthesis.com Fri Nov 11 05:20:03 2005 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] about xsd In-Reply-To: <20051111061647.69844.qmail@web30611.mail.mud.yahoo.com> References: <20051111061647.69844.qmail@web30611.mail.mud.yahoo.com> Message-ID: <20051111102003.GA19580@karelia> Chang, Chang Chen writes: > I am trying xsd, how does xsd support constraint, for example: xsd uses underlying XML library (Xerces-C++) to validate instance documents against schemas. If an instance is not valid (e.g., one of the constraints you've shown does not satisfy) an exception will be thrown. > How can I add validate function? It is not clear what you mean by this. Can you give us some more details about what you are trying to achieve? 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/20051111/b59c5a64/attachment.pgp From jclark at geosci.usyd.edu.au Sun Nov 13 23:23:47 2005 From: jclark at geosci.usyd.edu.au (James Clark) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] GML schemas, referenced instance not typed In-Reply-To: <200511111700.jABH0XXr010893@codesynthesis.com> References: <200511111700.jABH0XXr010893@codesynthesis.com> Message-ID: <43781153.3000706@geosci.usyd.edu.au> Hi Boris, I'm working with James Boyden trying to use the GML schemas. Following our recent discussion of derivation by restriction problems, we have discovered some new things and run into some exciting new errors. What you might find interesting, is that the restriction errors we ran into earlier in the GML schemas are -technically- valid (although evidently a very unusual way of constructing things); there is a bug in Xerces-C++ http://issues.apache.org/jira/browse/XERCESC-1281 that cannot deal with the obfuscated way the restriction is set up; while elements like gml:methodName may appear on the surface to violate restriction rules, on closer inspection gml:methodName is substitutable for gml:name, which makes everything okay. When we eventually got a response from the GML developers, it was revealed that there was a secret version of GML 3.1.1 with some depreciated elements removed; I tried it out with xsd and it seemed to be just what was needed to get around the restriction issue. However it revealed some more errors as the schemas use unions (which I know xsd doesn't support yet): jclark@polygon: ~/projects/xsd $ xsd cxx-parser ../gml/3.1.1s/base/gml.xsd ../gml/3.1.1s/base/basicTypes.xsd:29:12: error: expected 'list' or 'restriction' instead of 'union' ../gml/3.1.1s/base/basicTypes.xsd:52:54: error: expected 'list' or 'restriction' instead of 'union' ../gml/3.1.1s/base/basicTypes.xsd:73:62: error: expected 'list' or 'restriction' instead of 'union' ../gml/3.1.1s/base/basicTypes.xsd:94:61: error: expected 'list' or 'restriction' instead of 'union' ../gml/3.1.1s/base/basicTypes.xsd:101:59: error: expected 'list' or 'restriction' instead of 'union' ../gml/3.1.1s/base/basicTypes.xsd:122:61: error: expected 'list' or 'restriction' instead of 'union' ../gml/3.1.1s/base/basicTypes.xsd:143:62: error: expected 'list' or 'restriction' instead of 'union' ../gml/3.1.1s/base/gmlBase.xsd:36:42: warning: element '_Object' is implicitly of anyType ../gml/3.1.1s/base/gmlBase.xsd:36:42: info: did you forget to specify 'type' attribute? ../gml/3.1.1s/base/temporal.xsd:238:10: error: expected 'list' or 'restriction' instead of 'union' ../gml/3.1.1s/base/temporal.xsd:298:66: error: expected 'list' or 'restriction' instead of 'union' ../gml/3.1.1s/base/temporal.xsd:310:47: error: expected 'list' or 'restriction' instead of 'union' I hacked around these unions by replacing them with basic things like string, integer etc, which seems a perfectly reasonable kludge for our purposes. But I've now found a new error that I don't know how to handle. Perhaps you can shed some light on this one? jclark@polygon: ~/projects/xsd $ xsd cxx-parser ../gml/3.1.1s-hacked/base/gml.xsd ../gml/3.1.1s-hacked/base/gmlBase.xsd:36:42: warning: element '_Object' is implicitly of anyType ../gml/3.1.1s-hacked/base/gmlBase.xsd:36:42: info: did you forget to specify 'type' attribute? ice: referenced instance 'http://www.opengis.net/gml#metaDataProperty' is not typed Aborted Looking at the definition of metaDataProperty (gmlBase.xsd:224), it does appear to have a type= definition.. I'm not sure what the problem is, exactly. I'm using xsd 1.5.0. Contains or refers to a metadata package that contains metadata properties. Base type for complex metadata property types. I've placed the developer's cut and my hacked version of it up on my webspace so you can view it if you feel the need: http://www.geosci.usyd.edu.au/users/jclark/gml/3.1.1s/ http://www.geosci.usyd.edu.au/users/jclark/gml/3.1.1s-hacked/ or a tarball if you prefer: http://www.geosci.usyd.edu.au/users/jclark/gml/3.1.1s-hacked.tar.gz Many thanks, James Clark From boris at codesynthesis.com Mon Nov 14 03:21:55 2005 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] GML schemas, referenced instance not typed In-Reply-To: <43781153.3000706@geosci.usyd.edu.au> References: <200511111700.jABH0XXr010893@codesynthesis.com> <43781153.3000706@geosci.usyd.edu.au> Message-ID: <20051114082155.GA5274@karelia> James, James Clark writes: > What you might find interesting, is that the restriction errors we ran > into earlier in the GML schemas are -technically- valid (although > evidently a very unusual way of constructing things); there is a bug in > Xerces-C++ http://issues.apache.org/jira/browse/XERCESC-1281 that cannot > deal with the obfuscated way the restriction is set up; while elements > like gml:methodName may appear on the surface to violate restriction > rules, on closer inspection gml:methodName is substitutable for > gml:name, which makes everything okay. Indeed it's quite interesting. Thanks for letting me know. > I hacked around these unions by replacing them with basic things like > string, integer etc, which seems a perfectly reasonable kludge for our > purposes. Yes, that's how we handle unions in xsd. For now. ;-) > But I've now found a new error that I don't know how to > handle. Perhaps you can shed some light on this one? > > ice: referenced instance 'http://www.opengis.net/gml#metaDataProperty' is > not typed > Aborted That's a bug in xsd. I've fixed it in my workspace. > I've placed the developer's cut and my hacked version of it up on my > webspace so you can view it if you feel the need: That's nice of you. After fixing the bug I tried it on your 3.1.1s-hacked. There are some anonymous types in gml so I had to use --morph-anonymous option to auto-name them. After that I go the following diagnostics: $ xsd cxx-parser --morph-anonymous gml.xsd temporal.xsd:267:52: error: type 'TimePositionType' inherits from yet undefined type 'TimePositionUnion' temporal.xsd:285:39: info: 'TimePositionUnion' is defined here temporal.xsd:267:52: info: inheritance from a yet-undefined type is not supported temporal.xsd:267:52: info: re-arrange your schema and try again This error is here because inheritance from undefined type is illegal in C++. I moved TimePositionUnion to appear before TimePositionType and after that everything seems to work fine. I can build you a pre-release of xsd with this bug (and some other cxx-parser -related bugs) fixed. Just let me know which platform, package format, and whether it is ok to send by email. And thanks for reporting bugs! -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/20051114/65474287/attachment.pgp From paule.hsv at gmx.de Mon Nov 14 07:35:32 2005 From: paule.hsv at gmx.de (Jan) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] bug in ID/IDREF mechanism ? Message-ID: <12059.1131971732@www26.gmx.net> Good day, i encountered an - in my opinion - unkindly xsd behavior related to the ID/IDREF mechanism. Ingenuously i tried to set the schema header like this (i.e. i replaced "codesynthesis.com" with "hsv.de") : xsd generated enjoyable nice code. No errors or warnings were reported. But the code misses all schema specific ::xsd::cxx::tree::idref_temlate< *any_special_type*,char> declarations, compared to the code generated by xsd with the xsd-examples header : Summarized: The reference mechanism only works with the xsd-examples header. Is this a bug ? Is this documented everywhere ? I futilely skimed the mailing-archive for this topic. Thanks for (xsd and ;) any hints Paule -- Telefonieren Sie schon oder sparen Sie noch? NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie From boris at codesynthesis.com Mon Nov 14 09:03:37 2005 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] bug in ID/IDREF mechanism ? In-Reply-To: <12059.1131971732@www26.gmx.net> References: <12059.1131971732@www26.gmx.net> Message-ID: <20051114140337.GA7382@karelia> Paule, Jan writes: > Ingenuously i tried to set the schema header like this > (i.e. i replaced "codesynthesis.com" with "hsv.de") : > > xmlns:xse="http://www.hsv.de/xmlns/xml-schema-extension" > xmlns:lib="http://www.hsv.de/library" > targetNamespace="http://www.hsv.de/library"> You cannot change "www.codesynthesis.com" to "www.hsv.de" in xmlns:xse="http://www.codesynthesis.com/xmlns/xml-schema-extension" because that's the namespace where xsd-specific extension attributes reside. When xsd looks for the refType attribute it actually looks for {http://www.codesynthesis.com/xmlns/xml-schema-extension, refType} namespace-name pair. 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/20051114/37157cb6/attachment.pgp From Giles.COPE at rbos.com Wed Nov 16 05:08:26 2005 From: Giles.COPE at rbos.com (COPE, Giles, FM) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] Getting at the autopointers Message-ID: Hi Boris, when our root object destructor gets called the whole tree is deleted. Presumably this is because it's following each autopointer and calling the destructor on what it owns. We'd like to get to the autopointer to release it, so that we can put the objects into a cache and manage their lifecycle independently of the main document. Is there an easy way to do this? - we looked but could not find an easy / nice way. Regards, Giles Cope *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our websites at: http://www.rbs.co.uk/CBFM http://www.rbsmarkets.com ******************************************************************************** From boris at codesynthesis.com Wed Nov 16 06:40:05 2005 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] Getting at the autopointers In-Reply-To: References: Message-ID: <20051116114005.GA16548@karelia> Giles, COPE, Giles, FM writes: > Hi Boris, when our root object destructor gets called the whole tree is > deleted. Presumably this is because it's following each autopointer and > calling the destructor on what it owns. That's right, each node in the document tree owns its sub-tree. > We'd like to get to the autopointer to release it, so that we can put the > objects into a cache and manage their lifecycle independently of the main > document. If I understood you correctly, you want to "detach" some sub-trees from the complete document tree and manage them separately. The only way that I can think of is by making a copy of the nodes that you are interested in (a copy of all the "sub-nodes" will be made automatically). E.g., suppose you have the following schema: ... ... Then you can do something like this: Bar& b = ... auto_ptr f (new Foo (b.foo ())); // Make a copy. cache.add (f.release ()); // Add to the cache. 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/20051116/080f2451/attachment.pgp From jboyden at geosci.usyd.edu.au Wed Nov 16 07:23:10 2005 From: jboyden at geosci.usyd.edu.au (James Boyden) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] Getting at the autopointers In-Reply-To: <20051116114005.GA16548@karelia> References: <20051116114005.GA16548@karelia> Message-ID: <20051116122310.GA14497@geosci.usyd.edu.au> On Wednesday, Nov 16, Boris Kolpackov wrote: > If I understood you correctly, you want to "detach" some sub-trees from > the complete document tree and manage them separately. The only way that > I can think of is by making a copy of the nodes that you are interested > in (a copy of all the "sub-nodes" will be made automatically). E.g., > suppose you have the following schema: > > > > ... > > > > > > > > > ... > > > > > > Then you can do something like this: > > Bar& b = ... > > auto_ptr f (new Foo (b.foo ())); // Make a copy. Hi, I admit I haven't yet looked too closely at the XML schema polymorphism features used to handle things like substitution groups, but if there's C++ polymorphism involved, wouldn't auto_ptr f (new Foo (b.foo ())); // Make a copy. be better expressed as something like auto_ptr f (b.foo ().clone ()); // Make a clone. using the "virtual constructor" idiom [1]? (I note that in the file "schema.hxx" generated by xsd for the "cxx/tree/polymorphism" example, the classes 'person_type', 'superman_type', 'batman_type' and 'instance_type' all have a function '_clone', but this function is clearly intended for internal use only, plus it takes two arguments which I don't understand, so I'm going to assume that it's not the solution to this problem.) jb [1] "virtual constructor" idiom: http://www.parashift.com/c++-faq-lite/virtual-functions.html#faq-20.8 From Giles.COPE at rbos.com Wed Nov 16 06:59:43 2005 From: Giles.COPE at rbos.com (COPE, Giles, FM) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] Getting at the autopointers Message-ID: That's it exactly, we want to detach the sub-trees and manage the object lifetimes ourselves. We thought we might be able to avoid copying the data as there will be a substantial amount of it. We'll do the copy and if performance is an issue we should be able to modify the libxsd include files to gain access to the auto pointers and release them without copying. Btw, I'm sure everyone's wondering what plans you have for xsd 1.7? Many thanks for all your great efforts, Giles *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our websites at: http://www.rbs.co.uk/CBFM http://www.rbsmarkets.com ******************************************************************************** From boris at codesynthesis.com Wed Nov 16 08:43:47 2005 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] Getting at the autopointers In-Reply-To: <20051116122310.GA14497@geosci.usyd.edu.au> References: <20051116114005.GA16548@karelia> <20051116122310.GA14497@geosci.usyd.edu.au> Message-ID: <20051116134347.GA2765@karelia> James, James Boyden writes: > I admit I haven't yet looked too closely at the XML schema polymorphism > features used to handle things like substitution groups, but if there's > C++ polymorphism involved, wouldn't > > auto_ptr f (new Foo (b.foo ())); // Make a copy. > > be better expressed as something like > > auto_ptr f (b.foo ().clone ()); // Make a clone. > > using the "virtual constructor" idiom [1]? You are absolutely right. Nice catch, James! > (I note that in the file "schema.hxx" generated by xsd for the > "cxx/tree/polymorphism" example, the classes 'person_type', > 'superman_type', 'batman_type' and 'instance_type' all have a function > '_clone', but this function is clearly intended for internal use only, No, _clone() is not for internal use only. The underscore in the name is there to avoid conflicts with attribute/element names (this is similar to CORBA IDL-to-C++ mapping's _narrow(), etc.). We refer to such functions as "service functions". > plus it takes two arguments which I don't understand, so I'm going to > assume that it's not the solution to this problem.) Here you are correct, those arguments are for internal use ;-). They should have been default-initialized to 0, similar to copy c-tors. We will fix this in 1.7.0. 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/20051116/30af9be4/attachment.pgp From boris at codesynthesis.com Wed Nov 16 09:05:35 2005 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] Getting at the autopointers In-Reply-To: References: Message-ID: <20051116140535.GB2765@karelia> Giles, COPE, Giles, FM writes: > That's it exactly, we want to detach the sub-trees and manage the object > lifetimes ourselves. We thought we might be able to > avoid copying the data as there will be a substantial amount of it. We'll do > the copy and if performance is > an issue we should be able to modify the libxsd include files to gain access > to the auto pointers and release > them without copying. That sounds like a reasonable idea. Though note that the original tree after such "decomposition" won't be in a consistent state. The only safe thing you could do to is to destroy it. Furthermore, if you keep DOM association (in which case the root of the tree is responsible for destroying the DOMDocument), the "detached" sub-tree will refer to destroyed DOM nodes. If you find that performance is really an issue, let us know and we will try to think of a cleaner solution. > Btw, I'm sure everyone's wondering what plans you have for xsd 1.7? Well, with the release of 1.6.0 we pretty much covered all major XML Schema mechanisms. The next major feature is going to be a compete C++/Tree mapping documentation. There are also some relatively-minor features that we are working on (mostly in C++/Parser mapping) as well as a number of bug fixes. So there will be a 1.7.0 release in a 2-3 weeks time frame as well as a "plans for 1.7.0"-type of announcement some time beginning of the next week ;-). Are you having any particular features in mind that you would like to see implemented? 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/20051116/eeaddf44/attachment.pgp From boris at codesynthesis.com Thu Nov 17 03:25:58 2005 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] C++/Tree Mapping FAQ Message-ID: <20051117082558.GA6424@karelia> Good day, We've just published the first revision of the C++/Tree Mapping FAQ which you can read at: http://codesynthesis.com/projects/xsd/documentation/cxx/tree/faq/ 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/20051117/f3848b45/attachment.pgp From shweta2.s at tcs.com Mon Nov 21 01:46:02 2005 From: shweta2.s at tcs.com (shweta2.s@tcs.com) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] error in mapping xsd file to c++ file Message-ID: hi, when i m giving cxx-tree command to get c++ file i am getting this error.plz help. error: Expected comment or processing instruction Shweta Singh Tata Consultancy Services Limited Mailto: shweta2.s@tcs.com Website: http://www.tcs.com Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you From boris at codesynthesis.com Mon Nov 21 02:18:49 2005 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] error in mapping xsd file to c++ file In-Reply-To: References: Message-ID: <20051121071849.GA17518@karelia> Shweta, shweta2.s@tcs.com writes: > when i m giving cxx-tree command to get c++ file i am getting this > error: Expected comment or processing instruction This error message indicates that the schema that you asked xsd to compile is not a valid XML instance. For example, if I add some random text after the closing tag of a root element I get: $ xsd cxx-tree hello.xsd hello.xsd:23:1: error: Expected comment or processing instruction I suggest you check the line/column provided in the error message and see if there is any extraneous text. 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/20051121/c9447908/attachment.pgp From boris at codesynthesis.com Tue Nov 22 03:45:35 2005 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] Re: extracting data from xml file using c++ In-Reply-To: References: Message-ID: <20051122084535.GA20814@karelia> Shweta, Please send all questions regarding xsd to the xsd-users@codesynthesis.com mailing list so that others will be able to benefit from this information. shweta2.s@tcs.com writes: > plz help me extracting data from xml file using c++ on unix environment.i > have created .c++ and .h++ file from its xsd file,but i dont know how to > use that to read data. The XML Schema C++/Tree Mapping Quick Guide contains step-by-step instructions on how to do what you want. You can read it at http://codesynthesis.com/projects/xsd/documentation/cxx/tree/quick-guide/ 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/20051122/06474a75/attachment.pgp From boris at codesynthesis.com Tue Nov 22 04:15:10 2005 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] plans for xsd 1.7.0 Message-ID: <20051122091510.GA20906@karelia> Good day, We are planning to make the following user-visible changes in xsd 1.7.0 which is to be released around Dec 5. Your feedback on the proposed changes/new features is always appreciated. cxx-tree * Complete user guide for the C++/Tree Mapping. If you would like to get access to early drafts of this document, email me off list. * _clone function will have its arguments default-initialized. * Generated code cleanups. cxx-parser * Properties argument to parsing functions which allows to programmatically specify schemas for instance document validation. * Flags argument to parsing functions. The following flags will be supported: dont_validate - do not validate instance documents dont_initialize - do not initialize the Xerces-C++ runtime 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/20051122/ed158807/attachment.pgp From chenchang19760717 at yahoo.com Wed Nov 23 22:49:15 2005 From: chenchang19760717 at yahoo.com (Chang Chen) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] could someone provide msvc version xsd solution? Message-ID: <20051124034916.95450.qmail@web30609.mail.mud.yahoo.com> Clean Clean DocumentEmail false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} Hi I have met these problems which I want to debug it. 1) When I use it to compile my one .xsdfile, it says: ice: referencedinstance 'http://www.dvdforum.org/2005/HDDVDVideo/Playlist#ApplicationResource'is not typed This application has requested the Runtime to terminate itin an unusual way. Please contact the application's support team for moreinformation. 2) compile anotherone .xsd file, it says: XXXX.xsd:50:55: error: expected 'list' or 'restriction'instead of 'union' XXXX.xsd:54:13: error: expected 'list' or 'restriction'instead of 'union' YYYY.xsd:524:55: error: expected 'list' or 'restriction'instead of 'union' YYYY.xsd:571:66: error: expected 'list' or 'restriction'instead of 'union' In fact, I can not modify the .xsdfile, that’s because it is published standard, I hope someone can providemsvc version xsd solution, soI can debug it, or provide the patch to fix it. I do not know how to use cygwin tools set to compile xsdtools. In addition, I think this feature is needed, let user configurate xsd to generate classinto several files, it is very important for large .xsdfiles. Thanks Chang --------------------------------- Yahoo! Music Unlimited - Access over 1 million songs. Try it free. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codesynthesis.com/pipermail/xsd-users/attachments/20051123/b7b29a9f/attachment.html From boris at codesynthesis.com Thu Nov 24 05:39:22 2005 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] could someone provide msvc version xsd solution? In-Reply-To: <20051124034916.95450.qmail@web30609.mail.mud.yahoo.com> References: <20051124034916.95450.qmail@web30609.mail.mud.yahoo.com> Message-ID: <20051124103922.GA11001@karelia> Chang, Chang Chen writes: > 1) When I use it to compile my one .xsd file, it says: > > ice: referenced instance 'http://www.dvdforum.org/2005/HDDVDVideo/Playlist#ApplicationResource' is not typed This a known bug that will be fixed in 1.7.0. If you would like, I can send you a pre-release which fixes this bug. > 2) compile another one .xsd file, it says: > > XXXX.xsd:50:55: error: expected 'list' or 'restriction' instead of 'union' XML Schema union is not yet supported. This email: http://codesynthesis.com/pipermail/xsd-users/2005-October/000060.html describes a workaround that you can use for the time being. > In fact, I can not modify the .xsd file, that's because it is > published standard, I don't see a reason why you can create a modified "private" copy of your schemas for the purpose of code generation. This is discussed in the message I pointed to above. > In addition, I think this feature is needed, let user configurate > xsd to generate class into several files, it is very important for > large .xsd files. If your schemas are split into several files and use include or import to access relevant information from each other, you will have the same split in the generated files. Besides that, I don't see any benefits of splitting one schema file into a multiple header/source files. Can you explain why you think it is an important feature? 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/20051124/0ae642a4/attachment.pgp From jboyden at geosci.usyd.edu.au Thu Nov 24 18:38:18 2005 From: jboyden at geosci.usyd.edu.au (James Boyden) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] plans for xsd 1.7.0 In-Reply-To: <20051122091510.GA20906@karelia> References: <20051122091510.GA20906@karelia> Message-ID: <20051124233818.GA16921@geosci.usyd.edu.au> On Tuesday, Nov 22, Boris Kolpackov wrote: > cxx-parser > > * Properties argument to parsing functions which allows to > programmatically specify schemas for instance document > validation. Hi Boris, Could you explain in greater detail what you mean by this item? Thanks, jb From boris at codesynthesis.com Fri Nov 25 02:40:16 2005 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] plans for xsd 1.7.0 In-Reply-To: <20051124233818.GA16921@geosci.usyd.edu.au> References: <20051122091510.GA20906@karelia> <20051124233818.GA16921@geosci.usyd.edu.au> Message-ID: <20051125074016.GA14470@karelia> James, James Boyden writes: > > * Properties argument to parsing functions which allows to > > programmatically specify schemas for instance document > > validation. > > Could you explain in greater detail what you mean by this item? This (and the previous item) are the same capabilities as were added to the cxx-tree mapping in the previous version. It is described in the following FAQ: 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/20051125/9d6247de/attachment.pgp From chenchang19760717 at yahoo.com Fri Nov 25 01:19:27 2005 From: chenchang19760717 at yahoo.com (Chang Chen) Date: Sun Oct 11 15:33:41 2009 Subject: [xsd-users] could someone provide msvc version xsd solution? Message-ID: <20051125061928.77472.qmail@web30601.mail.mud.yahoo.com> Clean Clean DocumentEmail false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} Hi Boris Ideally, I think we should not read the code which generatedby xsd and only focus on the xsd,but the reality is not, we should read the code: 1) When we beginto study this facility, we should read code for understanding what xsd can do. 2) When we debugthe code, we should read the code. If xsd generates a huge sourcefile, and many classes in it, we can not focus the class well which we shouldunderstand, and it is a heavy overhead for IDE (such as vs.net) to load it intomemory. Thanks Chang --------------------------------- Yahoo! Music Unlimited - Access over 1 million songs. Try it free. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codesynthesis.com/pipermail/xsd-users/attachments/20051124/dd4e6e09/attachment.htm From chenchang19760717 at yahoo.com Fri Nov 25 01:34:41 2005 From: chenchang19760717 at yahoo.com (Chang Chen) Date: Sun Oct 11 15:33:42 2009 Subject: [xsd-users] suggestion to optional template Message-ID: <20051125063441.53043.qmail@web30614.mail.mud.yahoo.com> Clean Clean DocumentEmail false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} Hi, I am reading the code which XSD generates, I find that theXSD use optional template for optional property. I suggest that declare operator == and !=to avoid the user can write code such as: ….. typedef ::xsd::cxx::tree::optional< xml_schema::string> string_container_; string_container_ s; string_container_ ss; …. //???? // problematic. // it will be compiled and make no sense, because it call optional::operator bool_convertible, // the return value is 0 or &optional::reset(). If (s == ss) {} If the userswrite if statement like the above, it may mean they want to compare theinternal auto_prt member, but if it is forbidden,we should declare operator == and != as private and do not implement it; and ifthis operation make sense, we should implement it. Thanks --------------------------------- Yahoo! Music Unlimited - Access over 1 million songs. Try it free. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codesynthesis.com/pipermail/xsd-users/attachments/20051124/efb54ec9/attachment.html From boris at codesynthesis.com Sun Nov 27 02:27:34 2005 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:33:42 2009 Subject: [xsd-users] suggestion to optional template In-Reply-To: <20051125063441.53043.qmail@web30614.mail.mud.yahoo.com> References: <20051125063441.53043.qmail@web30614.mail.mud.yahoo.com> Message-ID: <20051127072734.GA21333@karelia> Chang, Chang Chen writes: > I suggest that declare operator == and != I've added ==, !=, <, >, <=, >= for the sequence and optional containers. It will appear in the next release. Thanks for the suggestion. -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/20051127/efb60223/attachment.pgp