From boris at codesynthesis.com Tue Jun 1 12:20:20 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Jun 1 12:13:28 2010 Subject: [xsd-users] cxx-parser: run time difficulties with KML21.xsd In-Reply-To: <4C049B43.3070903@gmail.com> References: <4C027915.8030705@gmail.com> <4C049B43.3070903@gmail.com> Message-ID: Hi David, In the future please keep your replies CC'ed to the xsd-users mailing list as discussed in the posting guidelines: http://www.codesynthesis.com/support/posting-guidelines.xhtml David White writes: > Thank you very much Boris for your reply. > > Firstly, let me apologise for putting the opengis target namespace > in my email - this was not intentional as I am correctly using > "http://earth.google.com/kml/2.1" as you suggest. Does that mean you still cannot parse your XML documents with the generated sample driver implementation? If that's the case can you provide one such document so that I can take a look? > In relation to kml and polymorphism, I have to admit I am a bit > lost as to what to do. I have read your (excellent) documentation, > but find that the work required to write the pimpl files is more > than I can achieve at the moment. The sample implementations (that print the data) are actually there. What you need to do is connect everything using parser maps. > Have you already prepared implementation sources for kml? No, the parser implementations normally have application-specific logic. All this makes me think you have selected the wrong mapping. What is the reason for you to use C++/Parser? Have you considered C++/Tree which is much easier to use? Boris From dawhite32 at gmail.com Wed Jun 2 03:24:45 2010 From: dawhite32 at gmail.com (David White) Date: Wed Jun 2 03:22:27 2010 Subject: [xsd-users] cxx-parser: run time difficulties with KML21.xsd In-Reply-To: References: <4C027915.8030705@gmail.com> <4C049B43.3070903@gmail.com> Message-ID: <4C06073D.4020004@gmail.com> Hi Boris, > Does that mean you still cannot parse your XML documents with the > generated sample driver implementation? If that's the case can you > provide one such document so that I can take a look? No, and yes. At the bottom of this email is a sample kml file. If I generate cxx files via: xsd cxx-parser --force-overwrite --generate-test-driver --generate-noop-impl --generate-polymorphic --root-element kml --namespace-map http://earth.google.com/kml/2.1=kml kml21.xsd and run the app (using the sample below), it throws at the first catch with: error: no declaration found for element 'kml' I understand that this error is raised when the parser does not have or know the full path to the schema. If I add to the xml_schema::flags::dont_validate to the parse function, the app doesn't throw, but doesn't do anything either, I presume, because of a lack of polymorphic-aware code - right? Adding the path for the schema location doesn't seem to make a difference either. > The sample implementations (that print the data) are actually there. > What you need to do is connect everything using parser maps. A simple, kml21-pimpl example would be appreciated. > No, the parser implementations normally have application-specific > logic. All this makes me think you have selected the wrong mapping. > What is the reason for you to use C++/Parser? Have you considered > C++/Tree which is much easier to use? The reason for using cxx-parser is due to the lightening speed it offers over cxx-tree for extremely large xml files. I understand cxx-tree offers a more simple approach to parsing xml files, but the speed at which I can parse files using cxx-parser is second to none. Many thanks in advance. David. [Sample.kml] Jerilderie Town of Jerilderie #obi-normal 145.72925,-35.3565,16000.0 From boris at codesynthesis.com Wed Jun 2 09:05:45 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Jun 2 08:59:04 2010 Subject: [xsd-users] cxx-parser: run time difficulties with KML21.xsd In-Reply-To: <4C06073D.4020004@gmail.com> References: <4C027915.8030705@gmail.com> <4C049B43.3070903@gmail.com> <4C06073D.4020004@gmail.com> Message-ID: Hi David, David White writes: > No, and yes. At the bottom of this email is a sample kml file. Which is invalid per the KML schema. Just add the following attributes and try it without the dont_validate flag: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://earth.google.com/kml/2.1 kml21.xsd" > I understand that this error is raised when the parser does not have > or know the full path to the schema. If I add to the > xml_schema::flags::dont_validate to the parse function, the app doesn't > throw, but doesn't do anything either, I presume, because of a lack of > polymorphic-aware code - right? Yes, that's correct. > A simple, kml21-pimpl example would be appreciated. I have modified the test driver to add support for polymorphism: http://www.codesynthesis.com/~boris/tmp/kml21-pdriver.cxx For more information on how I did it, see this post: http://www.codesynthesis.com/pipermail/xsde-users/2009-November/000186.html > The reason for using cxx-parser is due to the lightening speed it > offers over cxx-tree for extremely large xml files. I understand > cxx-tree offers a more simple approach to parsing xml files, but > the speed at which I can parse files using cxx-parser is second > to none. Yes, I guess this is a valid reason. The alternative would be to use XSD/e and its C++/Hybrid mapping: http://www.codesynthesis.com/products/xsde/ Boris From bidski at bigpond.net.au Thu Jun 3 00:17:51 2010 From: bidski at bigpond.net.au (Bidski) Date: Thu Jun 3 00:18:17 2010 Subject: [xsd-users] libcult 1.4.6 make problems Message-ID: <7795C23840FE47C7BA283EE4714F846D@Panda> Hi all, Following the guide here to install everything listed there under MSYS, using the latest versions of everything. Everything seems to be going great until i get to libcult. I run make and enter all the options as it says but upon entering the last option the following is displayed in the shell using i386/i486/i586/i686 using i386/i486/i586 using i386/i486 using i386 using generic libcult-1.4.6/cult/eh/exception.o.d:1: *** multiple target patterns. Stop. Whats wrong here? Bidski From boris at codesynthesis.com Thu Jun 3 09:58:38 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Jun 3 09:52:12 2010 Subject: [xsd-users] libcult 1.4.6 make problems In-Reply-To: <7795C23840FE47C7BA283EE4714F846D@Panda> References: <7795C23840FE47C7BA283EE4714F846D@Panda> Message-ID: Hi Bidski, Bidski writes: > Following the guide here to install everything listed there under MSYS, > using the latest versions of everything. The guide shows how to do in the Cygwin environment, not MSYS. You may be able to do it in MSYS though we haven't tried it. Is there a particular reason why you want to build the compiler from the source instead of using a pre-built binary for Windows? > I run make and enter all the options as it says but upon entering > the last option the following is displayed in the shell > > [...] > > libcult-1.4.6/cult/eh/exception.o.d:1: *** multiple target patterns. Stop. A couple of things to check: 1. Make sure you use GNU make 3.81 (make --version) 2. Make sure there are no spaces in the path leading to the libcult If none of that helps, can you show the first few lines from the exception.o.d file? Boris From bidski at bigpond.net.au Thu Jun 3 15:53:20 2010 From: bidski at bigpond.net.au (Bidski) Date: Thu Jun 3 15:54:57 2010 Subject: [xsd-users] libcult 1.4.6 make problems In-Reply-To: References: <7795C23840FE47C7BA283EE4714F846D@Panda> Message-ID: Hello Boris, I have had problems with the pre-built binaries. Possibly because im compiling my projects with mingw and not visual studio. I understand that the guide is for Cygwin but its the closest thing I have to a guide for MSYS (as far as I can tell). $ make --version GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for i686-pc-msys There are no spaces in the path to libcult. Here are the first couple of lines of exception.o.d /mingw/libcult-1.4.6/cult/c:/mingw/libcult-1.4.6/cult/eh/exception.o.d \ /mingw/libcult-1.4.6/cult/c:/mingw/libcult-1.4.6/cult/eh/exception.o: \ /mingw/libcult-1.4.6/cult/c:/mingw/libcult-1.4.6/cult/eh/exception.cxx \ /mingw/libcult-1.4.6/cult/c:/mingw/libcult-1.4.6/cult/eh/exception.hxx \ /mingw/libcult-1.4.6/cult/c:/mingw/libcult-1.4.6/cult/types/fundamental.hxx \ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/cstddef \ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/stl/_prolog.h \ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/stl/_cprolog.h \ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/stl/config/features.h\ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/stl/_stlport_version.h \ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/stl/config/user_config.h \ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/stl/config/compat.h \ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/stl/config/host.h\ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/stl/config/_system.h \ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/stl/config/_gcc.h\ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/stl/config/_windows.h \ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/stl/config/stl_confix.h \ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/stl/debug/_debug.h\ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/stl/_cstddef.h \ /mingw/libcult-1.4.6/cult/c:\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/cstddef \ /mingw/libcult-1.4.6/cult/c:\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/mingw32/bits/c++config.h \ /mingw/libcult-1.4.6/cult/c:\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/mingw32/bits/os_defines.h \ /mingw/libcult-1.4.6/cult/c:\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/mingw32/bits/cpu_defines.h \ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/stddef.h \ /mingw/libcult-1.4.6/cult/c:\mingw\bin\../lib/gcc/mingw32/4.5.0/include/stddef.h \ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/stl/_epilog.h \ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/stl/_config_compat_post.h \ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/exception \ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/stl/_exception.h \ /mingw/libcult-1.4.6/cult/c:\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/exception \ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/typeinfo \ /mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/stl/_typeinfo.h \ /mingw/libcult-1.4.6/cult/c:\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/typeinfo/mingw/ libcult-1.4.6/cult/c:/mingw/libcult-1.4.6/cult/eh/exception.hxx:/mingw/libcult-1.4.6/cult/c:/mingw/libcult-1.4.6/cult/types/fundamental.hxx:/mingw/libcult-1.4.6/cult/c:/mingw/STLport-5.2.1/stlport/cstddef:RegardsBidski--------------------------------------------------From: "Boris Kolpackov" Sent: Thursday, June 03, 2010 11:58 PMTo: "Bidski" Cc: "CodeSynthesis XSD" Subject: Re: [xsd-users] libcult 1.4.6 make problems> Hi Bidski,>> Bidski writes:>>> Following the guide here to install everything listed there under MSYS,>> using the latest versions of everything.>> The guide shows how to do in the Cygwin environment, not MSYS. You> may be able to do it in MSYS though we haven't tried it. Is there> a particular reason why you want to build the compiler from the> source instead of using a pre-built binary for Windows?>>>> I run make and enter all the options as it says but upon entering>> the last option the following is displayed in the shell>>>> [...]>>>> libcult-1.4.6/cult/eh/exception.o.d:1: *** multiple target patterns.Stop.>> A couple of things to check:>> 1. Make sure you use GNU make 3.81 (make --version)> 2. Make sure there are no spaces in the path leading to the libcult>> If none of that helps, can you show the first few lines from the> exception.o.d file?>> Boris> From boris at codesynthesis.com Fri Jun 4 14:40:03 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri Jun 4 14:33:56 2010 Subject: [xsd-users] libcult 1.4.6 make problems In-Reply-To: References: <7795C23840FE47C7BA283EE4714F846D@Panda> Message-ID: Hi Bidski, Bidski writes: > I have had problems with the pre-built binaries. Possibly because im > compiling my projects with mingw and not visual studio. What kind of problems are you having? The pre-build binary works fine for both Visual Studio and MinGW. In fact, the binary that you are trying to build yourself will be identical to the pre-built one. > I understand that the guide is for Cygwin but its the closest thing > I have to a guide for MSYS (as far as I can tell). > > [...] > > Here are the first couple of lines of exception.o.d > /mingw/libcult-1.4.6/cult/c:/mingw/libcult-1.4.6/cult/eh/exception.o.d \ Yes, here is the problem. The path contains ':' and looks broken. I suggest that you either use the pre-built binary of use Cygwin to build one yourself. Boris From Vladimir.Vasilyev at samtec.de Mon Jun 7 05:10:37 2010 From: Vladimir.Vasilyev at samtec.de (Vladimir Vasilyev) Date: Mon Jun 7 06:26:38 2010 Subject: [xsd-users] How to determine if the xsd:QName is qualified? Message-ID: <6073A4082F6CC548B21CB5D385F37B07A03F48@exchangeserver.samtec.de> Hello, When I use a qualified name in my xsd/xml, i want to be able to find out if the name is qualified or not. As far as i found out there is a special function for that qname::qualified. Somehow in the following example i get that the "QName" is always qualified (from my point of view it is not qualified in the supplied xml): XSD: XML: John Doe Code: auto_ptr sm(supermen(argv[1])); if(sm->QName().present()) { cout << "Qual: " << sm->QName()->qualified() << endl; cout << "QName: " << sm->QName()->namespace_() << ":" << sm->QName()->name() << endl; } Output: Qual: 1 QName: MyNamespace:NCName What is wrong with my code, xsd or xml? How to determine if the xsd:QName "QName" is qualified or not? With regards Vladimir Vasilyev. From boris at codesynthesis.com Mon Jun 7 10:02:23 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Jun 7 16:29:26 2010 Subject: [xsd-users] How to determine if the xsd:QName is qualified? In-Reply-To: <6073A4082F6CC548B21CB5D385F37B07A03F48@exchangeserver.samtec.de> References: <6073A4082F6CC548B21CB5D385F37B07A03F48@exchangeserver.samtec.de> Message-ID: Hi Vladimir, Vladimir Vasilyev writes: > When I use a qualified name in my xsd/xml, i want to be able to find out > if the name is qualified or not. As far as i found out there is a > special function for that qname::qualified. > > Somehow in the following example i get that the "QName" is always > qualified (from my point of view it is not qualified in the supplied > xml): > > XSD: > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:mns="MyNamespace" > elementFormDefault="qualified" > > > > > > > > > > > XML: > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="MyNamespace supermen.xsd" > QName="NCName"> > John Doe > The "NCName" value is qualified in the above XML file because you have a default namespace declaration (xmlns="MyNamespace") which makes all names without an explicit namespace prefix end up in this namespace. If, however, we change the above XML like below, then the "NCName" value will be unqualified: John Doe Boris From boris at codesynthesis.com Tue Jun 8 06:23:57 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Jun 8 04:13:19 2010 Subject: [xsd-users] How to determine if the xsd:QName is qualified? In-Reply-To: <6073A4082F6CC548B21CB5D385F37B07A03F50@exchangeserver.samtec.de> References: <6073A4082F6CC548B21CB5D385F37B07A03F48@exchangeserver.samtec.de> <6073A4082F6CC548B21CB5D385F37B07A03F50@exchangeserver.samtec.de> Message-ID: Hi Vladimir, In the future please keep your replies CC'ed to the xsd-users mailing list as discussed in the posting guidelines: http://www.codesynthesis.com/support/posting-guidelines.xhtml Vladimir Vasilyev writes: > > The "NCName" value is qualified in the above XML file because you > > have a default namespace declaration (xmlns="MyNamespace") which > > makes all names without an explicit namespace prefix end up in > > this namespace. > > So it is completely the problem of XML, right? It has nothing to do with > Code Synthesis XSD, does it? This is not a problem per se. It is just how the QName built-in type works per the XML Schema specification: "QName represents XML qualified names. The ?value space? of QName is the set of tuples {namespace name, local part}, where namespace name is an anyURI and local part is an NCName. The ?lexical space? of QName is the set of strings that ?match? the QName production of [Namespaces in XML]. Note: The mapping between literals in the ?lexical space? and values in the ?value space? of QName requires a namespace declaration to be in scope for the context in which QName is used." http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#QName In other words, to resolve the lexical space representation of QName (e.g., "p:foo") to its value space (e.g., {http://www.example.com,foo}), the XML Schema processor has to perform the standard XML prefix-to-namespace resolution. > Could you please confirm that if i would work with XML using another API > i would get completely the same behaviour? Or is it xerces specifics? > ( > For example > http://java.sun.com/j2ee/1.4/docs/api/javax/xml/namespace/QName.html > says: > > QName represents a qualified name as defined in the XML specifications. > > The value of a QName contains a Namespace URI, local part and prefix. > > The prefix is included in QName to retain lexical information when > present in an XML input source. > > If not specified, the Namespace URI is set to "" (the empty string). If > not specified, the prefix is set to "" (the empty string). > ) I am not sure which specification Java follows, but the XML Schema spec clearly states that the value space of QName is a namespace/local name pair and does not include the prefix. Storing prefix in QName opens a big can of worms. For example, you may load XML that uses one prefix for a particular namespace and then save it using a different prefix for the same namespace. Should the prefix in QName now be disregarded or should we insert a namespace declaration in the resulting XML document every time such a value is serialized? Boris From dawhite32 at gmail.com Tue Jun 8 07:37:26 2010 From: dawhite32 at gmail.com (David White) Date: Tue Jun 8 07:40:25 2010 Subject: [xsd-users] cxx-parser: run time difficulties with KML21.xsd In-Reply-To: References: <4C027915.8030705@gmail.com> <4C049B43.3070903@gmail.com> <4C06073D.4020004@gmail.com> Message-ID: <4C0E2B76.40700@gmail.com> Hi Boris, > Which is invalid per the KML schema. Just add the following attributes > and try it without the dont_validate flag: > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://earth.google.com/kml/2.1 kml21.xsd" > Ok, Done. > I have modified the test driver to add support for polymorphism: > > http://www.codesynthesis.com/~boris/tmp/kml21-pdriver.cxx > Thank you for doing this. Sorry to be a pest - something is still amiss. Can you confirm whether you compiled this file and parsed a sample kml file? After compiling, I am still getting the error message error: Unknown element 'kml' For clarity, I ran xsd cxx-parser --force-overwrite --generate-print-impl --generate-polymorphic --root-element kml --namespace-map http://earth.google.com/kml/2.1=kml kml21.xsd which produced kml21-pskel.cxx/hxx and kml21-pimpl.cxx/hxx. I added true to the list of arguments passed to the ml_schema::document constructor in your kml21-pdriver.cxx. ::xml_schema::document doc_p ( KmlType_p_, "http://earth.google.com/kml/2.1", "kml", true); All files compile OK. Thanks again, David. Jerilderie Town of Jerilderie #obi-normal 145.72925,-35.3565,16000.0 From Laura_E_Fowler at raytheon.com Tue Jun 8 14:01:35 2010 From: Laura_E_Fowler at raytheon.com (Laura E Fowler) Date: Tue Jun 8 14:07:52 2010 Subject: [xsd-users] Compatibility question between XSD 3.2 or greater and xerces-c 2.8 Message-ID: I know you recommend using xerces-c 3.x when using XSD 3.2 or greater, but what are the implications of using xerces-c 2.8? We have a platform where we are locked into xerces-c 2.8, but are considering upgrading to the latest XSD version. Will we have so many problems that we shouldn't consider upgrading from 3.1? Any information you can provide to help us decide would be appreciated. Thanks, Laura From boris at codesynthesis.com Wed Jun 9 03:41:35 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Jun 9 01:31:01 2010 Subject: [xsd-users] cxx-parser: run time difficulties with KML21.xsd In-Reply-To: <4C0E2B76.40700@gmail.com> References: <4C027915.8030705@gmail.com> <4C049B43.3070903@gmail.com> <4C06073D.4020004@gmail.com> <4C0E2B76.40700@gmail.com> Message-ID: Hi David, David White writes: > Sorry to be a pest - something is still amiss. Can you confirm > whether you compiled this file and parsed a sample kml file? > After compiling, I am still getting the error message > > error: Unknown element 'kml' You seem to have accidently removed the namespace declaration attribute: xmlns="http://earth.google.com/kml/2.1" If I add it back (see the attached document), I get the following: kml.xml:26:7 error: element 'Style' is not allowed for content model 'All(NetworkLinkControl?,Feature?)' If I remove the Style element, I get the following: name: Jerilderie description: Town of Jerilderie styleUrl: #obi-normal string: 145.72925,-35.3565,16000.0 > I added true to the list of arguments passed to the ml_schema::document > constructor in your kml21-pdriver.cxx. Yes, this is needed and I forgot to do that. I re-uploaded the fixed version. Boris -------------- next part -------------- A non-text attachment was scrubbed... Name: kml.xml Type: application/xml Size: 633 bytes Desc: not available Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20100609/6d726f5b/kml.xml From boris at codesynthesis.com Wed Jun 9 03:51:12 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Jun 9 01:40:33 2010 Subject: [xsd-users] Compatibility question between XSD 3.2 or greater and xerces-c 2.8 In-Reply-To: References: Message-ID: Hi Laura, Laura E Fowler writes: > I know you recommend using xerces-c 3.x when using XSD 3.2 or greater, but > what are the implications of using xerces-c 2.8? We have a platform where > we are locked into xerces-c 2.8, but are considering upgrading to the > latest XSD version. Will we have so many problems that we shouldn't > consider upgrading from 3.1? Any information you can provide to help us > decide would be appreciated. In XSD 3.x we support both Xerces-C++ 3 and 2-series so both should work equally well sans the differences in Xerces-C++ itself. I think it is pretty safe for you to upgrade to the latest version of XSD, which is 3.3.0. At the same time, in the next major release of XSD (4.0.0) we are going to drop support for Xerces-C++ 2-series. We may still make bugfix- only releases for XSD 3.3 should they be needed though no new features will be added. Boris From dawhite32 at gmail.com Thu Jun 10 06:41:54 2010 From: dawhite32 at gmail.com (David White) Date: Thu Jun 10 06:39:29 2010 Subject: [xsd-users] cxx-parser: run time difficulties with KML21.xsd In-Reply-To: References: <4C027915.8030705@gmail.com> <4C049B43.3070903@gmail.com> <4C06073D.4020004@gmail.com> <4C0E2B76.40700@gmail.com> Message-ID: <4C10C172.6010407@gmail.com> Great - looks like that's got it. Thanks for your help Boris. Keep up the good work. David On 09/06/10 17:41, Boris Kolpackov wrote: > Hi David, > > David White writes: > >> Sorry to be a pest - something is still amiss. Can you confirm >> whether you compiled this file and parsed a sample kml file? >> After compiling, I am still getting the error message >> >> error: Unknown element 'kml' > > You seem to have accidently removed the namespace declaration attribute: > > xmlns="http://earth.google.com/kml/2.1" > > If I add it back (see the attached document), I get the following: > > kml.xml:26:7 error: element 'Style' is not allowed for content model > 'All(NetworkLinkControl?,Feature?)' > > If I remove the Style element, I get the following: > > name: Jerilderie > description: Town of Jerilderie > styleUrl: #obi-normal > string: 145.72925,-35.3565,16000.0 > >> I added true to the list of arguments passed to the ml_schema::document >> constructor in your kml21-pdriver.cxx. > > Yes, this is needed and I forgot to do that. I re-uploaded the fixed > version. > > Boris From bschindler at inf.ethz.ch Tue Jun 15 04:03:04 2010 From: bschindler at inf.ethz.ch (Benjamin Schindler) Date: Tue Jun 15 04:04:13 2010 Subject: [xsd-users] PATH in xsd installer Message-ID: <4C1733B8.0@inf.ethz.ch> Hi I just tried out the installer so it can replace our built-in copy of dll's, libs etc of xsd. The problem I have is that the installer by default sets /codesyntehsispath/bin to PATH and not bin64. Our project is 64bit and would not work with this default Would there be the possibility to create separate installers for 64bit 32bit or could there be some other solution? Thank you Benjamin Schindler From boris at codesynthesis.com Tue Jun 15 07:12:34 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Jun 15 05:01:51 2010 Subject: [xsd-users] PATH in xsd installer In-Reply-To: <4C1733B8.0@inf.ethz.ch> References: <4C1733B8.0@inf.ethz.ch> Message-ID: Hi Benjamin, Benjamin Schindler writes: > I just tried out the installer so it can replace our built-in copy of > dll's, libs etc of xsd. The problem I have is that the installer by > default sets /codesyntehsispath/bin to PATH and not bin64. > > Our project is 64bit and would not work with this default The Windows .msi installer has the following layout: The bin/ directory contains xsd.exe (the XSD compiler itself) which is always a 32-bit application on Windows plus the 32-bit Xerces-C++ DLLs. The xsd.exe binary is statically-linked and does not depend on the the Xerces-C++ DLLs. The bin64/ directory contains the 64-bit Xerces-C++ DLLs. Unfortunately, Windows does not provide good support for having both 32-bit and 64-bit libraries in the PATH environment variable (i.e., there is no PATH64). So in the .msi installer we only add the bin/ directory to PATH. > Would there be the possibility to create separate installers for 64bit > 32bit or could there be some other solution? Yes, it is possible to create a special version of the installer that only contains the 64-bit libraries and adds bin64/ instead of bin/ to PATH. The other option would be to add bin64/ in addition to bin/ to PATH; this way if you don't install any 32-bit libraries the 64-bit versions will be used automatically. Yet another option would be to have a GUI element in the installer that allows you to control which versions of the libraries (32 or 64) are preferred. I think I like the last option the best. Would that work for you? Boris From bschindler at inf.ethz.ch Tue Jun 15 05:07:10 2010 From: bschindler at inf.ethz.ch (Benjamin Schindler) Date: Tue Jun 15 05:08:16 2010 Subject: [xsd-users] PATH in xsd installer In-Reply-To: References: <4C1733B8.0@inf.ethz.ch> Message-ID: <4C1742BE.5010408@inf.ethz.ch> Hi Boris On 06/15/2010 01:12 PM, Boris Kolpackov wrote: > Hi Benjamin, > > Benjamin Schindler writes: > >> I just tried out the installer so it can replace our built-in copy of >> dll's, libs etc of xsd. The problem I have is that the installer by >> default sets /codesyntehsispath/bin to PATH and not bin64. >> >> Our project is 64bit and would not work with this default > > The Windows .msi installer has the following layout: The bin/ directory > contains xsd.exe (the XSD compiler itself) which is always a 32-bit > application on Windows plus the 32-bit Xerces-C++ DLLs. The xsd.exe > binary is statically-linked and does not depend on the the Xerces-C++ > DLLs. The bin64/ directory contains the 64-bit Xerces-C++ DLLs. > > Unfortunately, Windows does not provide good support for having both > 32-bit and 64-bit libraries in the PATH environment variable (i.e., > there is no PATH64). So in the .msi installer we only add the bin/ > directory to PATH. > > >> Would there be the possibility to create separate installers for 64bit >> 32bit or could there be some other solution? > > Yes, it is possible to create a special version of the installer that > only contains the 64-bit libraries and adds bin64/ instead of bin/ to > PATH. The other option would be to add bin64/ in addition to bin/ > to PATH; this way if you don't install any 32-bit libraries the 64-bit > versions will be used automatically. Yet another option would be to > have a GUI element in the installer that allows you to control which > versions of the libraries (32 or 64) are preferred. I think I like > the last option the best. Would that work for you? All options would work for me. The only thing you have to make sure: the xsd.exe probably uses the dll's, so the 32bit dll's must always be present. Also, if bin doesn't go into PATH, typing xsd.exe wouldn't work, so I'd probably put both path's in or ship a 64bit xsd.exe... But in the end - what works best for you. I just don't want my users to force editing environment variables before things work Cheers Benjamin > > Boris From boris at codesynthesis.com Wed Jun 16 08:41:01 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Jun 16 06:30:18 2010 Subject: [xsd-users] PATH in xsd installer In-Reply-To: <4C1742BE.5010408@inf.ethz.ch> References: <4C1733B8.0@inf.ethz.ch> <4C1742BE.5010408@inf.ethz.ch> Message-ID: Hi Benjamin, Benjamin Schindler writes: > > Unfortunately, Windows does not provide good support for having both > > 32-bit and 64-bit libraries in the PATH environment variable (i.e., > > there is no PATH64). So in the .msi installer we only add the bin/ > > directory to PATH. I was too quick to bash Windows -- it turns out you can have directories in PATH containing 32-bit and 64-bit DLLs and the dynamic loader will use the correct version depending on the application. So the solution in case of the XSD .msi installer is to simply add both bin/ and bin64/ to PATH. I have built the new installer for you to try: http://codesynthesis.com/~boris/tmp/xsd-3.3-1.msi Can you let me know if it does the right thing in your situation? Boris From bschindler at student.ethz.ch Wed Jun 16 06:50:51 2010 From: bschindler at student.ethz.ch (Benjamin Schindler) Date: Wed Jun 16 06:51:01 2010 Subject: [xsd-users] PATH in xsd installer In-Reply-To: References: <4C1733B8.0@inf.ethz.ch> <4C1742BE.5010408@inf.ethz.ch> Message-ID: <1276685451.5736.13.camel@hundertwasser.inf.ethz.ch> Hi Boris On Wed, 2010-06-16 at 14:41 +0200, Boris Kolpackov wrote: > Hi Benjamin, > > Benjamin Schindler writes: > > > > Unfortunately, Windows does not provide good support for having both > > > 32-bit and 64-bit libraries in the PATH environment variable (i.e., > > > there is no PATH64). So in the .msi installer we only add the bin/ > > > directory to PATH. > > I was too quick to bash Windows -- it turns out you can have directories > in PATH containing 32-bit and 64-bit DLLs and the dynamic loader will use > the correct version depending on the application. > > So the solution in case of the XSD .msi installer is to simply add both > bin/ and bin64/ to PATH. I have built the new installer for you to try: > > http://codesynthesis.com/~boris/tmp/xsd-3.3-1.msi > > Can you let me know if it does the right thing in your situation? it does work here Cheers Benjamin > > Boris From Abhijit.Sovakar at cae.de Thu Jun 17 01:59:20 2010 From: Abhijit.Sovakar at cae.de (Abhijit Sovakar) Date: Thu Jun 17 02:06:53 2010 Subject: [xsd-users] WG: CodeSynthesis problem Message-ID: <74C7EC991D7DFB41A525D22BFD4E090805ADECEB12@sdestex2> Hi, We need C++ XML Bindings and we are in the phase of evaluating various tools. Amongst other tools we are investigating the usability of XSD (v3.3.0). We generated C++ classes for the EDXL-DE schema with CodeSynthesis. ( command line: xsd cxx-tree --generate-serialization --generate-doxygen --namespace-map urn:oasis:names:tc:emergency:EDXL:DE:1.0=edxl::de EDXL-DE.xsd ) Xsd wrote the the EDXL-DE.cxx and .hxx files and we wrote a simple test application (main.cpp), which tries to read the file edxl_test.xml, which complies to the schema. 1st Problem: However the generated code wasn?t able to read the xml file due to namespace issues. The generated code checks the elements for the namespace but fails to read/set it before: EXDL-de.cxx line 1121 ? 1127: const ::xercesc::DOMElement& i (p.cur_element ()); const ::xsd::cxx::xml::qualified_name< char > n ( ::xsd::cxx::xml::dom::name< char > (i)); // contentDescription // if (n.name () == "contentDescription" && n.namespace_ () == "urn:oasis:names:tc:emergency:EDXL:DE:1.0") n.namespace_ never gets a vaule thus the tests fail. After removing the namespace tests the edxl_test.xml file can be read. 2.Problem: We initialized an EDXLDistribution element and wrote that to stdout. If using that output as input, it can?t be read as well as the p1 namespace alias is treated as element name. Are we using the xsd tool wrong? Do you have any suggestions how to solve these problems? Kind regards, Abhijit Sovakar Senior Software Engineer Dipl.-Inform. CAE Elektronik GmbH Simulation Products and Military Training & Services 52220 Stolberg, Germany Tel: +49 2402 106 540 Fax: +49 2402 106 8540 eMail: abhijit.sovakar@cae.com Managing Director: Ulrich Aderhold Trade Register No.: HRB 11615 County Court Eschweiler -- This email was Anti Virus checked by CAE -------------- next part -------------- A non-text attachment was scrubbed... Name: EDXL-DE.xsd Type: text/xml Size: 6073 bytes Desc: EDXL-DE.xsd Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20100617/c5998748/EDXL-DE-0001.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: EDXL-DE.cxx Type: application/octet-stream Size: 91115 bytes Desc: EDXL-DE.cxx Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20100617/c5998748/EDXL-DE-0001.obj -------------- next part -------------- // Copyright (C) 2005-2010 Code Synthesis Tools CC // // This program was generated by CodeSynthesis XSD, an XML Schema to // C++ data binding compiler. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as // published by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // // In addition, as a special exception, Code Synthesis Tools CC gives // permission to link this program with the Xerces-C++ library (or with // modified versions of Xerces-C++ that use the same license as Xerces-C++), // and distribute linked combinations including the two. You must obey // the GNU General Public License version 2 in all respects for all of // the code used other than Xerces-C++. If you modify this copy of the // program, you may extend this exception to your version of the program, // but you are not obligated to do so. If you do not wish to do so, delete // this exception statement from your version. // // Furthermore, Code Synthesis Tools CC makes a special exception for // the Free/Libre and Open Source Software (FLOSS) which is described // in the accompanying FLOSSE file. // /** * @file * @brief Generated from EDXL-DE.xsd. */ #ifndef EDXL_DE_HXX #define EDXL_DE_HXX // Begin prologue. // // // End prologue. #include #if (XSD_INT_VERSION != 3030000L) #error XSD runtime version mismatch #endif #include #ifndef XSD_USE_CHAR #define XSD_USE_CHAR #endif #ifndef XSD_CXX_TREE_USE_CHAR #define XSD_CXX_TREE_USE_CHAR #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /** * @brief C++ namespace for the %http://www.w3.org/2001/XMLSchema * schema namespace. */ namespace xml_schema { // anyType and anySimpleType. // /** * @brief C++ type corresponding to the anyType XML Schema * built-in type. */ typedef ::xsd::cxx::tree::type type; /** * @brief C++ type corresponding to the anySimpleType XML Schema * built-in type. */ typedef ::xsd::cxx::tree::simple_type< type > simple_type; /** * @brief Alias for the anyType type. */ typedef ::xsd::cxx::tree::type container; // 8-bit // /** * @brief C++ type corresponding to the byte XML Schema * built-in type. */ typedef signed char byte; /** * @brief C++ type corresponding to the unsignedByte XML Schema * built-in type. */ typedef unsigned char unsigned_byte; // 16-bit // /** * @brief C++ type corresponding to the short XML Schema * built-in type. */ typedef short short_; /** * @brief C++ type corresponding to the unsignedShort XML Schema * built-in type. */ typedef unsigned short unsigned_short; // 32-bit // /** * @brief C++ type corresponding to the int XML Schema * built-in type. */ typedef int int_; /** * @brief C++ type corresponding to the unsignedInt XML Schema * built-in type. */ typedef unsigned int unsigned_int; // 64-bit // /** * @brief C++ type corresponding to the long XML Schema * built-in type. */ typedef long long long_; /** * @brief C++ type corresponding to the unsignedLong XML Schema * built-in type. */ typedef unsigned long long unsigned_long; // Supposed to be arbitrary-length integral types. // /** * @brief C++ type corresponding to the integer XML Schema * built-in type. */ typedef long long integer; /** * @brief C++ type corresponding to the nonPositiveInteger XML Schema * built-in type. */ typedef long long non_positive_integer; /** * @brief C++ type corresponding to the nonNegativeInteger XML Schema * built-in type. */ typedef unsigned long long non_negative_integer; /** * @brief C++ type corresponding to the positiveInteger XML Schema * built-in type. */ typedef unsigned long long positive_integer; /** * @brief C++ type corresponding to the negativeInteger XML Schema * built-in type. */ typedef long long negative_integer; // Boolean. // /** * @brief C++ type corresponding to the boolean XML Schema * built-in type. */ typedef bool boolean; // Floating-point types. // /** * @brief C++ type corresponding to the float XML Schema * built-in type. */ typedef float float_; /** * @brief C++ type corresponding to the double XML Schema * built-in type. */ typedef double double_; /** * @brief C++ type corresponding to the decimal XML Schema * built-in type. */ typedef double decimal; // String types. // /** * @brief C++ type corresponding to the string XML Schema * built-in type. */ typedef ::xsd::cxx::tree::string< char, simple_type > string; /** * @brief C++ type corresponding to the normalizedString XML Schema * built-in type. */ typedef ::xsd::cxx::tree::normalized_string< char, string > normalized_string; /** * @brief C++ type corresponding to the token XML Schema * built-in type. */ typedef ::xsd::cxx::tree::token< char, normalized_string > token; /** * @brief C++ type corresponding to the Name XML Schema * built-in type. */ typedef ::xsd::cxx::tree::name< char, token > name; /** * @brief C++ type corresponding to the NMTOKEN XML Schema * built-in type. */ typedef ::xsd::cxx::tree::nmtoken< char, token > nmtoken; /** * @brief C++ type corresponding to the NMTOKENS XML Schema * built-in type. */ typedef ::xsd::cxx::tree::nmtokens< char, simple_type, nmtoken > nmtokens; /** * @brief C++ type corresponding to the NCName XML Schema * built-in type. */ typedef ::xsd::cxx::tree::ncname< char, name > ncname; /** * @brief C++ type corresponding to the language XML Schema * built-in type. */ typedef ::xsd::cxx::tree::language< char, token > language; // ID/IDREF. // /** * @brief C++ type corresponding to the ID XML Schema * built-in type. */ typedef ::xsd::cxx::tree::id< char, ncname > id; /** * @brief C++ type corresponding to the IDREF XML Schema * built-in type. */ typedef ::xsd::cxx::tree::idref< char, ncname, type > idref; /** * @brief C++ type corresponding to the IDREFS XML Schema * built-in type. */ typedef ::xsd::cxx::tree::idrefs< char, simple_type, idref > idrefs; // URI. // /** * @brief C++ type corresponding to the anyURI XML Schema * built-in type. */ typedef ::xsd::cxx::tree::uri< char, simple_type > uri; // Qualified name. // /** * @brief C++ type corresponding to the QName XML Schema * built-in type. */ typedef ::xsd::cxx::tree::qname< char, simple_type, uri, ncname > qname; // Binary. // /** * @brief Binary buffer type. */ typedef ::xsd::cxx::tree::buffer< char > buffer; /** * @brief C++ type corresponding to the base64Binary XML Schema * built-in type. */ typedef ::xsd::cxx::tree::base64_binary< char, simple_type > base64_binary; /** * @brief C++ type corresponding to the hexBinary XML Schema * built-in type. */ typedef ::xsd::cxx::tree::hex_binary< char, simple_type > hex_binary; // Date/time. // /** * @brief Time zone type. */ typedef ::xsd::cxx::tree::time_zone time_zone; /** * @brief C++ type corresponding to the date XML Schema * built-in type. */ typedef ::xsd::cxx::tree::date< char, simple_type > date; /** * @brief C++ type corresponding to the dateTime XML Schema * built-in type. */ typedef ::xsd::cxx::tree::date_time< char, simple_type > date_time; /** * @brief C++ type corresponding to the duration XML Schema * built-in type. */ typedef ::xsd::cxx::tree::duration< char, simple_type > duration; /** * @brief C++ type corresponding to the gDay XML Schema * built-in type. */ typedef ::xsd::cxx::tree::gday< char, simple_type > gday; /** * @brief C++ type corresponding to the gMonth XML Schema * built-in type. */ typedef ::xsd::cxx::tree::gmonth< char, simple_type > gmonth; /** * @brief C++ type corresponding to the gMonthDay XML Schema * built-in type. */ typedef ::xsd::cxx::tree::gmonth_day< char, simple_type > gmonth_day; /** * @brief C++ type corresponding to the gYear XML Schema * built-in type. */ typedef ::xsd::cxx::tree::gyear< char, simple_type > gyear; /** * @brief C++ type corresponding to the gYearMonth XML Schema * built-in type. */ typedef ::xsd::cxx::tree::gyear_month< char, simple_type > gyear_month; /** * @brief C++ type corresponding to the time XML Schema * built-in type. */ typedef ::xsd::cxx::tree::time< char, simple_type > time; // Entity. // /** * @brief C++ type corresponding to the ENTITY XML Schema * built-in type. */ typedef ::xsd::cxx::tree::entity< char, ncname > entity; /** * @brief C++ type corresponding to the ENTITIES XML Schema * built-in type. */ typedef ::xsd::cxx::tree::entities< char, simple_type, entity > entities; // Namespace information and list stream. Used in // serialization functions. // /** * @brief Namespace serialization information. */ typedef ::xsd::cxx::xml::dom::namespace_info< char > namespace_info; /** * @brief Namespace serialization information map. */ typedef ::xsd::cxx::xml::dom::namespace_infomap< char > namespace_infomap; /** * @brief List serialization stream. */ typedef ::xsd::cxx::tree::list_stream< char > list_stream; /** * @brief Serialization wrapper for the %double type. */ typedef ::xsd::cxx::tree::as_double< double_ > as_double; /** * @brief Serialization wrapper for the %decimal type. */ typedef ::xsd::cxx::tree::as_decimal< decimal > as_decimal; /** * @brief Simple type facet. */ typedef ::xsd::cxx::tree::facet facet; // Flags and properties. // /** * @brief Parsing and serialization flags. */ typedef ::xsd::cxx::tree::flags flags; /** * @brief Parsing properties. */ typedef ::xsd::cxx::tree::properties< char > properties; // Parsing/serialization diagnostics. // /** * @brief Error severity. */ typedef ::xsd::cxx::tree::severity severity; /** * @brief Error condition. */ typedef ::xsd::cxx::tree::error< char > error; /** * @brief List of %error conditions. */ typedef ::xsd::cxx::tree::diagnostics< char > diagnostics; // Exceptions. // /** * @brief Root of the C++/Tree %exception hierarchy. */ typedef ::xsd::cxx::tree::exception< char > exception; /** * @brief Exception indicating that the size argument exceeds * the capacity argument. */ typedef ::xsd::cxx::tree::bounds< char > bounds; /** * @brief Exception indicating that a duplicate ID value * was encountered in the object model. */ typedef ::xsd::cxx::tree::duplicate_id< char > duplicate_id; /** * @brief Exception indicating a parsing failure. */ typedef ::xsd::cxx::tree::parsing< char > parsing; /** * @brief Exception indicating that an expected element * was not encountered. */ typedef ::xsd::cxx::tree::expected_element< char > expected_element; /** * @brief Exception indicating that an unexpected element * was encountered. */ typedef ::xsd::cxx::tree::unexpected_element< char > unexpected_element; /** * @brief Exception indicating that an expected attribute * was not encountered. */ typedef ::xsd::cxx::tree::expected_attribute< char > expected_attribute; /** * @brief Exception indicating that an unexpected enumerator * was encountered. */ typedef ::xsd::cxx::tree::unexpected_enumerator< char > unexpected_enumerator; /** * @brief Exception indicating that the text content was * expected for an element. */ typedef ::xsd::cxx::tree::expected_text_content< char > expected_text_content; /** * @brief Exception indicating that a prefix-namespace * mapping was not provided. */ typedef ::xsd::cxx::tree::no_prefix_mapping< char > no_prefix_mapping; /** * @brief Exception indicating a serialization failure. */ typedef ::xsd::cxx::tree::serialization< char > serialization; /** * @brief Error handler callback interface. */ typedef ::xsd::cxx::xml::error_handler< char > error_handler; /** * @brief DOM interaction. */ namespace dom { /** * @brief Automatic pointer for DOMDocument. */ using ::xsd::cxx::xml::dom::auto_ptr; #ifndef XSD_CXX_TREE_TREE_NODE_KEY__XML_SCHEMA #define XSD_CXX_TREE_TREE_NODE_KEY__XML_SCHEMA /** * @brief DOM user data key for back pointers to tree nodes. */ const XMLCh* const tree_node_key = ::xsd::cxx::tree::user_data_keys::node; #endif } } // Forward declarations. // namespace edxl { namespace de { class contentObjectType; class nonXMLContentType; class xmlContentType; class anyXMLType; class valueListType; class valueSchemeType; class targetAreaType; class statusValues; class typeValues; class EDXLDistribution; } } #include // std::auto_ptr #include // std::numeric_limits #include // std::binary_search #include #include #include #include #include #include namespace edxl { /** * @brief C++ namespace for the %urn:oasis:names:tc:emergency:EDXL:DE:1.0 * schema namespace. */ namespace de { /** * @brief Class corresponding to the %contentObjectType schema type. * * @nosubgrouping */ class contentObjectType: public ::xml_schema::type { public: /** * @name contentDescription * * @brief Accessor and modifier functions for the %contentDescription * optional element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string contentDescription_type; /** * @brief Element optional container type. */ typedef ::xsd::cxx::tree::optional< contentDescription_type > contentDescription_optional; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< contentDescription_type, char > contentDescription_traits; /** * @brief Return a read-only (constant) reference to the element * container. * * @return A constant reference to the optional container. */ const contentDescription_optional& contentDescription () const; /** * @brief Return a read-write reference to the element container. * * @return A reference to the optional container. */ contentDescription_optional& contentDescription (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void contentDescription (const contentDescription_type& x); /** * @brief Set the element value. * * @param x An optional container with the new value to set. * * If the value is present in @a x then this function makes a copy * of this value and sets it as the new value of the element. * Otherwise the element container is set the 'not present' state. */ void contentDescription (const contentDescription_optional& x); /** * @brief Set the element value without copying. * * @param p A new value to use. * * This function will try to use the passed value directly instead * of making a copy. */ void contentDescription (::std::auto_ptr< contentDescription_type > p); //@} /** * @name contentKeyword * * @brief Accessor and modifier functions for the %contentKeyword * sequence element. */ //@{ /** * @brief Element type. */ typedef ::edxl::de::valueListType contentKeyword_type; /** * @brief Element sequence container type. */ typedef ::xsd::cxx::tree::sequence< contentKeyword_type > contentKeyword_sequence; /** * @brief Element iterator type. */ typedef contentKeyword_sequence::iterator contentKeyword_iterator; /** * @brief Element constant iterator type. */ typedef contentKeyword_sequence::const_iterator contentKeyword_const_iterator; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< contentKeyword_type, char > contentKeyword_traits; /** * @brief Return a read-only (constant) reference to the element * sequence. * * @return A constant reference to the sequence container. */ const contentKeyword_sequence& contentKeyword () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ contentKeyword_sequence& contentKeyword (); /** * @brief Copy elements from a given sequence. * * @param s A sequence to copy elements from. * * For each element in @a s this function makes a copy and adds it * to the sequence. Note that this operation completely changes the * sequence and all old elements will be lost. */ void contentKeyword (const contentKeyword_sequence& s); //@} /** * @name incidentID * * @brief Accessor and modifier functions for the %incidentID * optional element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string incidentID_type; /** * @brief Element optional container type. */ typedef ::xsd::cxx::tree::optional< incidentID_type > incidentID_optional; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< incidentID_type, char > incidentID_traits; /** * @brief Return a read-only (constant) reference to the element * container. * * @return A constant reference to the optional container. */ const incidentID_optional& incidentID () const; /** * @brief Return a read-write reference to the element container. * * @return A reference to the optional container. */ incidentID_optional& incidentID (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void incidentID (const incidentID_type& x); /** * @brief Set the element value. * * @param x An optional container with the new value to set. * * If the value is present in @a x then this function makes a copy * of this value and sets it as the new value of the element. * Otherwise the element container is set the 'not present' state. */ void incidentID (const incidentID_optional& x); /** * @brief Set the element value without copying. * * @param p A new value to use. * * This function will try to use the passed value directly instead * of making a copy. */ void incidentID (::std::auto_ptr< incidentID_type > p); //@} /** * @name incidentDescription * * @brief Accessor and modifier functions for the %incidentDescription * optional element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string incidentDescription_type; /** * @brief Element optional container type. */ typedef ::xsd::cxx::tree::optional< incidentDescription_type > incidentDescription_optional; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< incidentDescription_type, char > incidentDescription_traits; /** * @brief Return a read-only (constant) reference to the element * container. * * @return A constant reference to the optional container. */ const incidentDescription_optional& incidentDescription () const; /** * @brief Return a read-write reference to the element container. * * @return A reference to the optional container. */ incidentDescription_optional& incidentDescription (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void incidentDescription (const incidentDescription_type& x); /** * @brief Set the element value. * * @param x An optional container with the new value to set. * * If the value is present in @a x then this function makes a copy * of this value and sets it as the new value of the element. * Otherwise the element container is set the 'not present' state. */ void incidentDescription (const incidentDescription_optional& x); /** * @brief Set the element value without copying. * * @param p A new value to use. * * This function will try to use the passed value directly instead * of making a copy. */ void incidentDescription (::std::auto_ptr< incidentDescription_type > p); //@} /** * @name originatorRole * * @brief Accessor and modifier functions for the %originatorRole * sequence element. */ //@{ /** * @brief Element type. */ typedef ::edxl::de::valueListType originatorRole_type; /** * @brief Element sequence container type. */ typedef ::xsd::cxx::tree::sequence< originatorRole_type > originatorRole_sequence; /** * @brief Element iterator type. */ typedef originatorRole_sequence::iterator originatorRole_iterator; /** * @brief Element constant iterator type. */ typedef originatorRole_sequence::const_iterator originatorRole_const_iterator; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< originatorRole_type, char > originatorRole_traits; /** * @brief Return a read-only (constant) reference to the element * sequence. * * @return A constant reference to the sequence container. */ const originatorRole_sequence& originatorRole () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ originatorRole_sequence& originatorRole (); /** * @brief Copy elements from a given sequence. * * @param s A sequence to copy elements from. * * For each element in @a s this function makes a copy and adds it * to the sequence. Note that this operation completely changes the * sequence and all old elements will be lost. */ void originatorRole (const originatorRole_sequence& s); //@} /** * @name consumerRole * * @brief Accessor and modifier functions for the %consumerRole * sequence element. */ //@{ /** * @brief Element type. */ typedef ::edxl::de::valueListType consumerRole_type; /** * @brief Element sequence container type. */ typedef ::xsd::cxx::tree::sequence< consumerRole_type > consumerRole_sequence; /** * @brief Element iterator type. */ typedef consumerRole_sequence::iterator consumerRole_iterator; /** * @brief Element constant iterator type. */ typedef consumerRole_sequence::const_iterator consumerRole_const_iterator; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< consumerRole_type, char > consumerRole_traits; /** * @brief Return a read-only (constant) reference to the element * sequence. * * @return A constant reference to the sequence container. */ const consumerRole_sequence& consumerRole () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ consumerRole_sequence& consumerRole (); /** * @brief Copy elements from a given sequence. * * @param s A sequence to copy elements from. * * For each element in @a s this function makes a copy and adds it * to the sequence. Note that this operation completely changes the * sequence and all old elements will be lost. */ void consumerRole (const consumerRole_sequence& s); //@} /** * @name confidentiality * * @brief Accessor and modifier functions for the %confidentiality * optional element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string confidentiality_type; /** * @brief Element optional container type. */ typedef ::xsd::cxx::tree::optional< confidentiality_type > confidentiality_optional; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< confidentiality_type, char > confidentiality_traits; /** * @brief Return a read-only (constant) reference to the element * container. * * @return A constant reference to the optional container. */ const confidentiality_optional& confidentiality () const; /** * @brief Return a read-write reference to the element container. * * @return A reference to the optional container. */ confidentiality_optional& confidentiality (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void confidentiality (const confidentiality_type& x); /** * @brief Set the element value. * * @param x An optional container with the new value to set. * * If the value is present in @a x then this function makes a copy * of this value and sets it as the new value of the element. * Otherwise the element container is set the 'not present' state. */ void confidentiality (const confidentiality_optional& x); /** * @brief Set the element value without copying. * * @param p A new value to use. * * This function will try to use the passed value directly instead * of making a copy. */ void confidentiality (::std::auto_ptr< confidentiality_type > p); //@} /** * @name nonXMLContent * * @brief Accessor and modifier functions for the %nonXMLContent * optional element. */ //@{ /** * @brief Element type. */ typedef ::edxl::de::nonXMLContentType nonXMLContent_type; /** * @brief Element optional container type. */ typedef ::xsd::cxx::tree::optional< nonXMLContent_type > nonXMLContent_optional; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< nonXMLContent_type, char > nonXMLContent_traits; /** * @brief Return a read-only (constant) reference to the element * container. * * @return A constant reference to the optional container. */ const nonXMLContent_optional& nonXMLContent () const; /** * @brief Return a read-write reference to the element container. * * @return A reference to the optional container. */ nonXMLContent_optional& nonXMLContent (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void nonXMLContent (const nonXMLContent_type& x); /** * @brief Set the element value. * * @param x An optional container with the new value to set. * * If the value is present in @a x then this function makes a copy * of this value and sets it as the new value of the element. * Otherwise the element container is set the 'not present' state. */ void nonXMLContent (const nonXMLContent_optional& x); /** * @brief Set the element value without copying. * * @param p A new value to use. * * This function will try to use the passed value directly instead * of making a copy. */ void nonXMLContent (::std::auto_ptr< nonXMLContent_type > p); //@} /** * @name xmlContent * * @brief Accessor and modifier functions for the %xmlContent * optional element. */ //@{ /** * @brief Element type. */ typedef ::edxl::de::xmlContentType xmlContent_type; /** * @brief Element optional container type. */ typedef ::xsd::cxx::tree::optional< xmlContent_type > xmlContent_optional; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< xmlContent_type, char > xmlContent_traits; /** * @brief Return a read-only (constant) reference to the element * container. * * @return A constant reference to the optional container. */ const xmlContent_optional& xmlContent () const; /** * @brief Return a read-write reference to the element container. * * @return A reference to the optional container. */ xmlContent_optional& xmlContent (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void xmlContent (const xmlContent_type& x); /** * @brief Set the element value. * * @param x An optional container with the new value to set. * * If the value is present in @a x then this function makes a copy * of this value and sets it as the new value of the element. * Otherwise the element container is set the 'not present' state. */ void xmlContent (const xmlContent_optional& x); /** * @brief Set the element value without copying. * * @param p A new value to use. * * This function will try to use the passed value directly instead * of making a copy. */ void xmlContent (::std::auto_ptr< xmlContent_type > p); //@} /** * @name Constructors */ //@{ /** * @brief Create an instance from the ultimate base and * initializers for required elements and attributes. */ contentObjectType (); /** * @brief Create an instance from a DOM element. * * @param e A DOM element to extract the data from. * @param f Flags to create the new instance with. * @param c A pointer to the object that will contain the new * instance. */ contentObjectType (const ::xercesc::DOMElement& e, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy constructor. * * @param x An instance to make a copy of. * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * * For polymorphic object models use the @c _clone function instead. */ contentObjectType (const contentObjectType& x, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy the instance polymorphically. * * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * @return A pointer to the dynamically allocated copy. * * This function ensures that the dynamic type of the instance is * used for copying and should be used for polymorphic object * models instead of the copy constructor. */ virtual contentObjectType* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; //@} /** * @brief Destructor. */ virtual ~contentObjectType (); // Implementation. // //@cond protected: void parse (::xsd::cxx::xml::dom::parser< char >&, ::xml_schema::flags); protected: contentDescription_optional contentDescription_; contentKeyword_sequence contentKeyword_; incidentID_optional incidentID_; incidentDescription_optional incidentDescription_; originatorRole_sequence originatorRole_; consumerRole_sequence consumerRole_; confidentiality_optional confidentiality_; nonXMLContent_optional nonXMLContent_; xmlContent_optional xmlContent_; //@endcond }; /** * @brief Class corresponding to the %nonXMLContentType schema type. * * @nosubgrouping */ class nonXMLContentType: public ::xml_schema::type { public: /** * @name mimeType * * @brief Accessor and modifier functions for the %mimeType * required element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string mimeType_type; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< mimeType_type, char > mimeType_traits; /** * @brief Return a read-only (constant) reference to the element. * * @return A constant reference to the element. */ const mimeType_type& mimeType () const; /** * @brief Return a read-write reference to the element. * * @return A reference to the element. */ mimeType_type& mimeType (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void mimeType (const mimeType_type& x); /** * @brief Set the element value without copying. * * @param p A new value to use. * * This function will try to use the passed value directly * instead of making a copy. */ void mimeType (::std::auto_ptr< mimeType_type > p); //@} /** * @name size * * @brief Accessor and modifier functions for the %size * optional element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::integer size_type; /** * @brief Element optional container type. */ typedef ::xsd::cxx::tree::optional< size_type > size_optional; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< size_type, char > size_traits; /** * @brief Return a read-only (constant) reference to the element * container. * * @return A constant reference to the optional container. */ const size_optional& size () const; /** * @brief Return a read-write reference to the element container. * * @return A reference to the optional container. */ size_optional& size (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void size (const size_type& x); /** * @brief Set the element value. * * @param x An optional container with the new value to set. * * If the value is present in @a x then this function makes a copy * of this value and sets it as the new value of the element. * Otherwise the element container is set the 'not present' state. */ void size (const size_optional& x); //@} /** * @name digest * * @brief Accessor and modifier functions for the %digest * optional element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string digest_type; /** * @brief Element optional container type. */ typedef ::xsd::cxx::tree::optional< digest_type > digest_optional; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< digest_type, char > digest_traits; /** * @brief Return a read-only (constant) reference to the element * container. * * @return A constant reference to the optional container. */ const digest_optional& digest () const; /** * @brief Return a read-write reference to the element container. * * @return A reference to the optional container. */ digest_optional& digest (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void digest (const digest_type& x); /** * @brief Set the element value. * * @param x An optional container with the new value to set. * * If the value is present in @a x then this function makes a copy * of this value and sets it as the new value of the element. * Otherwise the element container is set the 'not present' state. */ void digest (const digest_optional& x); /** * @brief Set the element value without copying. * * @param p A new value to use. * * This function will try to use the passed value directly instead * of making a copy. */ void digest (::std::auto_ptr< digest_type > p); //@} /** * @name uri * * @brief Accessor and modifier functions for the %uri * optional element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::uri uri_type; /** * @brief Element optional container type. */ typedef ::xsd::cxx::tree::optional< uri_type > uri_optional; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< uri_type, char > uri_traits; /** * @brief Return a read-only (constant) reference to the element * container. * * @return A constant reference to the optional container. */ const uri_optional& uri () const; /** * @brief Return a read-write reference to the element container. * * @return A reference to the optional container. */ uri_optional& uri (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void uri (const uri_type& x); /** * @brief Set the element value. * * @param x An optional container with the new value to set. * * If the value is present in @a x then this function makes a copy * of this value and sets it as the new value of the element. * Otherwise the element container is set the 'not present' state. */ void uri (const uri_optional& x); /** * @brief Set the element value without copying. * * @param p A new value to use. * * This function will try to use the passed value directly instead * of making a copy. */ void uri (::std::auto_ptr< uri_type > p); //@} /** * @name contentData * * @brief Accessor and modifier functions for the %contentData * optional element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::base64_binary contentData_type; /** * @brief Element optional container type. */ typedef ::xsd::cxx::tree::optional< contentData_type > contentData_optional; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< contentData_type, char > contentData_traits; /** * @brief Return a read-only (constant) reference to the element * container. * * @return A constant reference to the optional container. */ const contentData_optional& contentData () const; /** * @brief Return a read-write reference to the element container. * * @return A reference to the optional container. */ contentData_optional& contentData (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void contentData (const contentData_type& x); /** * @brief Set the element value. * * @param x An optional container with the new value to set. * * If the value is present in @a x then this function makes a copy * of this value and sets it as the new value of the element. * Otherwise the element container is set the 'not present' state. */ void contentData (const contentData_optional& x); /** * @brief Set the element value without copying. * * @param p A new value to use. * * This function will try to use the passed value directly instead * of making a copy. */ void contentData (::std::auto_ptr< contentData_type > p); //@} /** * @name Constructors */ //@{ /** * @brief Create an instance from the ultimate base and * initializers for required elements and attributes. */ nonXMLContentType (const mimeType_type&); /** * @brief Create an instance from a DOM element. * * @param e A DOM element to extract the data from. * @param f Flags to create the new instance with. * @param c A pointer to the object that will contain the new * instance. */ nonXMLContentType (const ::xercesc::DOMElement& e, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy constructor. * * @param x An instance to make a copy of. * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * * For polymorphic object models use the @c _clone function instead. */ nonXMLContentType (const nonXMLContentType& x, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy the instance polymorphically. * * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * @return A pointer to the dynamically allocated copy. * * This function ensures that the dynamic type of the instance is * used for copying and should be used for polymorphic object * models instead of the copy constructor. */ virtual nonXMLContentType* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; //@} /** * @brief Destructor. */ virtual ~nonXMLContentType (); // Implementation. // //@cond protected: void parse (::xsd::cxx::xml::dom::parser< char >&, ::xml_schema::flags); protected: ::xsd::cxx::tree::one< mimeType_type > mimeType_; size_optional size_; digest_optional digest_; uri_optional uri_; contentData_optional contentData_; //@endcond }; /** * @brief Class corresponding to the %xmlContentType schema type. * * @nosubgrouping */ class xmlContentType: public ::xml_schema::type { public: /** * @name keyXMLContent * * @brief Accessor and modifier functions for the %keyXMLContent * sequence element. */ //@{ /** * @brief Element type. */ typedef ::edxl::de::anyXMLType keyXMLContent_type; /** * @brief Element sequence container type. */ typedef ::xsd::cxx::tree::sequence< keyXMLContent_type > keyXMLContent_sequence; /** * @brief Element iterator type. */ typedef keyXMLContent_sequence::iterator keyXMLContent_iterator; /** * @brief Element constant iterator type. */ typedef keyXMLContent_sequence::const_iterator keyXMLContent_const_iterator; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< keyXMLContent_type, char > keyXMLContent_traits; /** * @brief Return a read-only (constant) reference to the element * sequence. * * @return A constant reference to the sequence container. */ const keyXMLContent_sequence& keyXMLContent () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ keyXMLContent_sequence& keyXMLContent (); /** * @brief Copy elements from a given sequence. * * @param s A sequence to copy elements from. * * For each element in @a s this function makes a copy and adds it * to the sequence. Note that this operation completely changes the * sequence and all old elements will be lost. */ void keyXMLContent (const keyXMLContent_sequence& s); //@} /** * @name embeddedXMLContent * * @brief Accessor and modifier functions for the %embeddedXMLContent * sequence element. */ //@{ /** * @brief Element type. */ typedef ::edxl::de::anyXMLType embeddedXMLContent_type; /** * @brief Element sequence container type. */ typedef ::xsd::cxx::tree::sequence< embeddedXMLContent_type > embeddedXMLContent_sequence; /** * @brief Element iterator type. */ typedef embeddedXMLContent_sequence::iterator embeddedXMLContent_iterator; /** * @brief Element constant iterator type. */ typedef embeddedXMLContent_sequence::const_iterator embeddedXMLContent_const_iterator; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< embeddedXMLContent_type, char > embeddedXMLContent_traits; /** * @brief Return a read-only (constant) reference to the element * sequence. * * @return A constant reference to the sequence container. */ const embeddedXMLContent_sequence& embeddedXMLContent () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ embeddedXMLContent_sequence& embeddedXMLContent (); /** * @brief Copy elements from a given sequence. * * @param s A sequence to copy elements from. * * For each element in @a s this function makes a copy and adds it * to the sequence. Note that this operation completely changes the * sequence and all old elements will be lost. */ void embeddedXMLContent (const embeddedXMLContent_sequence& s); //@} /** * @name Constructors */ //@{ /** * @brief Create an instance from the ultimate base and * initializers for required elements and attributes. */ xmlContentType (); /** * @brief Create an instance from a DOM element. * * @param e A DOM element to extract the data from. * @param f Flags to create the new instance with. * @param c A pointer to the object that will contain the new * instance. */ xmlContentType (const ::xercesc::DOMElement& e, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy constructor. * * @param x An instance to make a copy of. * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * * For polymorphic object models use the @c _clone function instead. */ xmlContentType (const xmlContentType& x, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy the instance polymorphically. * * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * @return A pointer to the dynamically allocated copy. * * This function ensures that the dynamic type of the instance is * used for copying and should be used for polymorphic object * models instead of the copy constructor. */ virtual xmlContentType* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; //@} /** * @brief Destructor. */ virtual ~xmlContentType (); // Implementation. // //@cond protected: void parse (::xsd::cxx::xml::dom::parser< char >&, ::xml_schema::flags); protected: keyXMLContent_sequence keyXMLContent_; embeddedXMLContent_sequence embeddedXMLContent_; //@endcond }; /** * @brief Class corresponding to the %anyXMLType schema type. * * @nosubgrouping */ class anyXMLType: public ::xml_schema::type { public: /** * @name Constructors */ //@{ /** * @brief Create an instance from the ultimate base and * initializers for required elements and attributes. */ anyXMLType (); /** * @brief Create an instance from a DOM element. * * @param e A DOM element to extract the data from. * @param f Flags to create the new instance with. * @param c A pointer to the object that will contain the new * instance. */ anyXMLType (const ::xercesc::DOMElement& e, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy constructor. * * @param x An instance to make a copy of. * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * * For polymorphic object models use the @c _clone function instead. */ anyXMLType (const anyXMLType& x, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy the instance polymorphically. * * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * @return A pointer to the dynamically allocated copy. * * This function ensures that the dynamic type of the instance is * used for copying and should be used for polymorphic object * models instead of the copy constructor. */ virtual anyXMLType* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; //@} /** * @brief Destructor. */ virtual ~anyXMLType (); // Implementation. // //@cond protected: void parse (::xsd::cxx::xml::dom::parser< char >&, ::xml_schema::flags); protected: //@endcond }; /** * @brief Class corresponding to the %valueListType schema type. * * @nosubgrouping */ class valueListType: public ::xml_schema::type { public: /** * @name valueListUrn * * @brief Accessor and modifier functions for the %valueListUrn * required element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string valueListUrn_type; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< valueListUrn_type, char > valueListUrn_traits; /** * @brief Return a read-only (constant) reference to the element. * * @return A constant reference to the element. */ const valueListUrn_type& valueListUrn () const; /** * @brief Return a read-write reference to the element. * * @return A reference to the element. */ valueListUrn_type& valueListUrn (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void valueListUrn (const valueListUrn_type& x); /** * @brief Set the element value without copying. * * @param p A new value to use. * * This function will try to use the passed value directly * instead of making a copy. */ void valueListUrn (::std::auto_ptr< valueListUrn_type > p); //@} /** * @name value * * @brief Accessor and modifier functions for the %value * sequence element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string value_type; /** * @brief Element sequence container type. */ typedef ::xsd::cxx::tree::sequence< value_type > value_sequence; /** * @brief Element iterator type. */ typedef value_sequence::iterator value_iterator; /** * @brief Element constant iterator type. */ typedef value_sequence::const_iterator value_const_iterator; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< value_type, char > value_traits; /** * @brief Return a read-only (constant) reference to the element * sequence. * * @return A constant reference to the sequence container. */ const value_sequence& value () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ value_sequence& value (); /** * @brief Copy elements from a given sequence. * * @param s A sequence to copy elements from. * * For each element in @a s this function makes a copy and adds it * to the sequence. Note that this operation completely changes the * sequence and all old elements will be lost. */ void value (const value_sequence& s); //@} /** * @name Constructors */ //@{ /** * @brief Create an instance from the ultimate base and * initializers for required elements and attributes. */ valueListType (const valueListUrn_type&); /** * @brief Create an instance from a DOM element. * * @param e A DOM element to extract the data from. * @param f Flags to create the new instance with. * @param c A pointer to the object that will contain the new * instance. */ valueListType (const ::xercesc::DOMElement& e, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy constructor. * * @param x An instance to make a copy of. * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * * For polymorphic object models use the @c _clone function instead. */ valueListType (const valueListType& x, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy the instance polymorphically. * * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * @return A pointer to the dynamically allocated copy. * * This function ensures that the dynamic type of the instance is * used for copying and should be used for polymorphic object * models instead of the copy constructor. */ virtual valueListType* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; //@} /** * @brief Destructor. */ virtual ~valueListType (); // Implementation. // //@cond protected: void parse (::xsd::cxx::xml::dom::parser< char >&, ::xml_schema::flags); protected: ::xsd::cxx::tree::one< valueListUrn_type > valueListUrn_; value_sequence value_; //@endcond }; /** * @brief Class corresponding to the %valueSchemeType schema type. * * @nosubgrouping */ class valueSchemeType: public ::xml_schema::type { public: /** * @name explicitAddressScheme * * @brief Accessor and modifier functions for the %explicitAddressScheme * required element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string explicitAddressScheme_type; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< explicitAddressScheme_type, char > explicitAddressScheme_traits; /** * @brief Return a read-only (constant) reference to the element. * * @return A constant reference to the element. */ const explicitAddressScheme_type& explicitAddressScheme () const; /** * @brief Return a read-write reference to the element. * * @return A reference to the element. */ explicitAddressScheme_type& explicitAddressScheme (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void explicitAddressScheme (const explicitAddressScheme_type& x); /** * @brief Set the element value without copying. * * @param p A new value to use. * * This function will try to use the passed value directly * instead of making a copy. */ void explicitAddressScheme (::std::auto_ptr< explicitAddressScheme_type > p); //@} /** * @name explicitAddressValue * * @brief Accessor and modifier functions for the %explicitAddressValue * sequence element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string explicitAddressValue_type; /** * @brief Element sequence container type. */ typedef ::xsd::cxx::tree::sequence< explicitAddressValue_type > explicitAddressValue_sequence; /** * @brief Element iterator type. */ typedef explicitAddressValue_sequence::iterator explicitAddressValue_iterator; /** * @brief Element constant iterator type. */ typedef explicitAddressValue_sequence::const_iterator explicitAddressValue_const_iterator; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< explicitAddressValue_type, char > explicitAddressValue_traits; /** * @brief Return a read-only (constant) reference to the element * sequence. * * @return A constant reference to the sequence container. */ const explicitAddressValue_sequence& explicitAddressValue () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ explicitAddressValue_sequence& explicitAddressValue (); /** * @brief Copy elements from a given sequence. * * @param s A sequence to copy elements from. * * For each element in @a s this function makes a copy and adds it * to the sequence. Note that this operation completely changes the * sequence and all old elements will be lost. */ void explicitAddressValue (const explicitAddressValue_sequence& s); //@} /** * @name Constructors */ //@{ /** * @brief Create an instance from the ultimate base and * initializers for required elements and attributes. */ valueSchemeType (const explicitAddressScheme_type&); /** * @brief Create an instance from a DOM element. * * @param e A DOM element to extract the data from. * @param f Flags to create the new instance with. * @param c A pointer to the object that will contain the new * instance. */ valueSchemeType (const ::xercesc::DOMElement& e, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy constructor. * * @param x An instance to make a copy of. * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * * For polymorphic object models use the @c _clone function instead. */ valueSchemeType (const valueSchemeType& x, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy the instance polymorphically. * * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * @return A pointer to the dynamically allocated copy. * * This function ensures that the dynamic type of the instance is * used for copying and should be used for polymorphic object * models instead of the copy constructor. */ virtual valueSchemeType* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; //@} /** * @brief Destructor. */ virtual ~valueSchemeType (); // Implementation. // //@cond protected: void parse (::xsd::cxx::xml::dom::parser< char >&, ::xml_schema::flags); protected: ::xsd::cxx::tree::one< explicitAddressScheme_type > explicitAddressScheme_; explicitAddressValue_sequence explicitAddressValue_; //@endcond }; /** * @brief Class corresponding to the %targetAreaType schema type. * * @nosubgrouping */ class targetAreaType: public ::xml_schema::type { public: /** * @name circle * * @brief Accessor and modifier functions for the %circle * sequence element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string circle_type; /** * @brief Element sequence container type. */ typedef ::xsd::cxx::tree::sequence< circle_type > circle_sequence; /** * @brief Element iterator type. */ typedef circle_sequence::iterator circle_iterator; /** * @brief Element constant iterator type. */ typedef circle_sequence::const_iterator circle_const_iterator; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< circle_type, char > circle_traits; /** * @brief Return a read-only (constant) reference to the element * sequence. * * @return A constant reference to the sequence container. */ const circle_sequence& circle () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ circle_sequence& circle (); /** * @brief Copy elements from a given sequence. * * @param s A sequence to copy elements from. * * For each element in @a s this function makes a copy and adds it * to the sequence. Note that this operation completely changes the * sequence and all old elements will be lost. */ void circle (const circle_sequence& s); //@} /** * @name polygon * * @brief Accessor and modifier functions for the %polygon * sequence element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string polygon_type; /** * @brief Element sequence container type. */ typedef ::xsd::cxx::tree::sequence< polygon_type > polygon_sequence; /** * @brief Element iterator type. */ typedef polygon_sequence::iterator polygon_iterator; /** * @brief Element constant iterator type. */ typedef polygon_sequence::const_iterator polygon_const_iterator; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< polygon_type, char > polygon_traits; /** * @brief Return a read-only (constant) reference to the element * sequence. * * @return A constant reference to the sequence container. */ const polygon_sequence& polygon () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ polygon_sequence& polygon (); /** * @brief Copy elements from a given sequence. * * @param s A sequence to copy elements from. * * For each element in @a s this function makes a copy and adds it * to the sequence. Note that this operation completely changes the * sequence and all old elements will be lost. */ void polygon (const polygon_sequence& s); //@} /** * @name country * * @brief Accessor and modifier functions for the %country * sequence element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string country_type; /** * @brief Element sequence container type. */ typedef ::xsd::cxx::tree::sequence< country_type > country_sequence; /** * @brief Element iterator type. */ typedef country_sequence::iterator country_iterator; /** * @brief Element constant iterator type. */ typedef country_sequence::const_iterator country_const_iterator; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< country_type, char > country_traits; /** * @brief Return a read-only (constant) reference to the element * sequence. * * @return A constant reference to the sequence container. */ const country_sequence& country () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ country_sequence& country (); /** * @brief Copy elements from a given sequence. * * @param s A sequence to copy elements from. * * For each element in @a s this function makes a copy and adds it * to the sequence. Note that this operation completely changes the * sequence and all old elements will be lost. */ void country (const country_sequence& s); //@} /** * @name subdivision * * @brief Accessor and modifier functions for the %subdivision * sequence element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string subdivision_type; /** * @brief Element sequence container type. */ typedef ::xsd::cxx::tree::sequence< subdivision_type > subdivision_sequence; /** * @brief Element iterator type. */ typedef subdivision_sequence::iterator subdivision_iterator; /** * @brief Element constant iterator type. */ typedef subdivision_sequence::const_iterator subdivision_const_iterator; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< subdivision_type, char > subdivision_traits; /** * @brief Return a read-only (constant) reference to the element * sequence. * * @return A constant reference to the sequence container. */ const subdivision_sequence& subdivision () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ subdivision_sequence& subdivision (); /** * @brief Copy elements from a given sequence. * * @param s A sequence to copy elements from. * * For each element in @a s this function makes a copy and adds it * to the sequence. Note that this operation completely changes the * sequence and all old elements will be lost. */ void subdivision (const subdivision_sequence& s); //@} /** * @name locCodeUN * * @brief Accessor and modifier functions for the %locCodeUN * sequence element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string locCodeUN_type; /** * @brief Element sequence container type. */ typedef ::xsd::cxx::tree::sequence< locCodeUN_type > locCodeUN_sequence; /** * @brief Element iterator type. */ typedef locCodeUN_sequence::iterator locCodeUN_iterator; /** * @brief Element constant iterator type. */ typedef locCodeUN_sequence::const_iterator locCodeUN_const_iterator; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< locCodeUN_type, char > locCodeUN_traits; /** * @brief Return a read-only (constant) reference to the element * sequence. * * @return A constant reference to the sequence container. */ const locCodeUN_sequence& locCodeUN () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ locCodeUN_sequence& locCodeUN (); /** * @brief Copy elements from a given sequence. * * @param s A sequence to copy elements from. * * For each element in @a s this function makes a copy and adds it * to the sequence. Note that this operation completely changes the * sequence and all old elements will be lost. */ void locCodeUN (const locCodeUN_sequence& s); //@} /** * @name Constructors */ //@{ /** * @brief Create an instance from the ultimate base and * initializers for required elements and attributes. */ targetAreaType (); /** * @brief Create an instance from a DOM element. * * @param e A DOM element to extract the data from. * @param f Flags to create the new instance with. * @param c A pointer to the object that will contain the new * instance. */ targetAreaType (const ::xercesc::DOMElement& e, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy constructor. * * @param x An instance to make a copy of. * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * * For polymorphic object models use the @c _clone function instead. */ targetAreaType (const targetAreaType& x, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy the instance polymorphically. * * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * @return A pointer to the dynamically allocated copy. * * This function ensures that the dynamic type of the instance is * used for copying and should be used for polymorphic object * models instead of the copy constructor. */ virtual targetAreaType* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; //@} /** * @brief Destructor. */ virtual ~targetAreaType (); // Implementation. // //@cond protected: void parse (::xsd::cxx::xml::dom::parser< char >&, ::xml_schema::flags); protected: circle_sequence circle_; polygon_sequence polygon_; country_sequence country_; subdivision_sequence subdivision_; locCodeUN_sequence locCodeUN_; //@endcond }; /** * @brief Enumeration class corresponding to the %statusValues * schema type. */ class statusValues: public ::xml_schema::nmtoken { public: /** * @brief Underlying enum type. */ enum value { Actual, Exercise, System, Test }; /** * @brief Create an instance from the underlying enum value. * * @param v A enum value. */ statusValues (value v); /** * @brief Create an instance from a C string. * * @param v A string value. */ statusValues (const char* v); /** * @brief Create an instance from a string. * * @param v A string value. */ statusValues (const ::std::string& v); /** * @brief Create an instance from the base value. * * @param v A base value. */ statusValues (const ::xml_schema::nmtoken& v); /** * @brief Create an instance from a DOM element. * * @param e A DOM element to extract the data from. * @param f Flags to create the new instance with. * @param c A pointer to the object that will contain the new * instance. */ statusValues (const ::xercesc::DOMElement& e, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Create an instance from a DOM attribute. * * @param a A DOM attribute to extract the data from. * @param f Flags to create the new instance with. * @param c A pointer to the object that will contain the new * instance. */ statusValues (const ::xercesc::DOMAttr& a, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Create an instance from a string fragment. * * @param s A string fragment to extract the data from. * @param e A pointer to DOM element containing the string fragment. * @param f Flags to create the new instance with. * @param c A pointer to the object that will contain the new * instance. */ statusValues (const ::std::string& s, const ::xercesc::DOMElement* e, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy constructor. * * @param x An instance to make a copy of. * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * * For polymorphic object models use the @c _clone function instead. */ statusValues (const statusValues& x, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy the instance polymorphically. * * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * @return A pointer to the dynamically allocated copy. * * This function ensures that the dynamic type of the instance is * used for copying and should be used for polymorphic object * models instead of the copy constructor. */ virtual statusValues* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; /** * @brief Assign the underlying enum value. * * @param v A enum value. * @return A refernce to the instance. */ statusValues& operator= (value v); /** * @brief Implicit conversion operator to the underlying * enum value. * * @return A enum value. */ virtual operator value () const { return _xsd_statusValues_convert (); } //@cond protected: value _xsd_statusValues_convert () const; public: static const char* const _xsd_statusValues_literals_[4]; static const value _xsd_statusValues_indexes_[4]; //@endcond }; /** * @brief Enumeration class corresponding to the %typeValues * schema type. */ class typeValues: public ::xml_schema::nmtoken { public: /** * @brief Underlying enum type. */ enum value { Report, Update, Cancel, Request, Response, Dispatch, Ack, Error, SensorConfiguration, SensorControl, SensorStatus, SensorDetection }; /** * @brief Create an instance from the underlying enum value. * * @param v A enum value. */ typeValues (value v); /** * @brief Create an instance from a C string. * * @param v A string value. */ typeValues (const char* v); /** * @brief Create an instance from a string. * * @param v A string value. */ typeValues (const ::std::string& v); /** * @brief Create an instance from the base value. * * @param v A base value. */ typeValues (const ::xml_schema::nmtoken& v); /** * @brief Create an instance from a DOM element. * * @param e A DOM element to extract the data from. * @param f Flags to create the new instance with. * @param c A pointer to the object that will contain the new * instance. */ typeValues (const ::xercesc::DOMElement& e, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Create an instance from a DOM attribute. * * @param a A DOM attribute to extract the data from. * @param f Flags to create the new instance with. * @param c A pointer to the object that will contain the new * instance. */ typeValues (const ::xercesc::DOMAttr& a, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Create an instance from a string fragment. * * @param s A string fragment to extract the data from. * @param e A pointer to DOM element containing the string fragment. * @param f Flags to create the new instance with. * @param c A pointer to the object that will contain the new * instance. */ typeValues (const ::std::string& s, const ::xercesc::DOMElement* e, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy constructor. * * @param x An instance to make a copy of. * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * * For polymorphic object models use the @c _clone function instead. */ typeValues (const typeValues& x, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy the instance polymorphically. * * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * @return A pointer to the dynamically allocated copy. * * This function ensures that the dynamic type of the instance is * used for copying and should be used for polymorphic object * models instead of the copy constructor. */ virtual typeValues* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; /** * @brief Assign the underlying enum value. * * @param v A enum value. * @return A refernce to the instance. */ typeValues& operator= (value v); /** * @brief Implicit conversion operator to the underlying * enum value. * * @return A enum value. */ virtual operator value () const { return _xsd_typeValues_convert (); } //@cond protected: value _xsd_typeValues_convert () const; public: static const char* const _xsd_typeValues_literals_[12]; static const value _xsd_typeValues_indexes_[12]; //@endcond }; /** * @brief Class corresponding to the %EDXLDistribution schema type. * * @nosubgrouping */ class EDXLDistribution: public ::xml_schema::type { public: /** * @name distributionID * * @brief Accessor and modifier functions for the %distributionID * required element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string distributionID_type; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< distributionID_type, char > distributionID_traits; /** * @brief Return a read-only (constant) reference to the element. * * @return A constant reference to the element. */ const distributionID_type& distributionID () const; /** * @brief Return a read-write reference to the element. * * @return A reference to the element. */ distributionID_type& distributionID (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void distributionID (const distributionID_type& x); /** * @brief Set the element value without copying. * * @param p A new value to use. * * This function will try to use the passed value directly * instead of making a copy. */ void distributionID (::std::auto_ptr< distributionID_type > p); //@} /** * @name senderID * * @brief Accessor and modifier functions for the %senderID * required element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string senderID_type; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< senderID_type, char > senderID_traits; /** * @brief Return a read-only (constant) reference to the element. * * @return A constant reference to the element. */ const senderID_type& senderID () const; /** * @brief Return a read-write reference to the element. * * @return A reference to the element. */ senderID_type& senderID (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void senderID (const senderID_type& x); /** * @brief Set the element value without copying. * * @param p A new value to use. * * This function will try to use the passed value directly * instead of making a copy. */ void senderID (::std::auto_ptr< senderID_type > p); //@} /** * @name dateTimeSent * * @brief Accessor and modifier functions for the %dateTimeSent * required element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::date_time dateTimeSent_type; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< dateTimeSent_type, char > dateTimeSent_traits; /** * @brief Return a read-only (constant) reference to the element. * * @return A constant reference to the element. */ const dateTimeSent_type& dateTimeSent () const; /** * @brief Return a read-write reference to the element. * * @return A reference to the element. */ dateTimeSent_type& dateTimeSent (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void dateTimeSent (const dateTimeSent_type& x); /** * @brief Set the element value without copying. * * @param p A new value to use. * * This function will try to use the passed value directly * instead of making a copy. */ void dateTimeSent (::std::auto_ptr< dateTimeSent_type > p); //@} /** * @name distributionStatus * * @brief Accessor and modifier functions for the %distributionStatus * required element. */ //@{ /** * @brief Element type. */ typedef ::edxl::de::statusValues distributionStatus_type; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< distributionStatus_type, char > distributionStatus_traits; /** * @brief Return a read-only (constant) reference to the element. * * @return A constant reference to the element. */ const distributionStatus_type& distributionStatus () const; /** * @brief Return a read-write reference to the element. * * @return A reference to the element. */ distributionStatus_type& distributionStatus (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void distributionStatus (const distributionStatus_type& x); /** * @brief Set the element value without copying. * * @param p A new value to use. * * This function will try to use the passed value directly * instead of making a copy. */ void distributionStatus (::std::auto_ptr< distributionStatus_type > p); //@} /** * @name distributionType * * @brief Accessor and modifier functions for the %distributionType * required element. */ //@{ /** * @brief Element type. */ typedef ::edxl::de::typeValues distributionType_type; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< distributionType_type, char > distributionType_traits; /** * @brief Return a read-only (constant) reference to the element. * * @return A constant reference to the element. */ const distributionType_type& distributionType () const; /** * @brief Return a read-write reference to the element. * * @return A reference to the element. */ distributionType_type& distributionType (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void distributionType (const distributionType_type& x); /** * @brief Set the element value without copying. * * @param p A new value to use. * * This function will try to use the passed value directly * instead of making a copy. */ void distributionType (::std::auto_ptr< distributionType_type > p); //@} /** * @name combinedConfidentiality * * @brief Accessor and modifier functions for the %combinedConfidentiality * required element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string combinedConfidentiality_type; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< combinedConfidentiality_type, char > combinedConfidentiality_traits; /** * @brief Return a read-only (constant) reference to the element. * * @return A constant reference to the element. */ const combinedConfidentiality_type& combinedConfidentiality () const; /** * @brief Return a read-write reference to the element. * * @return A reference to the element. */ combinedConfidentiality_type& combinedConfidentiality (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void combinedConfidentiality (const combinedConfidentiality_type& x); /** * @brief Set the element value without copying. * * @param p A new value to use. * * This function will try to use the passed value directly * instead of making a copy. */ void combinedConfidentiality (::std::auto_ptr< combinedConfidentiality_type > p); //@} /** * @name language * * @brief Accessor and modifier functions for the %language * optional element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string language_type; /** * @brief Element optional container type. */ typedef ::xsd::cxx::tree::optional< language_type > language_optional; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< language_type, char > language_traits; /** * @brief Return a read-only (constant) reference to the element * container. * * @return A constant reference to the optional container. */ const language_optional& language () const; /** * @brief Return a read-write reference to the element container. * * @return A reference to the optional container. */ language_optional& language (); /** * @brief Set the element value. * * @param x A new value to set. * * This function makes a copy of its argument and sets it as * the new value of the element. */ void language (const language_type& x); /** * @brief Set the element value. * * @param x An optional container with the new value to set. * * If the value is present in @a x then this function makes a copy * of this value and sets it as the new value of the element. * Otherwise the element container is set the 'not present' state. */ void language (const language_optional& x); /** * @brief Set the element value without copying. * * @param p A new value to use. * * This function will try to use the passed value directly instead * of making a copy. */ void language (::std::auto_ptr< language_type > p); //@} /** * @name senderRole * * @brief Accessor and modifier functions for the %senderRole * sequence element. */ //@{ /** * @brief Element type. */ typedef ::edxl::de::valueListType senderRole_type; /** * @brief Element sequence container type. */ typedef ::xsd::cxx::tree::sequence< senderRole_type > senderRole_sequence; /** * @brief Element iterator type. */ typedef senderRole_sequence::iterator senderRole_iterator; /** * @brief Element constant iterator type. */ typedef senderRole_sequence::const_iterator senderRole_const_iterator; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< senderRole_type, char > senderRole_traits; /** * @brief Return a read-only (constant) reference to the element * sequence. * * @return A constant reference to the sequence container. */ const senderRole_sequence& senderRole () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ senderRole_sequence& senderRole (); /** * @brief Copy elements from a given sequence. * * @param s A sequence to copy elements from. * * For each element in @a s this function makes a copy and adds it * to the sequence. Note that this operation completely changes the * sequence and all old elements will be lost. */ void senderRole (const senderRole_sequence& s); //@} /** * @name recipientRole * * @brief Accessor and modifier functions for the %recipientRole * sequence element. */ //@{ /** * @brief Element type. */ typedef ::edxl::de::valueListType recipientRole_type; /** * @brief Element sequence container type. */ typedef ::xsd::cxx::tree::sequence< recipientRole_type > recipientRole_sequence; /** * @brief Element iterator type. */ typedef recipientRole_sequence::iterator recipientRole_iterator; /** * @brief Element constant iterator type. */ typedef recipientRole_sequence::const_iterator recipientRole_const_iterator; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< recipientRole_type, char > recipientRole_traits; /** * @brief Return a read-only (constant) reference to the element * sequence. * * @return A constant reference to the sequence container. */ const recipientRole_sequence& recipientRole () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ recipientRole_sequence& recipientRole (); /** * @brief Copy elements from a given sequence. * * @param s A sequence to copy elements from. * * For each element in @a s this function makes a copy and adds it * to the sequence. Note that this operation completely changes the * sequence and all old elements will be lost. */ void recipientRole (const recipientRole_sequence& s); //@} /** * @name keyword * * @brief Accessor and modifier functions for the %keyword * sequence element. */ //@{ /** * @brief Element type. */ typedef ::edxl::de::valueListType keyword_type; /** * @brief Element sequence container type. */ typedef ::xsd::cxx::tree::sequence< keyword_type > keyword_sequence; /** * @brief Element iterator type. */ typedef keyword_sequence::iterator keyword_iterator; /** * @brief Element constant iterator type. */ typedef keyword_sequence::const_iterator keyword_const_iterator; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< keyword_type, char > keyword_traits; /** * @brief Return a read-only (constant) reference to the element * sequence. * * @return A constant reference to the sequence container. */ const keyword_sequence& keyword () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ keyword_sequence& keyword (); /** * @brief Copy elements from a given sequence. * * @param s A sequence to copy elements from. * * For each element in @a s this function makes a copy and adds it * to the sequence. Note that this operation completely changes the * sequence and all old elements will be lost. */ void keyword (const keyword_sequence& s); //@} /** * @name distributionReference * * @brief Accessor and modifier functions for the %distributionReference * sequence element. */ //@{ /** * @brief Element type. */ typedef ::xml_schema::string distributionReference_type; /** * @brief Element sequence container type. */ typedef ::xsd::cxx::tree::sequence< distributionReference_type > distributionReference_sequence; /** * @brief Element iterator type. */ typedef distributionReference_sequence::iterator distributionReference_iterator; /** * @brief Element constant iterator type. */ typedef distributionReference_sequence::const_iterator distributionReference_const_iterator; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< distributionReference_type, char > distributionReference_traits; /** * @brief Return a read-only (constant) reference to the element * sequence. * * @return A constant reference to the sequence container. */ const distributionReference_sequence& distributionReference () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ distributionReference_sequence& distributionReference (); /** * @brief Copy elements from a given sequence. * * @param s A sequence to copy elements from. * * For each element in @a s this function makes a copy and adds it * to the sequence. Note that this operation completely changes the * sequence and all old elements will be lost. */ void distributionReference (const distributionReference_sequence& s); //@} /** * @name explicitAddress * * @brief Accessor and modifier functions for the %explicitAddress * sequence element. */ //@{ /** * @brief Element type. */ typedef ::edxl::de::valueSchemeType explicitAddress_type; /** * @brief Element sequence container type. */ typedef ::xsd::cxx::tree::sequence< explicitAddress_type > explicitAddress_sequence; /** * @brief Element iterator type. */ typedef explicitAddress_sequence::iterator explicitAddress_iterator; /** * @brief Element constant iterator type. */ typedef explicitAddress_sequence::const_iterator explicitAddress_const_iterator; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< explicitAddress_type, char > explicitAddress_traits; /** * @brief Return a read-only (constant) reference to the element * sequence. * * @return A constant reference to the sequence container. */ const explicitAddress_sequence& explicitAddress () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ explicitAddress_sequence& explicitAddress (); /** * @brief Copy elements from a given sequence. * * @param s A sequence to copy elements from. * * For each element in @a s this function makes a copy and adds it * to the sequence. Note that this operation completely changes the * sequence and all old elements will be lost. */ void explicitAddress (const explicitAddress_sequence& s); //@} /** * @name targetArea * * @brief Accessor and modifier functions for the %targetArea * sequence element. */ //@{ /** * @brief Element type. */ typedef ::edxl::de::targetAreaType targetArea_type; /** * @brief Element sequence container type. */ typedef ::xsd::cxx::tree::sequence< targetArea_type > targetArea_sequence; /** * @brief Element iterator type. */ typedef targetArea_sequence::iterator targetArea_iterator; /** * @brief Element constant iterator type. */ typedef targetArea_sequence::const_iterator targetArea_const_iterator; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< targetArea_type, char > targetArea_traits; /** * @brief Return a read-only (constant) reference to the element * sequence. * * @return A constant reference to the sequence container. */ const targetArea_sequence& targetArea () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ targetArea_sequence& targetArea (); /** * @brief Copy elements from a given sequence. * * @param s A sequence to copy elements from. * * For each element in @a s this function makes a copy and adds it * to the sequence. Note that this operation completely changes the * sequence and all old elements will be lost. */ void targetArea (const targetArea_sequence& s); //@} /** * @name contentObject * * @brief Accessor and modifier functions for the %contentObject * sequence element. */ //@{ /** * @brief Element type. */ typedef ::edxl::de::contentObjectType contentObject_type; /** * @brief Element sequence container type. */ typedef ::xsd::cxx::tree::sequence< contentObject_type > contentObject_sequence; /** * @brief Element iterator type. */ typedef contentObject_sequence::iterator contentObject_iterator; /** * @brief Element constant iterator type. */ typedef contentObject_sequence::const_iterator contentObject_const_iterator; /** * @brief Element traits type. */ typedef ::xsd::cxx::tree::traits< contentObject_type, char > contentObject_traits; /** * @brief Return a read-only (constant) reference to the element * sequence. * * @return A constant reference to the sequence container. */ const contentObject_sequence& contentObject () const; /** * @brief Return a read-write reference to the element sequence. * * @return A reference to the sequence container. */ contentObject_sequence& contentObject (); /** * @brief Copy elements from a given sequence. * * @param s A sequence to copy elements from. * * For each element in @a s this function makes a copy and adds it * to the sequence. Note that this operation completely changes the * sequence and all old elements will be lost. */ void contentObject (const contentObject_sequence& s); //@} /** * @name Constructors */ //@{ /** * @brief Create an instance from the ultimate base and * initializers for required elements and attributes. */ EDXLDistribution (const distributionID_type&, const senderID_type&, const dateTimeSent_type&, const distributionStatus_type&, const distributionType_type&, const combinedConfidentiality_type&); /** * @brief Create an instance from a DOM element. * * @param e A DOM element to extract the data from. * @param f Flags to create the new instance with. * @param c A pointer to the object that will contain the new * instance. */ EDXLDistribution (const ::xercesc::DOMElement& e, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy constructor. * * @param x An instance to make a copy of. * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * * For polymorphic object models use the @c _clone function instead. */ EDXLDistribution (const EDXLDistribution& x, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); /** * @brief Copy the instance polymorphically. * * @param f Flags to create the copy with. * @param c A pointer to the object that will contain the copy. * @return A pointer to the dynamically allocated copy. * * This function ensures that the dynamic type of the instance is * used for copying and should be used for polymorphic object * models instead of the copy constructor. */ virtual EDXLDistribution* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; //@} /** * @brief Destructor. */ virtual ~EDXLDistribution (); // Implementation. // //@cond protected: void parse (::xsd::cxx::xml::dom::parser< char >&, ::xml_schema::flags); protected: ::xsd::cxx::tree::one< distributionID_type > distributionID_; ::xsd::cxx::tree::one< senderID_type > senderID_; ::xsd::cxx::tree::one< dateTimeSent_type > dateTimeSent_; ::xsd::cxx::tree::one< distributionStatus_type > distributionStatus_; ::xsd::cxx::tree::one< distributionType_type > distributionType_; ::xsd::cxx::tree::one< combinedConfidentiality_type > combinedConfidentiality_; language_optional language_; senderRole_sequence senderRole_; recipientRole_sequence recipientRole_; keyword_sequence keyword_; distributionReference_sequence distributionReference_; explicitAddress_sequence explicitAddress_; targetArea_sequence targetArea_; contentObject_sequence contentObject_; //@endcond }; } } #include #include #include #include namespace edxl { namespace de { /** * @name Parsing functions for the %EDXLDistribution document root. */ //@{ /** * @brief Parse a URI or a local file. * * @param uri A URI or a local file name. * @param f Parsing flags. * @param p Parsing properties. * @return A pointer to the root of the object model. * * This function uses exceptions to report parsing errors. */ ::std::auto_ptr< ::edxl::de::EDXLDistribution > EDXLDistribution_ (const ::std::string& uri, ::xml_schema::flags f = 0, const ::xml_schema::properties& p = ::xml_schema::properties ()); /** * @brief Parse a URI or a local file with an error handler. * * @param uri A URI or a local file name. * @param eh An error handler. * @param f Parsing flags. * @param p Parsing properties. * @return A pointer to the root of the object model. * * This function reports parsing errors by calling the error handler. */ ::std::auto_ptr< ::edxl::de::EDXLDistribution > EDXLDistribution_ (const ::std::string& uri, ::xml_schema::error_handler& eh, ::xml_schema::flags f = 0, const ::xml_schema::properties& p = ::xml_schema::properties ()); /** * @brief Parse a URI or a local file with a Xerces-C++ DOM error * handler. * * @param uri A URI or a local file name. * @param eh A Xerces-C++ DOM error handler. * @param f Parsing flags. * @param p Parsing properties. * @return A pointer to the root of the object model. * * This function reports parsing errors by calling the error handler. */ ::std::auto_ptr< ::edxl::de::EDXLDistribution > EDXLDistribution_ (const ::std::string& uri, ::xercesc::DOMErrorHandler& eh, ::xml_schema::flags f = 0, const ::xml_schema::properties& p = ::xml_schema::properties ()); /** * @brief Parse a standard input stream. * * @param is A standrad input stream. * @param f Parsing flags. * @param p Parsing properties. * @return A pointer to the root of the object model. * * This function uses exceptions to report parsing errors. */ ::std::auto_ptr< ::edxl::de::EDXLDistribution > EDXLDistribution_ (::std::istream& is, ::xml_schema::flags f = 0, const ::xml_schema::properties& p = ::xml_schema::properties ()); /** * @brief Parse a standard input stream with an error handler. * * @param is A standrad input stream. * @param eh An error handler. * @param f Parsing flags. * @param p Parsing properties. * @return A pointer to the root of the object model. * * This function reports parsing errors by calling the error handler. */ ::std::auto_ptr< ::edxl::de::EDXLDistribution > EDXLDistribution_ (::std::istream& is, ::xml_schema::error_handler& eh, ::xml_schema::flags f = 0, const ::xml_schema::properties& p = ::xml_schema::properties ()); /** * @brief Parse a standard input stream with a Xerces-C++ DOM error * handler. * * @param is A standrad input stream. * @param eh A Xerces-C++ DOM error handler. * @param f Parsing flags. * @param p Parsing properties. * @return A pointer to the root of the object model. * * This function reports parsing errors by calling the error handler. */ ::std::auto_ptr< ::edxl::de::EDXLDistribution > EDXLDistribution_ (::std::istream& is, ::xercesc::DOMErrorHandler& eh, ::xml_schema::flags f = 0, const ::xml_schema::properties& p = ::xml_schema::properties ()); /** * @brief Parse a standard input stream with a resource id. * * @param is A standrad input stream. * @param id A resource id. * @param f Parsing flags. * @param p Parsing properties. * @return A pointer to the root of the object model. * * The resource id is used to identify the document being parsed in * diagnostics as well as to resolve relative paths. * * This function uses exceptions to report parsing errors. */ ::std::auto_ptr< ::edxl::de::EDXLDistribution > EDXLDistribution_ (::std::istream& is, const ::std::string& id, ::xml_schema::flags f = 0, const ::xml_schema::properties& p = ::xml_schema::properties ()); /** * @brief Parse a standard input stream with a resource id and an * error handler. * * @param is A standrad input stream. * @param id A resource id. * @param eh An error handler. * @param f Parsing flags. * @param p Parsing properties. * @return A pointer to the root of the object model. * * The resource id is used to identify the document being parsed in * diagnostics as well as to resolve relative paths. * * This function reports parsing errors by calling the error handler. */ ::std::auto_ptr< ::edxl::de::EDXLDistribution > EDXLDistribution_ (::std::istream& is, const ::std::string& id, ::xml_schema::error_handler& eh, ::xml_schema::flags f = 0, const ::xml_schema::properties& p = ::xml_schema::properties ()); /** * @brief Parse a standard input stream with a resource id and a * Xerces-C++ DOM error handler. * * @param is A standrad input stream. * @param id A resource id. * @param eh A Xerces-C++ DOM error handler. * @param f Parsing flags. * @param p Parsing properties. * @return A pointer to the root of the object model. * * The resource id is used to identify the document being parsed in * diagnostics as well as to resolve relative paths. * * This function reports parsing errors by calling the error handler. */ ::std::auto_ptr< ::edxl::de::EDXLDistribution > EDXLDistribution_ (::std::istream& is, const ::std::string& id, ::xercesc::DOMErrorHandler& eh, ::xml_schema::flags f = 0, const ::xml_schema::properties& p = ::xml_schema::properties ()); /** * @brief Parse a Xerces-C++ input source. * * @param is A Xerces-C++ input source. * @param f Parsing flags. * @param p Parsing properties. * @return A pointer to the root of the object model. * * This function uses exceptions to report parsing errors. */ ::std::auto_ptr< ::edxl::de::EDXLDistribution > EDXLDistribution_ (::xercesc::InputSource& is, ::xml_schema::flags f = 0, const ::xml_schema::properties& p = ::xml_schema::properties ()); /** * @brief Parse a Xerces-C++ input source with an error handler. * * @param is A Xerces-C++ input source. * @param eh An error handler. * @param f Parsing flags. * @param p Parsing properties. * @return A pointer to the root of the object model. * * This function reports parsing errors by calling the error handler. */ ::std::auto_ptr< ::edxl::de::EDXLDistribution > EDXLDistribution_ (::xercesc::InputSource& is, ::xml_schema::error_handler& eh, ::xml_schema::flags f = 0, const ::xml_schema::properties& p = ::xml_schema::properties ()); /** * @brief Parse a Xerces-C++ input source with a Xerces-C++ DOM * error handler. * * @param is A Xerces-C++ input source. * @param eh A Xerces-C++ DOM error handler. * @param f Parsing flags. * @param p Parsing properties. * @return A pointer to the root of the object model. * * This function reports parsing errors by calling the error handler. */ ::std::auto_ptr< ::edxl::de::EDXLDistribution > EDXLDistribution_ (::xercesc::InputSource& is, ::xercesc::DOMErrorHandler& eh, ::xml_schema::flags f = 0, const ::xml_schema::properties& p = ::xml_schema::properties ()); /** * @brief Parse a Xerces-C++ DOM document. * * @param d A Xerces-C++ DOM document. * @param f Parsing flags. * @param p Parsing properties. * @return A pointer to the root of the object model. */ ::std::auto_ptr< ::edxl::de::EDXLDistribution > EDXLDistribution_ (const ::xercesc::DOMDocument& d, ::xml_schema::flags f = 0, const ::xml_schema::properties& p = ::xml_schema::properties ()); /** * @brief Parse a Xerces-C++ DOM document. * * @param d A pointer to the Xerces-C++ DOM document. * @param f Parsing flags. * @param p Parsing properties. * @return A pointer to the root of the object model. * * This function is normally used together with the keep_dom and * own_dom parsing flags to assign ownership of the DOM document * to the object model. */ ::std::auto_ptr< ::edxl::de::EDXLDistribution > EDXLDistribution_ (::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument >& d, ::xml_schema::flags f = 0, const ::xml_schema::properties& p = ::xml_schema::properties ()); //@} } } #include #include #include #include #include namespace edxl { namespace de { /** * @name Serialization functions for the %EDXLDistribution document root. */ //@{ /** * @brief Serialize to a standard output stream. * * @param os A standrad output stream. * @param x An object model to serialize. * @param m A namespace information map. * @param e A character encoding to produce XML in. * @param f Serialization flags. * * This function uses exceptions to report serialization errors. */ void EDXLDistribution_ (::std::ostream& os, const ::edxl::de::EDXLDistribution& x, const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (), const ::std::string& e = "UTF-8", ::xml_schema::flags f = 0); /** * @brief Serialize to a standard output stream with an error handler. * * @param os A standrad output stream. * @param x An object model to serialize. * @param eh An error handler. * @param m A namespace information map. * @param e A character encoding to produce XML in. * @param f Serialization flags. * * This function reports serialization errors by calling the error * handler. */ void EDXLDistribution_ (::std::ostream& os, const ::edxl::de::EDXLDistribution& x, ::xml_schema::error_handler& eh, const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (), const ::std::string& e = "UTF-8", ::xml_schema::flags f = 0); /** * @brief Serialize to a standard output stream with a Xerces-C++ DOM * error handler. * * @param os A standrad output stream. * @param x An object model to serialize. * @param eh A Xerces-C++ DOM error handler. * @param m A namespace information map. * @param e A character encoding to produce XML in. * @param f Serialization flags. * * This function reports serialization errors by calling the error * handler. */ void EDXLDistribution_ (::std::ostream& os, const ::edxl::de::EDXLDistribution& x, ::xercesc::DOMErrorHandler& eh, const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (), const ::std::string& e = "UTF-8", ::xml_schema::flags f = 0); /** * @brief Serialize to a Xerces-C++ XML format target. * * @param ft A Xerces-C++ XML format target. * @param x An object model to serialize. * @param m A namespace information map. * @param e A character encoding to produce XML in. * @param f Serialization flags. * * This function uses exceptions to report serialization errors. */ void EDXLDistribution_ (::xercesc::XMLFormatTarget& ft, const ::edxl::de::EDXLDistribution& x, const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (), const ::std::string& e = "UTF-8", ::xml_schema::flags f = 0); /** * @brief Serialize to a Xerces-C++ XML format target with an error * handler. * * @param ft A Xerces-C++ XML format target. * @param x An object model to serialize. * @param eh An error handler. * @param m A namespace information map. * @param e A character encoding to produce XML in. * @param f Serialization flags. * * This function reports serialization errors by calling the error * handler. */ void EDXLDistribution_ (::xercesc::XMLFormatTarget& ft, const ::edxl::de::EDXLDistribution& x, ::xml_schema::error_handler& eh, const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (), const ::std::string& e = "UTF-8", ::xml_schema::flags f = 0); /** * @brief Serialize to a Xerces-C++ XML format target with a * Xerces-C++ DOM error handler. * * @param ft A Xerces-C++ XML format target. * @param x An object model to serialize. * @param eh A Xerces-C++ DOM error handler. * @param m A namespace information map. * @param e A character encoding to produce XML in. * @param f Serialization flags. * * This function reports serialization errors by calling the error * handler. */ void EDXLDistribution_ (::xercesc::XMLFormatTarget& ft, const ::edxl::de::EDXLDistribution& x, ::xercesc::DOMErrorHandler& eh, const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (), const ::std::string& e = "UTF-8", ::xml_schema::flags f = 0); /** * @brief Serialize to an existing Xerces-C++ DOM document. * * @param d A Xerces-C++ DOM document. * @param x An object model to serialize. * @param f Serialization flags. * * Note that it is your responsibility to create the DOM document * with the correct root element as well as set the necessary * namespace mapping attributes. */ void EDXLDistribution_ (::xercesc::DOMDocument& d, const ::edxl::de::EDXLDistribution& x, ::xml_schema::flags f = 0); /** * @brief Serialize to a new Xerces-C++ DOM document. * * @param x An object model to serialize. * @param m A namespace information map. * @param f Serialization flags. * @return A pointer to the new Xerces-C++ DOM document. */ ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > EDXLDistribution_ (const ::edxl::de::EDXLDistribution& x, const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (), ::xml_schema::flags f = 0); //@} void operator<< (::xercesc::DOMElement&, const contentObjectType&); void operator<< (::xercesc::DOMElement&, const nonXMLContentType&); void operator<< (::xercesc::DOMElement&, const xmlContentType&); void operator<< (::xercesc::DOMElement&, const anyXMLType&); void operator<< (::xercesc::DOMElement&, const valueListType&); void operator<< (::xercesc::DOMElement&, const valueSchemeType&); void operator<< (::xercesc::DOMElement&, const targetAreaType&); void operator<< (::xercesc::DOMElement&, const statusValues&); void operator<< (::xercesc::DOMAttr&, const statusValues&); void operator<< (::xml_schema::list_stream&, const statusValues&); void operator<< (::xercesc::DOMElement&, const typeValues&); void operator<< (::xercesc::DOMAttr&, const typeValues&); void operator<< (::xml_schema::list_stream&, const typeValues&); void operator<< (::xercesc::DOMElement&, const EDXLDistribution&); } } #include // Begin epilogue. // // // End epilogue. #endif // EDXL_DE_HXX -------------- next part -------------- #include "tmp/EDXL-DE.hxx" #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace xercesc; using namespace edxl::de; int main (int argc, char ** argv ) { xercesc::XMLPlatformUtils::Initialize(); xercesc::XercesDOMParser parser; parser.parse( "edxl_test.xml"); xercesc::DOMDocument* doc = parser.getDocument(); xercesc::DOMElement* e = doc->getDocumentElement(); EDXLDistribution de1( *e ); EDXLDistribution::distributionID_type dId = "10"; EDXLDistribution::senderID_type sId = "11"; EDXLDistribution::dateTimeSent_type date ( 2009, 1, 2, 3, 4, 5); EDXLDistribution::distributionStatus_type ds = statusValues::Exercise; EDXLDistribution::distributionType_type dt = typeValues::Report; EDXLDistribution::combinedConfidentiality_type cct = "1"; EDXLDistribution de2( dId, sId, date, ds ,dt, cct ); XMLCh tempStr[100]; XMLString::transcode("Range", tempStr, 99); DOMImplementation* impl = DOMImplementationRegistry::getDOMImplementation(tempStr); //xercesc::DOMDocument* doc = impl->createDocument(); // xercesc::DOMElement* e = doc->getDocumentElement(); *e << de2; DOMLSSerializer* theSerializer = ((DOMImplementationLS*)impl)->createLSSerializer(); DOMLSOutput* theOutput = ((DOMImplementationLS*)impl)->createLSOutput(); StdOutFormatTarget* myFormTarget = new StdOutFormatTarget(); theOutput->setByteStream(myFormTarget); theSerializer->write( e, theOutput ); return 0; } -------------- next part -------------- A non-text attachment was scrubbed... Name: edxl_test.xml Type: text/xml Size: 2052 bytes Desc: edxl_test.xml Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20100617/c5998748/edxl_test-0001.bin From boris at codesynthesis.com Thu Jun 17 04:48:27 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Jun 17 02:37:41 2010 Subject: [xsd-users] WG: CodeSynthesis problem In-Reply-To: <74C7EC991D7DFB41A525D22BFD4E090805ADECEB12@sdestex2> References: <74C7EC991D7DFB41A525D22BFD4E090805ADECEB12@sdestex2> Message-ID: Hi Abhijit, Abhijit Sovakar writes: > We generated C++ classes for the EDXL-DE schema with CodeSynthesis. > ( command line: xsd cxx-tree --generate-serialization --generate-doxygen > --namespace-map urn:oasis:names:tc:emergency:EDXL:DE:1.0=edxl::de > EDXL-DE.xsd ) I noticed that your schema uses element and attribute wildcards (xsd:any and xsd:anyAttribute). If you need to access this data, you will need to add the --generate-wildcard option to the above command line. The wildcard data is represented in the object model as DOM fragments. For more information on how to handle this see the 'wildcard' example in the examples/cxx/tree/ directory as well as Section 2.12, "Mapping for any and anyAttribute" in the C++/Tree Mapping User Manual: http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.12 > 1st Problem: > However the generated code wasn?t able to read the xml file due to > namespace issues. You perform your own XML to DOM parsing and the parser that you have created does not recognize XML namespaces by default. To turn the XML namespace support on you will need to add the following line before calling parse(): parser.setDoNamespaces (true); I assume you also know that the XSD compiler generates parsing and serialization functions that hide the details of creating the Xerces-C++ parser/serializer and performing XML to DOM parsing and DOM to XML serialization. There are, however, valid situations where you may want to setup your own parsing/serialization. The XSD distribution contains a number of examples ('multiroot', 'messaging', 'caching', 'embedded', and 'performance') that do this and include boilerplate code for Xerces-C++ parser/serializer setup. > 2.Problem: > We initialized an EDXLDistribution element and wrote that to stdout. > If using that output as input, it can?t be read as well as the p1 > namespace alias is treated as element name. The above call to setDoNamespaces() also fixes this problem. Boris From bidski at bigpond.net.au Sun Jun 20 21:32:49 2010 From: bidski at bigpond.net.au (Bidski) Date: Sun Jun 20 21:33:56 2010 Subject: [xsd-users] XSD 3.3.0 Example Problems Message-ID: <07309EDAE53D4FC1839610F7150F4193@Panda> Hello all, I was running throught XSDs examples today, compiling and running them to make sure everything is working, when I got some interesting errors trying to build the tree/custom/comments example. I received these errors $ make ../../../../../bin/xsd cxx-tree --generate-inline --generate-serialization --extern-xml-schema xml-schema.xsd people.xsd ../../../../../bin/xsd cxx-tree --generate-xml-schema --generate-serialization --custom-type anyType=/type_base --hxx-epilogue '#include "xml-schema-custom.hxx"' xml-schema.xsd g++ -I../../../../../libxsd -W -Wall -O3 -c driver.cxx -o driver.o In file included from people.hxx:58:0, from driver.cxx:12: xml-schema.hxx:102:11: error: 'C' does not name a type xml-schema.hxx:103:42: error: 'type' was not declared in this scope xml-schema.hxx:103:47: error: template argument 1 is invalid xml-schema.hxx:103:60: error: invalid type in declaration before ';' token xml-schema.hxx:158:50: error: 'type' was not declared in this scope xml-schema.hxx:158:55: error: template argument 3 is invalid xml-schema.hxx:158:62: error: invalid type in declaration before ';' token Having a look at the lines in the, I found the following line 102: typedef C:/msys/1.0 type; The other errors are based on that one. I downloaded a fresh copy of the files just to make sure they are clean, but the error is persistant. Why is that path showing up in this file? Regards Bidski From boris at codesynthesis.com Mon Jun 21 11:44:56 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Jun 21 09:34:11 2010 Subject: [xsd-users] XSD 3.3.0 Example Problems In-Reply-To: <07309EDAE53D4FC1839610F7150F4193@Panda> References: <07309EDAE53D4FC1839610F7150F4193@Panda> Message-ID: Hi Bidski, Bidski writes: > ../../../../../bin/xsd cxx-tree --generate-xml-schema > --generate-serialization --custom-type anyType=/type_base > --hxx-epilogue '#include "xml-schema-custom.hxx"' xml-schema.xsd > > [..] > > Having a look at the lines in the, I found the following > > line 102: typedef C:/msys/1.0 type; It looks like you environment (I presume it is MSYS) automatically translates sub-strings that start with / (anyType=/type_base) to absolute Windows paths. This could be the shell or it could the version of make distributed with MSYS. You can try to prevent this translation by quoting the string (e.g., 'anyType=/type_base') or by escaping the slash (e.g., anyType=\/type_base). You can also consult the MSYS documentation and/or community for more information on this issue (I did a quick Google search but didn't find anything useful). Boris From bidski at bigpond.net.au Mon Jun 21 17:42:45 2010 From: bidski at bigpond.net.au (Bidski) Date: Mon Jun 21 17:42:58 2010 Subject: [xsd-users] XSD 3.3.0 Example Problems In-Reply-To: References: <07309EDAE53D4FC1839610F7150F4193@Panda> Message-ID: Hi Boris, Thanks for the reply, unfortunately neither of those 2 options worked, I even tried combining both of them. If I escape the / (anyType=\/type_base) all that comes out in the file is typedef \ type; My google searching also turns up nothing. I think this is either a problem with XSD.exe running under MSYS or something to do with MSYS itself as this happens even if I copy and paste the XSD.exe command into the prompt. Are you able to tell me ho that line should read and I will just copy and paste it into place? Regards Bidski -------------------------------------------------- From: "Boris Kolpackov" Sent: Tuesday, June 22, 2010 1:44 AM To: "Bidski" Cc: "CodeSynthesis XSD" Subject: Re: [xsd-users] XSD 3.3.0 Example Problems > Hi Bidski, > > Bidski writes: > >> ../../../../../bin/xsd cxx-tree --generate-xml-schema >> --generate-serialization --custom-type anyType=/type_base >> --hxx-epilogue '#include "xml-schema-custom.hxx"' xml-schema.xsd >> >> [..] >> >> Having a look at the lines in the, I found the following >> >> line 102: typedef C:/msys/1.0 type; > > It looks like you environment (I presume it is MSYS) automatically > translates sub-strings that start with / (anyType=/type_base) to > absolute Windows paths. This could be the shell or it could the > version of make distributed with MSYS. You can try to prevent this > translation by quoting the string (e.g., 'anyType=/type_base') or > by escaping the slash (e.g., anyType=\/type_base). You can also > consult the MSYS documentation and/or community for more information > on this issue (I did a quick Google search but didn't find anything > useful). > > Boris > From juergenwaser at gmx.at Tue Jun 22 09:17:43 2010 From: juergenwaser at gmx.at (=?ISO-8859-1?Q?J=FCrgen_Waser?=) Date: Tue Jun 22 09:31:06 2010 Subject: [xsd-users] Parsing exception with XSD hierarchy - No type information available for a type Message-ID: <4C20B7F7.3090406@gmx.at> In our framework, we have an XSD type hierarchy across several dlls. In principle, the hierarchy looks like this: 1. base.dll has BaseSettings.xsd which is compiled into the dll with the following xsd args (using XSD 3.3): SET(BASE_XSD_ARGS cxx-tree --extern-xml-schema "Schema.h" --hxx-suffix .h --cxx-suffix .cpp --generate-serialization --generate-ostream --generate-doxygen --generate-comparison --generate-default-ctor --generate-intellisense --function-naming java --type-regex "/ \(.+\)_t/\\u$1/" --generate-polymorphic --polymorphic-type-all --export-maps --include-regex "|^(.+)/(.+)|\\u$2|" --export-symbol BASE_DLL --hxx-prologue "#include " ) 2. Then we have several plugin dlls which have schemas that derive from BaseSettings.xsd. e.g plugin.dll has PluginSettings.xsd extends BaseSettings.xsd These derived schemas are compiled with: SET(PLUGIN_XSD_ARGS cxx-tree --extern-xml-schema "Schema.h" --hxx-suffix .h --cxx-suffix .cpp --generate-serialization --generate-ostream --generate-doxygen --generate-default-ctor --generate-intellisense --generate-wildcard --function-naming java --type-regex "/ \(.+\)_t/\\u$1/" --polymorphic-type-all --generate-polymorphic --import-maps --include-regex "|^(.+)/(.+)|\\u$2|" ) 3. Then we have another dll (master) which specifies a MasterSettings.xsd that includes the BaseSettings.xsd and all the derived XSDs, i.e master.dll has MasterSettings.xsd includes BaseSettings.xsd, PluginSettings.xsd MasterSettings.xsd is compiled with almost the same args as the plugin XSDs but extended with: SET(MASTER_XSD_ARGS ${PLUGIN_XSD_ARGS } --export-symbol SERVER_DLL --hxx-prologue "#include " ) => A main executable loads all the aforementioned dlls. => Parsing an XML document of type MasterSettings.xsd works fine. Now the problem: ------------------- Recently we have introduced unit tests into the framework. A unit test is an executable, e.g test.exe (and NOT a dll) and has a schema that derives from BaseSettings.xsd too. i.e test.exe has TestSettings.xsd extends BaseSettings.xsd TestSettings.xsd is compiled with the same arguments as the plugin XSDs (PLUGIN_XSD_ARGS). => test.exe loads the base.dll and master.dll. => Parsing an XML of type MasterSettings FAILS with the following exception: 'No type information available for a type: No type information available for TestSettings.xsd' So somehow, for dlls the derived XSDs are found, but for the executables they are not. This error occurs for XSD 3.2 and for XSD 3.3. What could cause this? Thanks for your help, J?rgen From boris at codesynthesis.com Tue Jun 22 14:18:58 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Jun 22 12:08:10 2010 Subject: [xsd-users] Parsing exception with XSD hierarchy - No type information available for a type In-Reply-To: <4C20B7F7.3090406@gmx.at> References: <4C20B7F7.3090406@gmx.at> Message-ID: Hi J?rgen, J?rgen Waser writes: > SET(PLUGIN_XSD_ARGS > cxx-tree > --extern-xml-schema "Schema.h" > --hxx-suffix .h > --cxx-suffix .cpp > --generate-serialization > --generate-ostream > --generate-doxygen > --generate-default-ctor > --generate-intellisense > --generate-wildcard > --function-naming java > --type-regex "/ \(.+\)_t/\\u$1/" > --polymorphic-type-all > --generate-polymorphic > --import-maps > --include-regex "|^(.+)/(.+)|\\u$2|" > ) I see that you don't have --export-symbol option for schemas that you put in plugin DLLs. This will most likely cause problems. You will need to have a separate export symbol for each DLL and define it accordingly when building such DLLs. > Now the problem: > ------------------- > > Recently we have introduced unit tests into the framework. A unit test > is an executable, e.g test.exe (and NOT a dll) and has a schema that > derives from BaseSettings.xsd too. i.e > > test.exe has TestSettings.xsd extends BaseSettings.xsd > > TestSettings.xsd is compiled with the same arguments as the plugin XSDs > (PLUGIN_XSD_ARGS). > > => test.exe loads the base.dll and master.dll. > => Parsing an XML of type MasterSettings FAILS with the following exception: > > 'No type information available for a type: No type information available > for TestSettings.xsd' Provided that you fix the problem mentioned above, I don't see why you get this error. Generally, to make sure that polymorphism maps work correctly across DLLs, you will need to do the following: 1. Have a 'root' DLL with schemas compiled with the --export-maps. 2. All 'derived' DLLs with schemas should be compiled with --import-maps and linked to the root DLL. 3. All executables with schemas should be compiled with --import-maps and linked to the root DLL. Boris From boris at codesynthesis.com Tue Jun 22 14:36:18 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Jun 22 12:25:30 2010 Subject: [xsd-users] XSD 3.3.0 Example Problems In-Reply-To: References: <07309EDAE53D4FC1839610F7150F4193@Panda> Message-ID: Hi Bidski, Bidski writes: > My google searching also turns up nothing. I think this is either a > problem with XSD.exe running under MSYS or something to do with MSYS > itself as this happens even if I copy and paste the XSD.exe command into > the prompt. I am pretty sure this is a problem with (or a 'misfeature" of) MSYS. You may want to contact the MinGW/MSYS mailing list if you want to dig deeper into this. > Are you able to tell me ho that line should read and I will just copy and > paste it into place? The relevant code fragment in that file should look like so: // anyType and anySimpleType. // typedef ::xsd::cxx::tree::type type_base; class type; typedef ::xsd::cxx::tree::simple_type< type > simple_type; typedef ::xsd::cxx::tree::type container; Boris From bidski at bigpond.net.au Tue Jun 22 17:47:07 2010 From: bidski at bigpond.net.au (Bidski) Date: Tue Jun 22 17:47:47 2010 Subject: [xsd-users] XSD 3.3.0 Example Problems In-Reply-To: References: <07309EDAE53D4FC1839610F7150F4193@Panda> Message-ID: Hi Boris, Thank you for that, I am in the process of talking with a MSYS/MinGW group about this. Regards Bidski -------------------------------------------------- From: "Boris Kolpackov" Sent: Wednesday, June 23, 2010 4:36 AM To: "Bidski" Cc: "CodeSynthesis XSD" Subject: Re: [xsd-users] XSD 3.3.0 Example Problems > Hi Bidski, > > Bidski writes: > >> My google searching also turns up nothing. I think this is either a >> problem with XSD.exe running under MSYS or something to do with MSYS >> itself as this happens even if I copy and paste the XSD.exe command into >> the prompt. > > I am pretty sure this is a problem with (or a 'misfeature" of) MSYS. > You may want to contact the MinGW/MSYS mailing list if you want to > dig deeper into this. > > >> Are you able to tell me ho that line should read and I will just copy and >> paste it into place? > > The relevant code fragment in that file should look like so: > > // anyType and anySimpleType. > // > typedef ::xsd::cxx::tree::type type_base; > class type; > typedef ::xsd::cxx::tree::simple_type< type > simple_type; > typedef ::xsd::cxx::tree::type container; > > > Boris > From jwaser at vrvis.at Wed Jun 23 06:58:16 2010 From: jwaser at vrvis.at (=?ISO-8859-1?Q?J=FCrgen_Waser?=) Date: Wed Jun 23 07:00:42 2010 Subject: [xsd-users] Parsing exception with XSD hierarchy - No type information available for a type In-Reply-To: References: <4C20B7F7.3090406@gmx.at> Message-ID: <4C21E8C8.6020303@vrvis.at> On 22.06.2010 20:18, Boris Kolpackov wrote: > Hi J?rgen, > > J?rgen Waser writes: > > >> SET(PLUGIN_XSD_ARGS >> cxx-tree >> --extern-xml-schema "Schema.h" >> --hxx-suffix .h >> --cxx-suffix .cpp >> --generate-serialization >> --generate-ostream >> --generate-doxygen >> --generate-default-ctor >> --generate-intellisense >> --generate-wildcard >> --function-naming java >> --type-regex "/ \(.+\)_t/\\u$1/" >> --polymorphic-type-all >> --generate-polymorphic >> --import-maps >> --include-regex "|^(.+)/(.+)|\\u$2|" >> ) >> > I see that you don't have --export-symbol option for schemas that > you put in plugin DLLs. This will most likely cause problems. You > will need to have a separate export symbol for each DLL and define > it accordingly when building such DLLs. > > > >> Now the problem: >> ------------------- >> >> Recently we have introduced unit tests into the framework. A unit test >> is an executable, e.g test.exe (and NOT a dll) and has a schema that >> derives from BaseSettings.xsd too. i.e >> >> test.exe has TestSettings.xsd extends BaseSettings.xsd >> >> TestSettings.xsd is compiled with the same arguments as the plugin XSDs >> (PLUGIN_XSD_ARGS). >> >> => test.exe loads the base.dll and master.dll. >> => Parsing an XML of type MasterSettings FAILS with the following exception: >> >> 'No type information available for a type: No type information available >> for TestSettings.xsd' >> > Provided that you fix the problem mentioned above, I don't see why > you get this error. Generally, to make sure that polymorphism maps > work correctly across DLLs, you will need to do the following: > > 1. Have a 'root' DLL with schemas compiled with the --export-maps. > > 2. All 'derived' DLLs with schemas should be compiled with --import-maps > and linked to the root DLL. > > 3. All executables with schemas should be compiled with --import-maps > and linked to the root DLL. > > Boris > > > Thanks for your fast response. In our case, it works without the --export-symbol option in the plugin dlls because we do not include the generated plugin schema classes outside the plugin. Also, we are exactly following your guidelines for polymorphism maps. We have a theory why this could be going wrong. The executable (using --import-maps) creates the factory map at the time of static initialization. In this map, the TestSettings are registered. However, at this point, base.dll has been loaded but it's static initialization has not yet happened. Since base.dll has --export-maps specified, it creates its own factory. This second factory is used when parsing but it lacks the TestSettings entry. Could that be the problem? Jurgen -- ------------------------------------------------------------------ Dipl.-Ing. J?rgen Waser, (Researcher), Simulation and Visualization VRVis Forschungs-GmbH, www.VRVis.at, FN: 195369h, HG Wien mail: jwaser@vrvis.at, tel +43(0)1 20501 30803 From claudevms at comcast.net Wed Jun 23 01:27:08 2010 From: claudevms at comcast.net (Bruce Allen) Date: Wed Jun 23 10:24:07 2010 Subject: [xsd-users] XSD questions In-Reply-To: <1924067156.9210181277269867552.JavaMail.root@sz0038a.westchester.pa.mail.comcast.net> Message-ID: <1027970037.9211721277270828798.JavaMail.root@sz0038a.westchester.pa.mail.comcast.net> I am having trouble with the hello example program. The documentation on the web site refers to the C++ parser?, --xml-parser which is expat, but when I look at the xsd /? command there are no switches that refer to the C++ or XML parsers? Also, how do I specify that I want to Xerces-C++? I tried using the /l:cpp switch in the xsd /? command but I only get a "dot h" file and no CPP file. Does XML and an XML parser take the place of LEX and YACC? I have used them in the past. I'm trying to see the road map here. Do I create XML files for input to my applications and use XSD to generate classes for my application? Then my application can call the methods in these classes to read in my XML files? The C++/parser seems to allow an application to read and write XML and that is because the xerces code? I tried the wiki page to integrate the XSD tool into Visual C++ 2008 but it the instructions for the menus don't match whats in the 2008 version. The "show XSLT" menu item under XML show/creates the .XSD file in VS C++. Is it compatible with the XSD tool? Is there a book available with detailed instructions for integrating XSD with VS C++ 2008? Thanks in advanced and I'm sorry this post is so long. I'm a C programmer who normally does real-time networking stuff trying to make up for lost time. Being one of the recently unemployed I have some time to learn some modern stuff. From boris at codesynthesis.com Wed Jun 23 13:06:19 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Jun 23 10:55:30 2010 Subject: [xsd-users] Parsing exception with XSD hierarchy - No type information available for a type In-Reply-To: <4C21E8C8.6020303@vrvis.at> References: <4C20B7F7.3090406@gmx.at> <4C21E8C8.6020303@vrvis.at> Message-ID: Hi J?rgen, J?rgen Waser writes: > In our case, it works without the --export-symbol option in the plugin > dlls because we do not include the generated plugin schema classes > outside the plugin. Ok, I think this could work. > We have a theory why this could be going wrong. The executable (using > --import-maps) creates the factory map at the time of static > initialization. In this map, the TestSettings are registered. However, > at this point, base.dll has been loaded but it's static initialization > has not yet happened. Since base.dll has --export-maps specified, it > creates its own factory. This second factory is used when parsing but it > lacks the TestSettings entry. Could that be the problem? I don't think this is what happens. The polymorphic maps use the initialization technique that does not depend on the order of initialization of individual object files within the same executable or across multiple DLLs. In the end each map is represented as a pointer to the map class and is static-initialized to 0. This works across multiple DLLs if this pointer is defined and exported from the 'root' DLL (that's what the --export-maps option does) and is imported by everybody else (--import-maps). Things break if you have, for example, a DLL and an executable that both have such a pointer. I suggest that you double check that every single schema in your project, except for the ones in the 'root' DLL, is compiled with the --import-maps option. This problem can be caused by a single "stray" schema that is not compiled with this option. Perhaps you have another schema somewhere, unrelated to your plugin architecture, that you compile differently? If none of this helps, you can try to analyze your DLLs, executables and individual object files with the dumpbin[1] utility that comes with Visual Studio. It has a number of options that show which symbols are defined by an executable as well as which ones are exported/imported from DLLs. The idea here is to make sure that the map pointer mentioned above is exported from the 'root' DLL and is imported by everyone else and none of the executables define their own copies of these pointers. [1] http://support.microsoft.com/kb/177429 Boris From boris at codesynthesis.com Wed Jun 23 13:37:29 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Jun 23 11:26:39 2010 Subject: [xsd-users] XSD questions In-Reply-To: <1027970037.9211721277270828798.JavaMail.root@sz0038a.westchester.pa.mail.comcast.net> References: <1924067156.9210181277269867552.JavaMail.root@sz0038a.westchester.pa.mail.comcast.net> <1027970037.9211721277270828798.JavaMail.root@sz0038a.westchester.pa.mail.comcast.net> Message-ID: Hi Bruce, Bruce Allen writes: > I am having trouble with the hello example program. The documentation > on the web site refers to the C++ parser?, --xml-parser which is expat, > but when I look at the xsd /? command there are no switches that refer > to the C++ or XML parsers? You are most likely using Microsoft XSD.exe (which is a .NET XML Schema compiler) instead of CodeSynthesis XSD. For more information on this issue see the "Conflict with Microsoft xsd.exe" section in the Using XSD with Microsoft Visual Studio wiki page: http://wiki.codesynthesis.com/Using_XSD_with_Microsoft_Visual_Studio In addition, if you want to be able to run XSD from the command line, you will need to add the path to the bin/ directory in the XSD distribution to the PATH environment variable (using the .msi installer is a great way to make sure this is done automatically). > Also, how do I specify that I want to Xerces-C++? In the C++/Parser mapping, Xerces-C++ is the default XML parser so you don't need to specify any additional options. > Does XML and an XML parser take the place of LEX and YACC? I have used > them in the past. I'm trying to see the road map here. Do I create XML > files for input to my applications and use XSD to generate classes for > my application? Then my application can call the methods in these > classes to read in my XML files? Not exactly. You use XML to "store" or "encode" data. The XML documents can be written by you or they can be created by programs. Once you "specialize" the XML language to encode your specific data (for example, people in the organization or books in the library), then you have created an "XML vocabulary". A formal way to describe a vocabulary is to create an XML Schema definition (.xsd) for it. The schema can then be given to the CodeSynthesis XSD compiler which will produce the C++ classes corresponding to your XML vocabulary. These classes are called the "object model". The object model represents the data stored in your XML documents and can be used to extract that data from XML or to store it back to XML. There are also multitude of tutorials on XML and XML Schema available on the web. > The C++/parser seems to allow an application to read and write XML > and that is because the xerces code? The C++/Parser mapping is actually a fairly specialized XML Schema to C++ mapping in that it does not create an in-memory representation of the data stored in XML but rather sends the data to the application via callback functions to be handled as it is parsed. If you are new to XML then a much better mapping to start with would be C++/Tree: http://www.codesynthesis.com/products/xsd/c++/tree/ The getting started guide for this mapping is here: http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/ > I tried the wiki page to integrate the XSD tool into Visual C++ 2008 > but it the instructions for the menus don't match whats in the 2008 > version. That's probably because you haven't set the rule files paths correctly or haven't enabled them in your project. The wiki page has the step- by-step instructions: http://wiki.codesynthesis.com/Using_XSD_with_Microsoft_Visual_Studio#Visual_Studio_2005_.288.0.29_and_2008_.289.0.29 Boris From bidski at bigpond.net.au Wed Jun 23 22:14:58 2010 From: bidski at bigpond.net.au (Bidski) Date: Wed Jun 23 22:15:28 2010 Subject: [xsd-users] XSD 3.3.0 Example Problems In-Reply-To: References: <07309EDAE53D4FC1839610F7150F4193@Panda> Message-ID: Hello Boris, If you are interested in the soultion I found to my previous problem, here it is. Changing the following line in the makefile from XML_SCHEMA_XSDFLAGS := --generate-xml-schema --generate-serialization \ --custom-type anyType=/type_base \ --hxx-epilogue '\#include "xml-schema-custom.hxx"' To XML_SCHEMA_XSDFLAGS := --generate-xml-schema --generate-serialization \ --custom-type anyType=//type_base \ --hxx-epilogue '\#include "xml-schema-custom.hxx"' Gives the correct output in xml-schema.hxx and allows the makefile to run through to completion without error. Regards Bidski From bschindler at inf.ethz.ch Thu Jun 24 03:59:27 2010 From: bschindler at inf.ethz.ch (Benjamin Schindler) Date: Thu Jun 24 04:00:00 2010 Subject: [xsd-users] gcc visibility, serializer-map and typeinfo Message-ID: <4C23105F.6000000@inf.ethz.ch> Hi Since we switched to xsd-3.3, I wanted to turn on gcc-visibility default to hidden (which is recommended usually). However, I got stomped by a problem in the type-serializer-map.hxx The problem is that the type_map of type_serializer_map stores pointers to type_id structs. These type_info structs seem to have different addresses when compiled with --visbility=hidden in different shared objects. Some light on this issue is shed on in this faq entry: http://gcc.gnu.org/faq.html#dso The problem manifests this way: When my object to be serialized is created in the so's loaded at startup time, it works. The xsd is compiled into dataflow.so, and the object is created and serialized in server.so and it works fine. However, it does not work, when I create the xsd object in a plugin (i.e. a dlopened library) and serialize it in server.so. I get the exception thrown on type-serializer-map.txx:344. I don't know whether it would work when I'd serialize it in the dlopened lib itself - might work, but I'm not too familiar with the xsd internals. Please also note that I added -E to my ldflags a long time ago to make rtti work across shared object files as noted in the link above. I don't really know what kind of solution to propose. -fvisibility=hidden is really recommended for compilation of any shared object file on linux Cheers Benjamin From bschindler at inf.ethz.ch Thu Jun 24 04:43:48 2010 From: bschindler at inf.ethz.ch (Benjamin Schindler) Date: Thu Jun 24 04:44:18 2010 Subject: [xsd-users] Parsing exception with XSD hierarchy - No type information available for a type In-Reply-To: References: <4C20B7F7.3090406@gmx.at> <4C21E8C8.6020303@vrvis.at> Message-ID: <4C231AC4.3030909@inf.ethz.ch> Hi I'm working on the same project and I just digged into this problem a little and it's fascinating :) So I set a breakpoing on type-factory-map.txx:231 (register_type). I observed this pointers of the factory etc. We have an exe + 4 dll's. Static initialization happens in this order: - utils.dll (schema without --export-maps/--import-maps) - datastructures.dll (--export maps) - dataflow.dll (contains the --export-maps) - server.dll (--import-maps) - main executable (--import-maps) So, I looked at the this pointer of the factory, and it's rather fascinating (lets make it easy and use symbolic adresses): - utils -> 0x1 - datastructures -> 0x2 - dataflow -> 0x3 - server -> 0x3 - executable -> 0x4????? So the server correctly found the map from dataflow, but the executable didnd't. How can that happen? I double checked - the compiled schema looks like this at the relevant line: template struct __declspec (dllimport) type_factory_plate< 0, char > We should fix our case with 2x export-maps, that's clear, but it works in the plugin case, so I have a hard time believing this is the problem. A side note: wouldn't it work if we only specified --export-maps on utils and used --import-maps everywhere else (even though the polymorphic types are in dataflow)? This would save quite a few map-instantiations (adding primitive types) which would reduce startup time Thanks for your time! Benjamin On 06/23/2010 07:06 PM, Boris Kolpackov wrote: > Hi J?rgen, > > J?rgen Waser writes: > >> In our case, it works without the --export-symbol option in the plugin >> dlls because we do not include the generated plugin schema classes >> outside the plugin. > > Ok, I think this could work. > > >> We have a theory why this could be going wrong. The executable (using >> --import-maps) creates the factory map at the time of static >> initialization. In this map, the TestSettings are registered. However, >> at this point, base.dll has been loaded but it's static initialization >> has not yet happened. Since base.dll has --export-maps specified, it >> creates its own factory. This second factory is used when parsing but it >> lacks the TestSettings entry. Could that be the problem? > > I don't think this is what happens. The polymorphic maps use the > initialization technique that does not depend on the order of > initialization of individual object files within the same > executable or across multiple DLLs. In the end each map is > represented as a pointer to the map class and is static-initialized > to 0. This works across multiple DLLs if this pointer is defined > and exported from the 'root' DLL (that's what the --export-maps > option does) and is imported by everybody else (--import-maps). > Things break if you have, for example, a DLL and an executable that > both have such a pointer. > > I suggest that you double check that every single schema in your > project, except for the ones in the 'root' DLL, is compiled with > the --import-maps option. This problem can be caused by a single > "stray" schema that is not compiled with this option. Perhaps you > have another schema somewhere, unrelated to your plugin architecture, > that you compile differently? > > If none of this helps, you can try to analyze your DLLs, executables > and individual object files with the dumpbin[1] utility that comes > with Visual Studio. It has a number of options that show which > symbols are defined by an executable as well as which ones are > exported/imported from DLLs. The idea here is to make sure that > the map pointer mentioned above is exported from the 'root' DLL > and is imported by everyone else and none of the executables > define their own copies of these pointers. > > [1] http://support.microsoft.com/kb/177429 > > Boris > From bschindler at inf.ethz.ch Thu Jun 24 05:35:25 2010 From: bschindler at inf.ethz.ch (Benjamin Schindler) Date: Thu Jun 24 05:35:38 2010 Subject: [xsd-users] Parsing exception with XSD hierarchy - No type information available for a type In-Reply-To: <4C231AC4.3030909@inf.ethz.ch> References: <4C20B7F7.3090406@gmx.at> <4C21E8C8.6020303@vrvis.at> <4C231AC4.3030909@inf.ethz.ch> Message-ID: <4C2326DD.7030201@inf.ethz.ch> Hi So I just tried what I was asking - I put --export-maps in utils, and used --imports for all the rest and that took care of the problem. I cannot really explain the behaviour of the run I posted before, can you boris? Cheers Benjamin On 06/24/2010 10:43 AM, Benjamin Schindler wrote: > Hi > > I'm working on the same project and I just digged into this problem a > little and it's fascinating :) > > So I set a breakpoing on type-factory-map.txx:231 (register_type). I > observed this pointers of the factory etc. We have an exe + 4 dll's. > Static initialization happens in this order: > > - utils.dll (schema without --export-maps/--import-maps) > - datastructures.dll (--export maps) > - dataflow.dll (contains the --export-maps) > - server.dll (--import-maps) > - main executable (--import-maps) > > So, I looked at the this pointer of the factory, and it's rather > fascinating (lets make it easy and use symbolic adresses): > > - utils -> 0x1 > - datastructures -> 0x2 > - dataflow -> 0x3 > - server -> 0x3 > - executable -> 0x4????? > > So the server correctly found the map from dataflow, but the executable > didnd't. How can that happen? > I double checked - the compiled schema looks like this at the relevant > line: > > template struct __declspec (dllimport) type_factory_plate< 0, char > > > We should fix our case with 2x export-maps, that's clear, but it works > in the plugin case, so I have a hard time believing this is the problem. > A side note: wouldn't it work if we only specified --export-maps on > utils and used --import-maps everywhere else (even though the > polymorphic types are in dataflow)? This would save quite a few > map-instantiations (adding primitive types) which would reduce startup time > > Thanks for your time! > Benjamin > > > On 06/23/2010 07:06 PM, Boris Kolpackov wrote: >> Hi J?rgen, >> >> J?rgen Waser writes: >> >>> In our case, it works without the --export-symbol option in the plugin >>> dlls because we do not include the generated plugin schema classes >>> outside the plugin. >> >> Ok, I think this could work. >> >> >>> We have a theory why this could be going wrong. The executable (using >>> --import-maps) creates the factory map at the time of static >>> initialization. In this map, the TestSettings are registered. However, >>> at this point, base.dll has been loaded but it's static initialization >>> has not yet happened. Since base.dll has --export-maps specified, it >>> creates its own factory. This second factory is used when parsing but it >>> lacks the TestSettings entry. Could that be the problem? >> >> I don't think this is what happens. The polymorphic maps use the >> initialization technique that does not depend on the order of >> initialization of individual object files within the same >> executable or across multiple DLLs. In the end each map is >> represented as a pointer to the map class and is static-initialized >> to 0. This works across multiple DLLs if this pointer is defined >> and exported from the 'root' DLL (that's what the --export-maps >> option does) and is imported by everybody else (--import-maps). >> Things break if you have, for example, a DLL and an executable that >> both have such a pointer. >> >> I suggest that you double check that every single schema in your >> project, except for the ones in the 'root' DLL, is compiled with >> the --import-maps option. This problem can be caused by a single >> "stray" schema that is not compiled with this option. Perhaps you >> have another schema somewhere, unrelated to your plugin architecture, >> that you compile differently? >> >> If none of this helps, you can try to analyze your DLLs, executables >> and individual object files with the dumpbin[1] utility that comes >> with Visual Studio. It has a number of options that show which >> symbols are defined by an executable as well as which ones are >> exported/imported from DLLs. The idea here is to make sure that >> the map pointer mentioned above is exported from the 'root' DLL >> and is imported by everyone else and none of the executables >> define their own copies of these pointers. >> >> [1] http://support.microsoft.com/kb/177429 >> >> Boris >> > From boris at codesynthesis.com Thu Jun 24 15:29:24 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Jun 24 13:18:38 2010 Subject: [xsd-users] gcc visibility, serializer-map and typeinfo In-Reply-To: <4C23105F.6000000@inf.ethz.ch> References: <4C23105F.6000000@inf.ethz.ch> Message-ID: Hi Benjamin, Benjamin Schindler writes: > The problem is that the type_map of type_serializer_map stores pointers > to type_id structs. These type_info structs seem to have different > addresses when compiled with --visbility=hidden in different shared > objects. Some light on this issue is shed on in this faq entry: > http://gcc.gnu.org/faq.html#dso > > The problem manifests this way: When my object to be serialized is > created in the so's loaded at startup time, it works. The xsd is > compiled into dataflow.so, and the object is created and serialized in > server.so and it works fine. > > However, it does not work, when I create the xsd object in a plugin > (i.e. a dlopened library) and serialize it in server.so. I get the > exception thrown on type-serializer-map.txx:344. > I don't know whether it would work when I'd serialize it in the dlopened > lib itself - might work, but I'm not too familiar with the xsd internals. Let me summarize the situation as I see it. Please correct me if I missed something. 1. The same type has different std::type_info objects in different DSOs. 2. GCC uses address comparison in its implementation of type_info::before () which in turn is used in polymorphism maps in XSD. 3. The dynamic linker is supposed to "weed out" duplicate type_info objects so that the process only uses a single object. 4. Exactly the same schemas and DSOs work fine if you use the default visibility instead of hidden. If the above assumptions are correct, I think the problem is that the types that are placed into the plugin DSO have hidden visibility which leads to their type_info objects also having the hidden visibility and the dynamic linker not "seeing" this object when it resolve duplicates. >From the previous emails describing the Windows-related problem you have experienced, I remember that you compile plugin schemas without the --export-symbol option. This would result in exactly the behavior described above. Boris From boris at codesynthesis.com Thu Jun 24 15:40:19 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Jun 24 13:29:30 2010 Subject: [xsd-users] Parsing exception with XSD hierarchy - No type information available for a type In-Reply-To: <4C2326DD.7030201@inf.ethz.ch> References: <4C20B7F7.3090406@gmx.at> <4C21E8C8.6020303@vrvis.at> <4C231AC4.3030909@inf.ethz.ch> <4C2326DD.7030201@inf.ethz.ch> Message-ID: <20100624194019.GA4573@tpad> Hi Benjamin, Benjamin Schindler writes: > So I just tried what I was asking - I put --export-maps in utils, and > used --imports for all the rest and that took care of the problem. > > I cannot really explain the behaviour of the run I posted before, can > you boris? Your setup had pretty much "enumerated" all possibilities when it comes to exporting/importing maps: - utils.dll had private maps - datastructures.dll had its own maps and exported them - dataflow.dll had its own maps and also exported them - server.dll imported maps (who knows from which of the above two DLLs) - main executable imported maps Nedless to say this setup is broken -- your should have a single base DLL that exports the maps and every other DLL and executable should import them (the exception would be schemas that are not compiled with --generate-polymorphic). I am not that familiar with the Windows dynamic linker internals to try to figure out why you got the results that you got. Even a broken clock is right twice a day ;-). Boris From claudevms at comcast.net Thu Jun 24 18:01:32 2010 From: claudevms at comcast.net (Bruce Allen) Date: Thu Jun 24 18:01:38 2010 Subject: [xsd-users] no declaration found for element 'hello' In-Reply-To: <734778900.10029081277416816768.JavaMail.root@sz0038a.westchester.pa.mail.comcast.net> Message-ID: <1772687600.10029431277416892420.JavaMail.root@sz0038a.westchester.pa.mail.comcast.net> I followed all the great advice I have gotten here and I'm using the VS 2008 examples from the XSD sites. Everything compiles and links, bit I am getting the following error message: c:\\hello.xml:2:8 error: no declaration found for element 'hello' There are many differences among the hello example on the website, and the vc-9.0 download examples. When I typed in the hello example from the website I tried to configure the hello.xsd properties for c++/tree but the link didn't work and the c++/parser configuration did work. I was able to run against the hello.xml file to generate the above error. I was able to get the same error from running a build of the downloaded vc-9.0 example. The vc-9.0 properties appears to be using c++/parser and "Custom Build Tool" instead of specifying the c++/parser or c++/tree as options? Thanks in advance From bschindler at inf.ethz.ch Fri Jun 25 04:48:56 2010 From: bschindler at inf.ethz.ch (Benjamin Schindler) Date: Fri Jun 25 04:49:11 2010 Subject: [xsd-users] gcc visibility, serializer-map and typeinfo In-Reply-To: References: <4C23105F.6000000@inf.ethz.ch> Message-ID: <4C246D78.7080300@inf.ethz.ch> Hi Boris Okay, I have located the bug. One never stops learning...The problem is the following: If I have a template class like this: template class Bla { // some code }; and I instantiate this template in different dso's, the template will be instantiated in each dso with visibility=hidden and they therefore get their own type_info object. This problem does not occur with the stl as they declare their namespaces like this: _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) which expands to namespace std __attribute__ ((__visibility__ ("default"))) { This means, that the template type gets exported and the type_info object get correctly merged. I don't know whether you need to export the entire namespace or just all template classes. Anyway - I tested this. The serialization happened on a element declared like this in the xsd: I looked up the internal type and indeed, you have your own string class. So in types.hxx, line 58, I tested did this: template class __attribute__((visibility("default"))) string: public B, public std::basic_string with this change, serialization of this type worked. I'll let it up to you to decide what and how you would like to export your stuff. as little as possible is always a good thing, but since libxsd is template only, it might make sense to export the entire namespace may be Cheers Benjamin The problem is, that template types need to be exported using On 06/24/2010 09:29 PM, Boris Kolpackov wrote: > Hi Benjamin, > > Benjamin Schindler writes: > >> The problem is that the type_map of type_serializer_map stores pointers >> to type_id structs. These type_info structs seem to have different >> addresses when compiled with --visbility=hidden in different shared >> objects. Some light on this issue is shed on in this faq entry: >> http://gcc.gnu.org/faq.html#dso >> >> The problem manifests this way: When my object to be serialized is >> created in the so's loaded at startup time, it works. The xsd is >> compiled into dataflow.so, and the object is created and serialized in >> server.so and it works fine. >> >> However, it does not work, when I create the xsd object in a plugin >> (i.e. a dlopened library) and serialize it in server.so. I get the >> exception thrown on type-serializer-map.txx:344. >> I don't know whether it would work when I'd serialize it in the dlopened >> lib itself - might work, but I'm not too familiar with the xsd internals. > > Let me summarize the situation as I see it. Please correct me if I > missed something. > > 1. The same type has different std::type_info objects in different > DSOs. > > 2. GCC uses address comparison in its implementation of > type_info::before () which in turn is used in polymorphism maps > in XSD. > > 3. The dynamic linker is supposed to "weed out" duplicate type_info > objects so that the process only uses a single object. > > 4. Exactly the same schemas and DSOs work fine if you use the > default visibility instead of hidden. > > If the above assumptions are correct, I think the problem is that the > types that are placed into the plugin DSO have hidden visibility which > leads to their type_info objects also having the hidden visibility and > the dynamic linker not "seeing" this object when it resolve duplicates. > > From the previous emails describing the Windows-related problem you > have experienced, I remember that you compile plugin schemas without > the --export-symbol option. This would result in exactly the behavior > described above. > > Boris From boris at codesynthesis.com Fri Jun 25 11:41:39 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri Jun 25 09:31:01 2010 Subject: [xsd-users] gcc visibility, serializer-map and typeinfo In-Reply-To: <4C246D78.7080300@inf.ethz.ch> References: <4C23105F.6000000@inf.ethz.ch> <4C246D78.7080300@inf.ethz.ch> Message-ID: Hi Benjamin, Benjamin Schindler writes: > If I have a template class like this: > > template > class Bla { > // some code > }; > > and I instantiate this template in different dso's, the template will be > instantiated in each dso with visibility=hidden and they therefore get > their own type_info object. This problem does not occur with the stl as > they declare their namespaces like this: > > _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) which expands to > > namespace std __attribute__ ((__visibility__ ("default"))) { > > This means, that the template type gets exported and the type_info > object get correctly merged. Interesting. > I'll let it up to you to decide what and how you would like to export > your stuff. as little as possible is always a good thing, but since > libxsd is template only, it might make sense to export the entire > namespace may be Actually, there is way to export the individual template instantiations that make up the xml_schema namespace. See the description for the --export-xml-schema option. Your util.dll looks like a good place to do this. Boris From boris at codesynthesis.com Fri Jun 25 11:43:51 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri Jun 25 09:33:01 2010 Subject: [xsd-users] no declaration found for element 'hello' In-Reply-To: <1772687600.10029431277416892420.JavaMail.root@sz0038a.westchester.pa.mail.comcast.net> References: <734778900.10029081277416816768.JavaMail.root@sz0038a.westchester.pa.mail.comcast.net> <1772687600.10029431277416892420.JavaMail.root@sz0038a.westchester.pa.mail.comcast.net> Message-ID: Hi Bruce, Bruce Allen writes: > Everything compiles and links, bit I am getting the following error message: > > c:\\hello.xml:2:8 error: no declaration found for element 'hello' See Q 2.1 in the C++/Tree Mapping FAQ: http://wiki.codesynthesis.com/Tree/FAQ Boris From bschindler at inf.ethz.ch Fri Jun 25 09:58:11 2010 From: bschindler at inf.ethz.ch (Benjamin Schindler) Date: Fri Jun 25 09:58:36 2010 Subject: [xsd-users] gcc visibility, serializer-map and typeinfo In-Reply-To: References: <4C23105F.6000000@inf.ethz.ch> <4C246D78.7080300@inf.ethz.ch> Message-ID: <4C24B5F3.3060202@inf.ethz.ch> Hi Boris On 06/25/2010 05:41 PM, Boris Kolpackov wrote: > Hi Benjamin, > > Benjamin Schindler writes: > >> If I have a template class like this: >> >> template >> class Bla { >> // some code >> }; >> >> and I instantiate this template in different dso's, the template will be >> instantiated in each dso with visibility=hidden and they therefore get >> their own type_info object. This problem does not occur with the stl as >> they declare their namespaces like this: >> >> _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) which expands to >> >> namespace std __attribute__ ((__visibility__ ("default"))) { >> >> This means, that the template type gets exported and the type_info >> object get correctly merged. > > Interesting. > > >> I'll let it up to you to decide what and how you would like to export >> your stuff. as little as possible is always a good thing, but since >> libxsd is template only, it might make sense to export the entire >> namespace may be > > Actually, there is way to export the individual template instantiations > that make up the xml_schema namespace. See the description for the > --export-xml-schema option. Your util.dll looks like a good place > to do this. That's interesting. I just tried that but I get huge amounts of warnings when I compile my code now. The problem is this: When I compile utils, all is fine and there is one Schema with the --export-xml-schema option that has all of the export symbols. However, when I compile other code, I get a lot of warnings: type attributes ignored after type is already defined (for example for template class UTILS_DLL exception< char >; The problem seems to be that I include another Schema, which is compiled with this option: --extern-xml-schema "Schema.h". Probably, the files get included before schema.h and this is why I get these warnings. Do you have another trick in your sleeve to get around this, am I doing something wrong or is this a bug? Cheers Benjamin > Boris From boris at codesynthesis.com Fri Jun 25 18:28:22 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri Jun 25 16:18:31 2010 Subject: [xsd-users] gcc visibility, serializer-map and typeinfo In-Reply-To: <4C24B5F3.3060202@inf.ethz.ch> References: <4C23105F.6000000@inf.ethz.ch> <4C246D78.7080300@inf.ethz.ch> <4C24B5F3.3060202@inf.ethz.ch> Message-ID: Hi Benjamin, Benjamin Schindler writes: > The problem seems to be that I include another Schema, which is compiled > with this option: --extern-xml-schema "Schema.h". Probably, the files > get included before schema.h and this is why I get these warnings. I am not sure I understand your setup completely. To make it work you will need to make sure the following rules are satisfied: 1. Create a header for the XML Schema namespace using the --generate- xml-schema option. The invocation of the compiler should also include the --export-xml-schema and --export-symbol options. 2. All other schemas, across every DLL and executable, should be compiled with the --extern-xml-schema option to include the header file generated on step (1). Let me know if you are still getting the warnings after following these rules. Boris From bschindler at inf.ethz.ch Sun Jun 27 15:18:17 2010 From: bschindler at inf.ethz.ch (Benjamin Schindler) Date: Sun Jun 27 13:19:34 2010 Subject: [xsd-users] gcc visibility, serializer-map and typeinfo In-Reply-To: References: <4C23105F.6000000@inf.ethz.ch> <4C246D78.7080300@inf.ethz.ch> <4C24B5F3.3060202@inf.ethz.ch> Message-ID: <4C27A3F9.5070701@inf.ethz.ch> Hi Boris Ah, there were some things I didn't know here, however my problems are not gone yet this way. The problem is the following: I tried to compile a very special header with only these forward declarations, compiled like this: cxx-tree --hxx-suffix .h --export-symbol UTILS_DLL --hxx-prologue "#include " --export-xml-schema --generate-xml-schema --generate-serialization # Required for list_stream However, that did not work because of multiple issues: - As noted above, --generate-serialization is needed so that list_stream gets defined - serialization routines use ::xsd_schema::list_stream and not list_stream directly - The warning about the redeclaration, remained: xml-schema.h:286: warning: type attributes ignored after type is already defined Line 286 is this: template class UTILS_DLL exception< char >; When I look at the includes, it is no wonder that this happens as this is included (among other rather heavy includes) #include Exceptions is always included (even when not generating serialization), so there is no way this warning can disappear What can I do here? Cheers Benjamin On 25.06.2010 22:28, Boris Kolpackov wrote: > Hi Benjamin, > > Benjamin Schindler writes: > >> The problem seems to be that I include another Schema, which is compiled >> with this option: --extern-xml-schema "Schema.h". Probably, the files >> get included before schema.h and this is why I get these warnings. > > I am not sure I understand your setup completely. To make it work > you will need to make sure the following rules are satisfied: > > 1. Create a header for the XML Schema namespace using the --generate- > xml-schema option. The invocation of the compiler should also > include the --export-xml-schema and --export-symbol options. > > 2. All other schemas, across every DLL and executable, should be > compiled with the --extern-xml-schema option to include the > header file generated on step (1). > > Let me know if you are still getting the warnings after following > these rules. > > Boris From boris at codesynthesis.com Sun Jun 27 16:58:50 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Jun 27 14:48:02 2010 Subject: [xsd-users] gcc visibility, serializer-map and typeinfo In-Reply-To: <4C27A3F9.5070701@inf.ethz.ch> References: <4C23105F.6000000@inf.ethz.ch> <4C246D78.7080300@inf.ethz.ch> <4C24B5F3.3060202@inf.ethz.ch> <4C27A3F9.5070701@inf.ethz.ch> Message-ID: Hi Benjamin, Benjamin Schindler writes: > - As noted above, --generate-serialization is needed so that list_stream > gets defined - serialization routines use ::xsd_schema::list_stream and > not list_stream directly Right, the XML Schema header should be generated with the same "feature" options as the other schemas in your project. You should also add the --generate-polymorphic option in your case. > - The warning about the redeclaration, remained: > xml-schema.h:286: warning: type attributes ignored after type is already > defined Hm, when I first implemented support for exporting XML Schema types in GCC, I also got this kind of warnings. I, however, fixed them for XSD 3.3.0. Can you create a small test case that reproduces this problem? Something with a shell script or a makefile. Boris From bschindler at inf.ethz.ch Sun Jun 27 17:44:01 2010 From: bschindler at inf.ethz.ch (Benjamin Schindler) Date: Sun Jun 27 15:44:58 2010 Subject: [xsd-users] gcc visibility, serializer-map and typeinfo In-Reply-To: References: <4C23105F.6000000@inf.ethz.ch> <4C246D78.7080300@inf.ethz.ch> <4C24B5F3.3060202@inf.ethz.ch> <4C27A3F9.5070701@inf.ethz.ch> Message-ID: <4C27C621.8090705@inf.ethz.ch> Hi Boris I just found the issue. Another header file (from our own project) defined some helper functions and it included the exceptions header. That file was included before another xsd include and therefore caused the warning It all compiles fine now. However, I cannot runtime-test it, as another library, Eigen2 has the same visibility issues and I need to fix those first before I can runtest this again. I'll post as soon I have more Thanks a lot for the great help! Benjamin On 27.06.2010 20:58, Boris Kolpackov wrote: > Hi Benjamin, > > Benjamin Schindler writes: > >> - As noted above, --generate-serialization is needed so that list_stream >> gets defined - serialization routines use ::xsd_schema::list_stream and >> not list_stream directly > > Right, the XML Schema header should be generated with the same "feature" > options as the other schemas in your project. You should also add the > --generate-polymorphic option in your case. > > >> - The warning about the redeclaration, remained: >> xml-schema.h:286: warning: type attributes ignored after type is already >> defined > > Hm, when I first implemented support for exporting XML Schema types in > GCC, I also got this kind of warnings. I, however, fixed them for XSD > 3.3.0. Can you create a small test case that reproduces this problem? > Something with a shell script or a makefile. > > Boris From gahr at gahr.ch Mon Jun 28 06:23:58 2010 From: gahr at gahr.ch (Pietro Cerutti) Date: Mon Jun 28 10:06:21 2010 Subject: [xsd-users] build problem Message-ID: <20100628102357.GN50859@gahrfit.gahr.ch> Hi all, I'm porting xsdcxx (and all its dependent packages) to FreeBSD, and have this error while building the examples. I have tried with xerces-c 2.7, 2.8 and 3.1.1. Anybody has a clue? c++ /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/examples/cxx/tree/xpath/driver.cxx /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/examples/cxx/tree/xpath/driver.cxx: In function 'int main(int, char**)': /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/examples/cxx/tree/xpath/driver.cxx:74: error: invalid conversion from 'const xercesc_2_7::DOMXPathNSResolver*' to 'xercesc_2_7::DOMXPathNSResolver*' /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/examples/cxx/tree/xpath/driver.cxx:74: error: initializing argument 1 of 'xsd::cxx::xml::dom::auto_ptr::auto_ptr(T*) [with T = xercesc_2_7::DOMXPathNSResolver]' /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/examples/cxx/tree/xpath/driver.cxx:80: error: 'class xercesc_2_7::DOMXPathNSResolver' has no member named 'addNamespaceBinding' /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/examples/cxx/tree/xpath/driver.cxx:89: error: invalid conversion from 'const xercesc_2_7::DOMXPathExpression*' to 'xercesc_2_7::DOMXPathExpression*' /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/examples/cxx/tree/xpath/driver.cxx:89: error: initializing argument 1 of 'xsd::cxx::xml::dom::auto_ptr::auto_ptr(T*) [with T = xercesc_2_7::DOMXPathExpression]' /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/examples/cxx/tree/xpath/driver.cxx:94: error: 'ITERATOR_RESULT_TYPE' is not a member of 'xercesc_2_7::DOMXPathResult' /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/examples/cxx/tree/xpath/driver.cxx:102: error: 'class xercesc_2_7::DOMXPathResult' has no member named 'getNodeValue' In file included from /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/examples/cxx/tree/xpath/dom-parse.hxx:14, from /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/examples/cxx/tree/xpath/driver.cxx:16: /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/libxsd/xsd/cxx/xml/dom/auto-ptr.hxx: In member function 'void xsd::cxx::xml::dom::auto_ptr::reset(T*) [with T = xercesc_2_7::DOMXPathNSResolver]': /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/libxsd/xsd/cxx/xml/dom/auto-ptr.hxx:49: instantiated from 'xsd::cxx::xml::dom::auto_ptr::~auto_ptr() [with T = xercesc_2_7::DOMXPathNSResolver]' /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/examples/cxx/tree/xpath/driver.cxx:74: instantiated from here /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/libxsd/xsd/cxx/xml/dom/auto-ptr.hxx:145: error: 'class xercesc_2_7::DOMXPathNSResolver' has no member named 'release' /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/libxsd/xsd/cxx/xml/dom/auto-ptr.hxx: In member function 'void xsd::cxx::xml::dom::auto_ptr::reset(T*) [with T = xercesc_2_7::DOMXPathExpression]': /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/libxsd/xsd/cxx/xml/dom/auto-ptr.hxx:49: instantiated from 'xsd::cxx::xml::dom::auto_ptr::~auto_ptr() [with T = xercesc_2_7::DOMXPathExpression]' /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/examples/cxx/tree/xpath/driver.cxx:89: instantiated from here /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/libxsd/xsd/cxx/xml/dom/auto-ptr.hxx:145: error: 'class xercesc_2_7::DOMXPathExpression' has no member named 'release' /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/libxsd/xsd/cxx/xml/dom/auto-ptr.hxx: In member function 'void xsd::cxx::xml::dom::auto_ptr::reset(T*) [with T = xercesc_2_7::DOMXPathResult]': /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/libxsd/xsd/cxx/xml/dom/auto-ptr.hxx:49: instantiated from 'xsd::cxx::xml::dom::auto_ptr::~auto_ptr() [with T = xercesc_2_7::DOMXPathResult]' /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/examples/cxx/tree/xpath/driver.cxx:94: instantiated from here /usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/libxsd/xsd/cxx/xml/dom/auto-ptr.hxx:145: error: 'class xercesc_2_7::DOMXPathResult' has no member named 'release' gmake: *** [/usr/home/gahr/FreeBSD/ports/devel/xsdcxx/work/xsd-3.3.0/examples/cxx/tree/xpath/driver.o] Error 1 *** Error code 1 Cheers, -- Pietro Cerutti gahr@gahr.ch PGP Public Key: http://gahr.ch/pgp -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 196 bytes Desc: not available Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20100628/6478f20f/attachment.pgp From boris at codesynthesis.com Mon Jun 28 12:24:55 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Jun 28 10:13:55 2010 Subject: [xsd-users] build problem In-Reply-To: <20100628102357.GN50859@gahrfit.gahr.ch> References: <20100628102357.GN50859@gahrfit.gahr.ch> Message-ID: Hi Pietro, Pietro Cerutti writes: > I'm porting xsdcxx (and all its dependent packages) to FreeBSD, and have > this error while building the examples. The driver.cxx file in the XPath example will only work with Xerces-C++ 3-series. If you want to use Xerces-C++ 2-series, you will need to replace it with the driver-2.cxx file that can be found in the same directory. You also need the XQilla library to build this example. > I have tried with xerces-c 2.7, 2.8 and 3.1.1. What kind of errors do you get with 3.1.1? Also, which version of XQilla are you using with this version of Xerces-C++? Boris From bschindler at inf.ethz.ch Tue Jun 29 07:54:46 2010 From: bschindler at inf.ethz.ch (Benjamin Schindler) Date: Tue Jun 29 07:55:13 2010 Subject: [xsd-users] Polymorphic type as root element Message-ID: <4C29DF06.6010606@inf.ethz.ch> Hi I'm currently working on some unit-tests for our system. Now, I'd like to parse something like this (just that): somePath 0 1 I invoked parseBaseSettings(myFstream), but it fails to parse this. Why? (exception thrown in xercesc_3_1::XMLScanner::resolvePrefix) Cheers Benjamin From boris at codesynthesis.com Wed Jun 30 06:21:56 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Jun 30 04:10:56 2010 Subject: [xsd-users] Polymorphic type as root element In-Reply-To: <4C29DF06.6010606@inf.ethz.ch> References: <4C29DF06.6010606@inf.ethz.ch> Message-ID: Hi Benjamin, Benjamin Schindler writes: > Now, I'd like to parse something like this (just that): > > > somePath > 0 > 1 > Well, this XML document is invalid since there is no declaration for the 'xsi' prefix. There is a way to parse this as a document fragment (as opposed to a standalone document) with the DOMLSParse::parseWithContext() function. See the Xerces-C++ documentation for details. Also note that this function is only available since Xerces-C++ 3.1.0. > I invoked parseBaseSettings(myFstream), but it fails to parse this. What is parseBaseSettings? Is it one of the generated parsing functions? Is it your own function? If it is a generated parsing function then the most likely reason is the lack of the namespace declaration mentioned above. Boris From john.dingelstad at dhv.com Wed Jun 30 06:29:14 2010 From: john.dingelstad at dhv.com (Dingelstad, John) Date: Wed Jun 30 08:38:55 2010 Subject: [xsd-users] problem with polymorphic dynamic cast Message-ID: <315123AEEA98E94CA171FF059C0A80BC0AF63C7E@dhnl001ex001.intra.local> Hi, I've created a small test program, which loads a DATEXII file by means of tree mapping into memory and through which I would like to retrieve some info. Loading of the file (MeasurementSiteTablePublication.xml) seems to be fine, and I can retreive some basic information as well. However dynamic casting the polymorphic payloadPublication to the MeasurementSiteTablePublication fails for a reason I can't explain. The dynamic_cast returns a pointer with the value 0. When I look in the xml file however, it clearly states that it is of type MeasurementSiteTablePublication. I'll used the option -generetate-polymorphic along with version 3.3. Any help is appreciated. Many thanks in advance, John Dingelstad -------------- next part -------------- A non-text attachment was scrubbed... Name: DATEXII Parsers.zip Type: application/x-zip-compressed Size: 296452 bytes Desc: DATEXII Parsers.zip Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20100630/54ef5509/DATEXIIParsers-0001.bin From bschindler at inf.ethz.ch Wed Jun 30 08:43:33 2010 From: bschindler at inf.ethz.ch (Benjamin Schindler) Date: Wed Jun 30 08:44:15 2010 Subject: [xsd-users] Polymorphic type as root element In-Reply-To: References: <4C29DF06.6010606@inf.ethz.ch> Message-ID: <4C2B3BF5.2030403@inf.ethz.ch> Hi I tried the following too, but to no avail: somePath 0 1 On 06/30/2010 12:21 PM, Boris Kolpackov wrote: > Hi Benjamin, > > Benjamin Schindler writes: > >> Now, I'd like to parse something like this (just that): >> >> >> somePath >> 0 >> 1 >> > > Well, this XML document is invalid since there is no declaration for > the 'xsi' prefix. > > There is a way to parse this as a document fragment (as opposed to a > standalone document) with the DOMLSParse::parseWithContext() function. > See the Xerces-C++ documentation for details. Also note that this > function is only available since Xerces-C++ 3.1.0. > > >> I invoked parseBaseSettings(myFstream), but it fails to parse this. > > What is parseBaseSettings? Is it one of the generated parsing functions? > Is it your own function? If it is a generated parsing function then the > most likely reason is the lack of the namespace declaration mentioned > above. Sorry for not mentioning: EnsightReaderSettings_t is a type which extends BaseSettings, and parseBaseSettings is therefore the parser function to parse any BaseSettings type and should return a EnsightReaderSettings object (in form of a BaseSettings reference/pointer of course) Cheers Benjamin > > Boris > From pmonteirorocha at sapo.pt Wed Jun 30 10:14:41 2010 From: pmonteirorocha at sapo.pt (Pedro) Date: Wed Jun 30 10:38:34 2010 Subject: [xsd-users] Problem in translating schema to C++ (following parser guide) Message-ID: <4C2B5151.6050002@sapo.pt> Hello, My name is Pedro Rocha. Im working on a university project that could use xml as main data format, since it is already being used in some of its smaller parts. I have been trying to follow the tutorial (C++ /Parser Mapping Guide), but i have a problem translating Hello.xsd to C++ parser skeletons. I'm not using the tree mapping because i need support for large xml files. I'm trying to learn how to work with this data binding compiler because i've seen good reviews about it and seems simple to use. In point 2.2 of the guide, the command "$ xsd cxx-parser --xml-parser expat hello.xsd" gives me the error "unknown option --xml-parser". Im using Ubuntu Linux 10.04 and gnu c++ 4.4.4.3. When i type "xsd" on the console, this is the result: xsd.exe - a utility for generating schema or class files xsd.exe .xsd /classes [/element:NAME] [/language:NAME] [/namespace:NAME] [/outputdir:PATH] [/uri:NAME] xsd.exe .xsd /dataset [/element:NAME] [/language:NAME] [/namespace:NAME] [/outputdir:PATH] [/uri:NAME] xsd.exe .dll|.exe [/outputdir:PATH] [/type:NAME] xsd.exe .xml [.xml ...] [/outputdir:PATH] /c /classes Generate classes for the specified schema. /d /dataset Generate typed dataset classes for the specified schema. /e /element:NAME Element from schema to generate code for. Multiple elements can be specified. /u /uri:NAME Namespace uri of the elements to generate code for. /l /language:NAME The language, or type name of custom CodeDomProvider to use for the generated code. Shorthand specifiers are: "CS" (C#) and "VB" (VB.NET). For type name, assembly qualified name is required. /g /generator:TYPE Code Generator type name, followed by ',' and assembly file name. /o /outputdir:PATH The directory where to generate the code or schemas. /n /namespace:NAME Namespace for the generated code. /t /type:NAME Type for which to generate an xml schema. Multiple types can be specified. /h /help Output this help. However, typing "xsdcxx man" shows some possible options like the ones presented on the example in your guide (cxx-parser, --xml-parser ) but when I enter the command "xsdcxx cxx-parser --xml-parser expat hello.xsd" it returns "terminate called after throwing an instance of 'std::length_error' what(): basic_string::resize". I have reinstalled xsdcxx, I have updated everything, reinstalled xsd-3.3.0 from your website but I'm stuck at this point. Without the files hello-pskel.hxx/cxx I don't see what I can do. I'm open to suggestions. Thank you for your attention and help. Pedro Rocha.