From daniel at pfeifer-mail.de Thu Jul 2 16:26:48 2009 From: daniel at pfeifer-mail.de (Daniel Pfeifer) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Prefix can not be resolved to a URI Message-ID: Hello everyone! I am trying to build an xml-parser from the schema files provided at http://xmpp.org/schemas/. When I compile the file jabber-client.xsd, I get the following errors: jabber-client.xsd:172:49: error: Prefix: 'err' can not be resolved to a URI jabber-client.xsd:172:49: error: Schema Representation Constraint: Namespace '' is referenced without declaration jabber-client.xsd:174:36: error: Prefix: 'err' can not be resolved to a URI jabber-client.xsd:174:36: error: Schema Representation Constraint: Namespace '' is referenced without declaration jabber-client.xsd:174:36: error: Ref element err:text not found in the Schema The relating snippet of the file http://xmpp.org/schemas/jabber-client.xsd: -- snip -- 171 172 173 175 -- snap -- Is this a bug in the xsd parser generator, a bug in the schema or is the problem sitting in front of my computer? cheers, Daniel From boris at codesynthesis.com Thu Jul 2 22:10:36 2009 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Prefix can not be resolved to a URI In-Reply-To: References: Message-ID: Hi Daniel, Daniel Pfeifer writes: > When I compile the file jabber-client.xsd, I get the following errors: > > jabber-client.xsd:172:49: error: Prefix: 'err' can not be resolved to a URI > ... When I tried to compile jabber-client.xsd I got this error: jabber-client.xsd: error: 'http://xmpp.org/schemas/stanzaerror.xsd': unable to open in read mode This error is due to the XSD compiler only supporting local filesystem paths for security reasons. Perhaps you tried to "fix" this error by removing the import declaration that caused it and that's how you got the above error? ;-) The recommended fix for this is to download stanzaerror.xsd (and xml.xsd) and then use the --location-map options to re-map URI locations to local files. In the end I was able to compile jabber-client.xsd with the following command line: xsd cxx-tree \ --location-map http://xmpp.org/schemas/stanzaerror.xsd=stanzaerror.xsd \ --location-map http://www.w3.org/2001/03/xml.xsd=xml.xsd \ --namespace-map jabber:client=jabber_client \ --namespace-map urn:ietf:params:xml:ns:xmpp-stanzas=xmpp_stanzas \ jabber-client.xsd Boris From ongs_1999 at yahoo.com Sun Jul 5 13:08:26 2009 From: ongs_1999 at yahoo.com (Steve) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Problem compiling the xsd-3.2.0+dep package Message-ID: <658484.22849.qm@web32203.mail.mud.yahoo.com> Hi, I am trying to compile the xsd-3.2.0+dep package and running into problems. I am compiling it on cygwin which I compiled boost and xerces-c++ successfully. Here is the problem First of all, I made the following modifications to the "build.sh" script: CPPFLAGS=" -I/opt/boost/include/boost-1_39 -I/opt/xerces/include/xercesc $CPPFLAGS" LDFLAGS="-L/opt/boost/lib -L/opt/xerces/lib $LDFLAGS" MAKEFLAGS="install_prefix=/opt verbose=1" MAKEFLAGS="-I$pwd/install/include $MAKEFLAGS" ...When I ran the "build.sh", I got the following errors: $ ./build.sh make: Entering directory `/cygdrive/c/projects/XML/xsd-3.2.0+dep/libcult-1.4.4/c ult' g++? -I/cygdrive/c/projects/XML/xsd-3.2.0+dep/libcult-1.4.4/cult/arch/i386/i486/ i586/i686 -I/cygdrive/c/projects/XML/xsd-3.2.0+dep/libcult-1.4.4/cult/arch/i386/ i486/i586 -I/cygdrive/c/projects/XML/xsd-3.2.0+dep/libcult-1.4.4/cult/arch/i386/ i486 -I/cygdrive/c/projects/XML/xsd-3.2.0+dep/libcult-1.4.4/cult/arch/i386 -I/cy gdrive/c/projects/XML/xsd-3.2.0+dep/libcult-1.4.4/cult/arch/generic -I/cygdrive/ c/projects/XML/xsd-3.2.0+dep/libcult-1.4.4 -I/cygdrive/c/projects/XML/xsd-3.2.0+ dep/libcult-1.4.4? -I/cygdrive/c/projects/XML/xsd-3.2.0+dep/libcult-1.4.4/../ins tall/include???? -o /cygdrive/c/projects/XML/xsd-3.2.0+dep/libcult-1.4.4/cult/rt ti/type-info.o -c /cygdrive/c/projects/XML/xsd-3.2.0+dep/libcult-1.4.4/cult/rtti /type-info.cxx In file included from /cygdrive/c/projects/XML/xsd-3.2.0+dep/libcult-1.4.4/cult/ types.hxx:10, ???????????????? from /cygdrive/c/projects/XML/xsd-3.2.0+dep/libcult-1.4.4/cult/ containers/vector.hxx:9, ???????????????? from /cygdrive/c/projects/XML/xsd-3.2.0+dep/libcult-1.4.4/cult/ rtti/type-info.hxx:13, ???????????????? from /cygdrive/c/projects/XML/xsd-3.2.0+dep/libcult-1.4.4/cult/ rtti/type-info.cxx:6: /cygdrive/c/projects/XML/xsd-3.2.0+dep/libcult-1.4.4/cult/types/string.hxx: In m ember function `Cult::Types::StringTemplate::Type> Cult::Types::StringTemplate::to_narrow() const [with C = Cult::Types::Fundamental::WideChar, NarrowerCh ar = Cult::Types::Fundamental::Char]': /cygdrive/c/projects/XML/xsd-3.2.0+dep/libcult-1.4.4/cult/types/string.hxx:373: error: `wcstombs' is not a member of `std' /cygdrive/c/projects/XML/xsd-3.2.0+dep/libcult-1.4.4/cult/types/string.hxx:385: error: `wcstombs' is not a member of `std' make: *** [/cygdrive/c/projects/XML/xsd-3.2.0+dep/libcult-1.4.4/cult/rtti/type-i nfo.o] Error 1 make: Leaving directory `/cygdrive/c/projects/XML/xsd-3.2.0+dep/libcult-1.4.4/cu lt' ... Please help me out. Thanks, Steve From boris at codesynthesis.com Mon Jul 6 01:24:25 2009 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Problem compiling the xsd-3.2.0+dep package In-Reply-To: <658484.22849.qm@web32203.mail.mud.yahoo.com> References: <658484.22849.qm@web32203.mail.mud.yahoo.com> Message-ID: Hi Steve, Steve writes: > I am trying to compile the xsd-3.2.0+dep package and running into > problems. I am compiling it on cygwin which I compiled boost and > xerces-c++ successfully. > > [...] > > error: `wcstombs' is not a member of `std' I don't think libstdc++ (Standard C++ library implementation that comes with g++) on Cygwin includes support for wide characters, similar to MinGW. One way to resolve this is to build and use STLPort instead. This is covered in the build instructions for Windows: http://www.codesynthesis.com/projects/xsd/extras/build-windows.xhtml I also remember your previous attempt where you used STLPort and reportedly succeeded: http://www.codesynthesis.com/pipermail/xsd-users/2009-January/002137.html You should be able to use STLPort with the xsd+dep way of building by simply adding the necessary options to the corresponding *FLAGS variables. Boris From boris at codesynthesis.com Wed Jul 8 15:16:45 2009 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Problem compiling the xsd-3.2.0+dep package In-Reply-To: <949331.66561.qm@web32208.mail.mud.yahoo.com> References: <949331.66561.qm@web32208.mail.mud.yahoo.com> Message-ID: Hi Steve, Steve writes: > Sorry for reply directly to you, but I don't know how to reply to > the email chain in the mailing list. Simply press "reply all" in your email client. If you don't have this option, send all emails just to xsd-users@codesynthesis.com and I will get them via the mailing list. Support with private communications is only available on the commercial basis. > I am now trying to compile the xsd-3.2.0+dep on the Linux machine (I > would have to come back to the cygwin later)... > > I've added the "boost_1_39_0" and "xerces-c-3.0.1" (i.e., unzip/untar) > under "xsd-3.2.0+dep" and compiled them... > > My question at this point is: > - How can change the 'build.sh' so that it knows about these directories > in order for it to compile the others? You don't need to change build.sh. As described in the accompanying README file, you can put the corresponding headers and libraries in xsd-3.2.0+dep/install/include and xsd-3.2.0+dep/install/lib, respectively. You can either install the packages that you compiled into xsd-3.2.0+dep/install or you can manually add symlinks to the corresponding files and directories. Boris From ongs_1999 at yahoo.com Thu Jul 9 16:58:01 2009 From: ongs_1999 at yahoo.com (Steve) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Re: xsd-users Digest, Vol 49, Issue 3 Message-ID: <441377.10146.qm@web32203.mail.mud.yahoo.com> Hi Boris, I was able to compiled successfully on the Linux machine. Thanks. I wonder if I just replace the current xsd load with the STLPort, would it be sufficient to compile on cygwin using the 'build.sh' script? Please let me know. Furthermore, during the process, I did develop some scripts that automate Boost library and the dependencies build as well as the xerces-c++ library build. If you like, I can share them with you. Thanks very much for all your helps. Regards, Steven --- On Thu, 7/9/09, xsd-users-request@codesynthesis.com wrote: From: xsd-users-request@codesynthesis.com Subject: xsd-users Digest, Vol 49, Issue 3 To: xsd-users@codesynthesis.com Date: Thursday, July 9, 2009, 11:00 AM Send xsd-users mailing list submissions to ??? xsd-users@codesynthesis.com To subscribe or unsubscribe via the World Wide Web, visit ??? http://codesynthesis.com/mailman/listinfo/xsd-users or, via email, send a message with subject or body 'help' to ??? xsd-users-request@codesynthesis.com You can reach the person managing the list at ??? xsd-users-owner@codesynthesis.com When replying, please edit your Subject line so it is more specific than "Re: Contents of xsd-users digest..." Today's Topics: ???1. Re: Problem compiling the xsd-3.2.0+dep package (Boris Kolpackov) ---------------------------------------------------------------------- Message: 1 Date: Wed, 8 Jul 2009 21:16:45 +0200 From: Boris Kolpackov Subject: Re: [xsd-users] Problem compiling the xsd-3.2.0+dep package To: Steve Cc: xsd-users@codesynthesis.com Message-ID: Content-Type: text/plain; charset=us-ascii Hi Steve, Steve writes: > Sorry for reply directly to you, but I don't know how to reply to > the email chain in the mailing list. Simply press "reply all" in your email client. If you don't have this option, send all emails just to xsd-users@codesynthesis.com and I will get them via the mailing list. Support with private communications is only available on the commercial basis. > I am now trying to compile the xsd-3.2.0+dep on the Linux machine (I > would have to come back to the cygwin later)... > > I've added the "boost_1_39_0" and "xerces-c-3.0.1" (i.e., unzip/untar) > under "xsd-3.2.0+dep" and compiled them... > > My question at this point is: > - How can change the 'build.sh' so that it knows about these directories > in order for it to compile the others? You don't need to change build.sh. As described in the accompanying README file, you can put the corresponding headers and libraries in xsd-3.2.0+dep/install/include and xsd-3.2.0+dep/install/lib, respectively. You can either install the packages that you compiled into xsd-3.2.0+dep/install or you can manually add symlinks to the corresponding files and directories. Boris ------------------------------ _______________________________________________ xsd-users mailing list xsd-users@codesynthesis.com http://codesynthesis.com/mailman/listinfo/xsd-users End of xsd-users Digest, Vol 49, Issue 3 **************************************** From ongs_1999 at yahoo.com Sun Jul 12 20:12:23 2009 From: ongs_1999 at yahoo.com (Steve) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Problem compiling the xsd-3.2.0+dep package Message-ID: <323984.18068.qm@web32204.mail.mud.yahoo.com> Hi Boris, I'm trying to compile the "xsd-3.2.0+dep" package on cygwin. Although I compiled the "STLport-5.0.1-mingw" and copied the library into $DIR/xsd-3.2.0+dep/install, I still have problem compiling (see below ...) $ ./build.sh make: Entering directory `/projects/xml/xsd-3.2.0+dep/libcult-1.4.4/cult' c++ /projects/xml/xsd-3.2.0+dep/libcult-1.4.4/cult/rtti/type-info.cxx In file included from /projects/xml/xsd-3.2.0+dep/libcult-1.4.4/cult/types.hxx:1 0, ???????????????? from /projects/xml/xsd-3.2.0+dep/libcult-1.4.4/cult/containers/ vector.hxx:9, ???????????????? from /projects/xml/xsd-3.2.0+dep/libcult-1.4.4/cult/rtti/type-i nfo.hxx:13, ???????????????? from /projects/xml/xsd-3.2.0+dep/libcult-1.4.4/cult/rtti/type-i nfo.cxx:6: /projects/xml/xsd-3.2.0+dep/libcult-1.4.4/cult/types/string.hxx: In member funct ion `Cult::Types::StringTemplate::Type> Cult::Types::StringTemplate::to_na rrow() const [with C = Cult::Types::Fundamental::WideChar, NarrowerChar = Cult:: Types::Fundamental::Char]': /projects/xml/xsd-3.2.0+dep/libcult-1.4.4/cult/types/string.hxx:373: error: `wcs tombs' is not a member of `std' /projects/xml/xsd-3.2.0+dep/libcult-1.4.4/cult/types/string.hxx:385: error: `wcs tombs' is not a member of `std' make: *** [/projects/xml/xsd-3.2.0+dep/libcult-1.4.4/cult/rtti/type-info.o] Erro r 1 make: Leaving directory `/projects/xml/xsd-3.2.0+dep/libcult-1.4.4/cult' Thanks in advance for your help. Regards, Steven --- On Wed, 7/8/09, Boris Kolpackov wrote: From: Boris Kolpackov Subject: Re: [xsd-users] Problem compiling the xsd-3.2.0+dep package To: "Steve" Cc: xsd-users@codesynthesis.com Date: Wednesday, July 8, 2009, 2:16 PM Hi Steve, Steve writes: > Sorry for reply directly to you, but I don't know how to reply to > the email chain in the mailing list. Simply press "reply all" in your email client. If you don't have this option, send all emails just to xsd-users@codesynthesis.com and I will get them via the mailing list. Support with private communications is only available on the commercial basis. > I am now trying to compile the xsd-3.2.0+dep on the Linux machine (I > would have to come back to the cygwin later)... > > I've added the "boost_1_39_0" and "xerces-c-3.0.1" (i.e., unzip/untar) > under "xsd-3.2.0+dep" and compiled them... > > My question at this point is: > - How can change the 'build.sh' so that it knows about these directories > in order for it to compile the others? You don't need to change build.sh. As described in the accompanying README file, you can put the corresponding headers and libraries in xsd-3.2.0+dep/install/include and xsd-3.2.0+dep/install/lib, respectively. You can either install the packages that you compiled into xsd-3.2.0+dep/install or you can manually add symlinks to the corresponding files and directories. Boris From boris at codesynthesis.com Mon Jul 13 01:49:01 2009 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Problem compiling the xsd-3.2.0+dep package In-Reply-To: <323984.18068.qm@web32204.mail.mud.yahoo.com> References: <323984.18068.qm@web32204.mail.mud.yahoo.com> Message-ID: Hi Steve, Steve writes: > I'm trying to compile the "xsd-3.2.0+dep" package on cygwin. Although > I compiled the "STLport-5.0.1-mingw" and copied the library into > $DIR/xsd-3.2.0+dep/install, I still have problem compiling You will need to add a number of options to make g++ use STLPort instead of the default libstdc++. See the build instructions for Windows for details: http://codesynthesis.com/projects/xsd/extras/build-windows.xhtml You will also need to compile both Xerces-C++ and Boost to use STLPort. If after doing all this you are still having trouble compiling xsd-3.2.0+dep, please follow the step-by-step instructions in the above guide to build the compiler using the normal xsd-3.2.0 package. The xsd-3.2.0+dep package is meant for UNIX-like platforms and we haven't tested it on Cygwin/MinGW. Boris From esodan at gmail.com Tue Jul 14 22:03:13 2009 From: esodan at gmail.com (Daniel Espinosa) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Code Generation Error Message-ID: <144160610907141903j4a94b3e8g4f4b7fd07d2e0bb5@mail.gmail.com> I'm using xsdcxx cxx-tree in order to generate code for an XSD file, version 3.1 for Ubuntu. I'm using the following code: xsdcxx cxx-tree --generate-serialization --namespace-map http://www.iec.ch/61850/2003/SCL=IEC61850::SCL --hxx-suffix .h --cxx-suffix .cc --generate-comparison SCL_Enums.xsd The error message is the following: terminate called after throwing an instance of 'std::ios_base::failure' what(): basic_filebuf::_M_convert_to_external conversion error Even with out any option in the command line the error is the same. -- Trabajar, la mejor arma para tu superaci?n "de grano en grano, se hace la arena" (R) (en tr?mite, pero para los cuates: LIBRE) From boris at codesynthesis.com Wed Jul 15 01:49:49 2009 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Code Generation Error In-Reply-To: <144160610907141903j4a94b3e8g4f4b7fd07d2e0bb5@mail.gmail.com> References: <144160610907141903j4a94b3e8g4f4b7fd07d2e0bb5@mail.gmail.com> Message-ID: Hi Daniel, Daniel Espinosa writes: > I'm using xsdcxx cxx-tree in order to generate code for an XSD file, version > 3.1 for Ubuntu. > > [...] > > terminate called after throwing an instance of 'std::ios_base::failure' > what(): basic_filebuf::_M_convert_to_external conversion error I think I remember fixing something with these symptoms. Can you try the latest version of XSD, which is 3.2.0? There is a package in the Debian repository. Boris From fredrikz at gmail.com Wed Jul 15 08:23:36 2009 From: fredrikz at gmail.com (Fredrik Zetterman) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Compiling COLLADA 1.5 using XSD v 3.2.0 Message-ID: Hello, I've been trying to figure out how to compile the COLLADA 1.5 schema using C++/Tree, but now I've stumbled on a problem which I cannot solve. I'm using the following command: xsd cxx-tree --options-file settings collada_schema_1_5.xsd With the file 'settings' looking like this: --generate-polymorphic --root-element COLLADA --namespace-map http://www.w3.org/1998/Math/MathML=mathML --location-map http://www.w3.org/Math/XMLSchema/mathml2/mathml2.xsd=mathml2/mathml2.xsd --location-map http://www.w3.org/2001/xml.xsd=xml/xml.xsd --generate-forward --location-regex-trace This gives me the following output: location: 'common/math.xsd' location: 'common/common-attribs.xsd' location: 'xlink-href.xsd' location: 'presentation/common-types.xsd' location: 'presentation/common-attribs.xsd' location: 'presentation/characters.xsd' location: 'presentation/tokens.xsd' location: 'presentation/scripts.xsd' location: 'presentation/space.xsd' location: 'presentation/layout.xsd' location: 'presentation/table.xsd' location: 'presentation/style.xsd' location: 'presentation/error.xsd' location: 'presentation/action.xsd' location: 'content/common-attrib.xsd' location: 'content/tokens.xsd' location: 'content/arith.xsd' location: 'content/functions.xsd' location: 'content/logic.xsd' location: 'content/constructs.xsd' location: 'content/constants.xsd' location: 'content/elementary-functions.xsd' location: 'content/relations.xsd' location: 'content/semantics.xsd' location: 'content/sets.xsd' location: 'content/linear-algebra.xsd' location: 'content/calculus.xsd' location: 'content/vector-calculus.xsd' location: 'content/statistics.xsd' location: '' C:\\collada\mathml2\common: error: 'C:\\collada\mathml2\common': unable to open in read mode C:\\collada\collada_schema_1_5.xsd:1938:41: warning F001: element 'unnormalized' is implicitly of anyType C:\\collada\collada_schema_1_5.xsd:1938:41: info: did you forget to specify 'type' attribute? It seems (to me) that I somehow get a location which refers to '' and it somehow gets mapped to a folder(mathml2\common)... I cannot see how this is triggered since it seems to be able to parse mathml2.xsd completely beforehand (if I only remove --location-map http://www.w3.org/2001/xml.xsd=xml/xml.xsd from the file, I get an error that it cannot be found. The reference to xml.xsd is _after_ mathml2.xsd, so therefore mathml2.xsd should already be parsed at that point...) Is there a way for me to see where this location reference is triggered? (I haven't found an option for it, did I miss it?) Has anyone tried to compile COLLADA 1.5 and successfully done so? Any tips/hints on what I could be doing wrong? Kind regards, Fredrik Z From Tim.Muirhead at tibra.com Wed Jul 15 11:27:34 2009 From: Tim.Muirhead at tibra.com (Tim Muirhead) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Problem getting code to read data from files including using XInclude Message-ID: <7025D5D72EC4424F9456258BD1E6E52901B7C151D3@lcinf01.tibra.com> Hi, I've been trying to get a simple example using xinclude to work and am wondering if someone can assist. I'm using xsd-3.2.0 and xerces 3.0.1, I've created an xsd schema that allows a choice between including a section of config directly, or including it from an another file. The example program (xmlval.cpp) then tries to read and print data. When I try and use an included file, it currently fails. It knows that that the file has been included, but perhaps I missing a step (like explicitly parsing the included file?) I haven't been able to find any examples on the web that show how xinclude works from the xsd to the code stage - so I created 4 simple files to demonstrate the usage of xinclude: These are test.xsd test.xml - the main xml testRef.xml - the 'included' xml xmlval.cpp - trys to read and print the data. (You can uncomment the section in test.xml to run the case when it is specifying it directly and not using xinclude) Any help would be greatly appreciated. Best regards Tim Muirhead The contents of this email including any attachments are confidential. If you have received this email in error, please advise the sender by return email and delete this email. Any unauthorised use of the contents of the email is prohibited and you must not disseminate, copy or distribute the message or use the information contained in the email or its attachments in any way. The views or opinions expressed are the author's own and may not reflect the views or opinions of Tibra. Tibra does not guarantee the integrity of any emails or attached files. E-mails may be interfered with, may contain computer viruses or other defects. Under no circumstances do we accept liability for any loss or damage which may result from your receipt of this message or any attachments. -------------- next part -------------- A non-text attachment was scrubbed... Name: xsdTest.zip Type: application/x-zip-compressed Size: 2472 bytes Desc: xsdTest.zip Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20090715/7008c15d/xsdTest.bin From esodan at gmail.com Wed Jul 15 15:57:04 2009 From: esodan at gmail.com (Daniel Espinosa) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Code Generation Error In-Reply-To: References: <144160610907141903j4a94b3e8g4f4b7fd07d2e0bb5@mail.gmail.com> Message-ID: <144160610907151257o441c648ft999af3f07c000237@mail.gmail.com> Thanks is resolved in 3.2. One issue is that it has conflic with xsdcxx package from Ubuntu and some with mono; I've uninstalled them. 2009/7/15 Boris Kolpackov > Hi Daniel, > > Daniel Espinosa writes: > > > I'm using xsdcxx cxx-tree in order to generate code for an XSD file, > version > > 3.1 for Ubuntu. > > > > [...] > > > > terminate called after throwing an instance of 'std::ios_base::failure' > > what(): basic_filebuf::_M_convert_to_external conversion error > > I think I remember fixing something with these symptoms. Can you > try the latest version of XSD, which is 3.2.0? There is a package > in the Debian repository. > > Boris > -- Trabajar, la mejor arma para tu superaci?n "de grano en grano, se hace la arena" (R) (en tr?mite, pero para los cuates: LIBRE) From Markus.Hummel at gmx.de Wed Jul 15 16:32:50 2009 From: Markus.Hummel at gmx.de (Markus Hummel) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Visitor pattern automatically generated/ and/or included Message-ID: <200907152232.50490.Markus.Hummel@gmx.de> Hello everyone, I am currently working with an XML schema having about 300 classes. Everything works fine so far. I can access all the information I need. But I am requiring some kind of a "traverser" to get a simplified but predefined access to the different information. Is it possible on using > XSD cxx-tree --generate-serialization --generated-visitor-pattern to add the visitor pattern to all the generated classes? An according empty default Visitor would also be very helpful. If the according Visit()s and Accept()s are generated by the cxx-tree it would be very simple to implement any traverser on the model. Regards, Markus From boris at codesynthesis.com Thu Jul 16 03:35:30 2009 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Compiling COLLADA 1.5 using XSD v 3.2.0 In-Reply-To: References: Message-ID: Hi Fredrik, Fredrik Zetterman writes: > location: '' > C:\\collada\mathml2\common: error: > 'C:\\collada\mathml2\common': unable to open in read mode > > It seems (to me) that I somehow get a location which refers to '' and it > somehow gets mapped to a folder(mathml2\common)... This is caused by an empty import declaration in mathml2/common/common-attribs.xsd. Some of strangest things you see in schemas from W3C... Once I commented this import, the error disappeared. I've added an item to my TODO list to implement ignoring such imports. > Has anyone tried to compile COLLADA 1.5 and successfully done so? Any > tips/hints on what I could be doing wrong? After the location error is gone I got an unstable conflict error which I resolved by adding the following option to your settings file: --anonymous-regex %.* .* (.+)/(.+)%$1_$2% After that the schema compiles ok. Let us know if you run into any other problems. Boris From boris at codesynthesis.com Thu Jul 16 04:03:56 2009 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Problem getting code to read data from files including using XInclude In-Reply-To: <7025D5D72EC4424F9456258BD1E6E52901B7C151D3@lcinf01.tibra.com> References: <7025D5D72EC4424F9456258BD1E6E52901B7C151D3@lcinf01.tibra.com> Message-ID: Hi Tim, Tim Muirhead writes: > I've created an xsd schema that allows a choice between including a > section of config directly, or including it from an another file. > The example program (xmlval.cpp) then tries to read and print data. > When I try and use an included file, it currently fails. It knows > that that the file has been included, but perhaps I missing a step > (like explicitly parsing the included file?) XInclude is handled by the underlying XML parser (Xerces-C++) and is disabled by default. If you want to enable it, you will need to set up your own XML-to-DOM and then DOM-to-object model stages. For an example on how to do this, see, for instance, the multiroot example in examples/cxx/tree. In your case you will need to add something like: conf->setParameter(XMLUni::fgXercesDoXInclude, true); in the dom-parse.cxx file. See the XInclude example in Xerces-C++ for more information. The one big drawback of the XInclude implementation in Xerces-C++ is that you don't have control over the configuration of the parser that is used to parser the included XML file. For example, the schema validation setting is set to "auto" which means the document will be validated if there is a schema available. There is also no way to specify the schema location other than in the included XML file. If you want more control over the way the included file is parsed then you will need to handle the inclusion yourself. You can do it on the DOM level. However, it could be easier to do it on the object model level. For this you will need to customize the type(s) which need support for inclusion (TestComplexType in your case). In the parsing constructor of this type you will need to detect whether there is inclusion or the inline content. If it is the inline content that you do nothing, just call the base c-tor and it will handle everything. If there is inclusion then you load the included fragment into a separate object model and then set it as if it was the inline content. This way it will be complete transparent to the users of your object model. For an example on how to customize the type and override its parsing c-tor, see, for instance the wildcard example in the examples/cxx/tree/custom/ directory. There is also the C++/Tree Mapping Customization Guide: http://wiki.codesynthesis.com/Tree/Customization_guide Boris From boris at codesynthesis.com Sat Jul 18 01:56:46 2009 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Visitor pattern automatically generated/ and/or included In-Reply-To: <200907152232.50490.Markus.Hummel@gmx.de> References: <200907152232.50490.Markus.Hummel@gmx.de> Message-ID: Hi Markus, Markus Hummel writes: > But I am requiring some kind of a "traverser" to get a simplified but > predefined access to the different information. > > Is it possible on using > > XSD cxx-tree --generate-serialization --generated-visitor-pattern > to add the visitor pattern to all the generated classes? > An according empty default Visitor would also be very helpful. > > If the according Visit()s and Accept()s are generated by the cxx-tree > it would be very simple to implement any traverser on the model. The problem with automatically generating the Visitor mechanism is that the Visitor class needs to define the visit() function for each type in the object model. When you have separate compilation of schemas that are included or imported, this becomes a very tricky task. The other part of the Visitor mechanism, the accept() functions, should be fairly easy to generate. So it looks like the best bet to get this automated would be to define the Visitor class manually and then customize the code generator in XSD to emit the accept() function implementation for each object model class. If you would like, I can give you some pointers on how to do the customization. BTW, is anybody else interested in this functionality? Boris From jnw at xs4all.nl Sat Jul 18 01:52:10 2009 From: jnw at xs4all.nl (Jeroen N. Witmond [Bahco]) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Visitor pattern automatically generated/ and/or included Message-ID: <4035.80.101.201.227.1247896330.squirrel@webmail.xs4all.nl> Boris Kolpackov writes: > Hi Markus, > > Markus Hummel writes: > >> But I am requiring some kind of a "traverser" to get a simplified but >> predefined access to the different information. >> [snip] >> If the according Visit()s and Accept()s are generated by the cxx-tree >> it would be very simple to implement any traverser on the model. > [snip] > BTW, is anybody else interested in this functionality? Little bit off-topic, but I'm interested in learning more about this functionality. Where can I find an introduction on this subject? Jeroen. From boris at codesynthesis.com Sat Jul 18 20:42:42 2009 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Visitor pattern automatically generated/ and/or included In-Reply-To: <4035.80.101.201.227.1247896330.squirrel@webmail.xs4all.nl> References: <4035.80.101.201.227.1247896330.squirrel@webmail.xs4all.nl> Message-ID: Hi Jeroen, Jeroen N. Witmond [Bahco] writes: > Little bit off-topic, but I'm interested in learning more about this > functionality. Where can I find an introduction on this subject? I found this description which is not bad: http://www.swe.uni-linz.ac.at/research/deco/designpatterns/visitor/visitor.defaultroles.c++.html Boris From boris at codesynthesis.com Mon Jul 20 23:19:52 2009 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Visitor pattern automatically generated/ and/or included In-Reply-To: <30304.192.12.88.7.1247974395.squirrel@www.dre.vanderbilt.edu> References: <200907152232.50490.Markus.Hummel@gmx.de> <30304.192.12.88.7.1247974395.squirrel@www.dre.vanderbilt.edu> Message-ID: Hi Sumant, Sumant Tambe writes: > > The problem with automatically generating the Visitor mechanism is > > that the Visitor class needs to define the visit() function for each > > type in the object model. When you have separate compilation of > > schemas that are included or imported, this becomes a very tricky > > task. > > Can you please elaborate the difficulty here? What do you mean by separate > compilation of schemas? Say you have schema a.xsd which defines type A and schema b.xsd which defines type B. The resulting visitor class for this object model would look like this: struct Visitor { virtual void visit (A&) = 0; virtual void visit (B&) = 0; }; Because when the XSD compiler is running on a.xsd it doesn't know anything about b.xsd (and vice versa), it is not clear when and how the above interface could be generated. We could do some tricks like generating a visitor class per schema (and, perhaps, inherit it from other visitor classes that correspond to included schemas), but it gets quite hairy, as you can see. > > So it looks like the best bet to get this automated would be to > > define the Visitor class manually and then customize the code > > generator in XSD to emit the accept() function implementation > > for each object model class. If you would like, I can give you > > some pointers on how to do the customization. > > Is such customization possible without recompiling the code generator? No, you would need to customize the code generator to generate the accept() functions. > Anyways, I'm interested in learning more on how to do this. In a nutshell, you would add the generation of the accept() declarations in tree-header.cxx. The implementations can be generated in tree-source.cxx. You can also add an option, say --generate-visitor , which would trigger the generation as well as provide the visitor class name. You can look at existing options for an example on how to do this. The header that defines the visitor class can be included in to the generated code using the --hxx-prologue option. > Finally, I' extremely interested in the functionality! Are you interested in it from a practical or purely academic perspective? ;-) Boris From christopher.fuhrman at etsmtl.ca Mon Jul 20 23:04:26 2009 From: christopher.fuhrman at etsmtl.ca (Christopher Fuhrman) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Visitor pattern automatically generated/ and/or included In-Reply-To: References: <200907152232.50490.Markus.Hummel@gmx.de> <30304.192.12.88.7.1247974395.squirrel@www.dre.vanderbilt.edu> Message-ID: <955f8a1b0907202004s2bf5d350x24b9185e2114daf0@mail.gmail.com> Hello, On Mon, Jul 20, 2009 at 11:19 PM, Boris Kolpackov wrote: > Say you have schema a.xsd which defines type A and schema b.xsd which > defines type B. The resulting visitor class for this object model would > look like this: > > struct Visitor > { > virtual void visit (A&) = 0; > virtual void visit (B&) = 0; > }; > > Because when the XSD compiler is running on a.xsd it doesn't know > anything about b.xsd (and vice versa), it is not clear when and > how the above interface could be generated. > One of the assumptions about the applicability of the Visitor design pattern is that the data structure is not likely to change. The third point in the "Applicability" section of http://www.oodesign.com/visitor-pattern.html(which is similar to the original GoF reference for Visitor): The object structure is not likely to be changed but is very probable to > have new operations which have to be added. Since the pattern separates the > visitor (representing operations, algorithms, behaviors) from the object > structure it's very easy to add new visitors as long as the structure > remains unchanged. Automatically generated object structures seem *very* likely to change. I don't think the traditional Visitor makes sense for that reason. The original question mentions getting an automatically generated traverser, which is similar to two variants of Visitor mentioned in GoF: traversing logic in an Iterator or in the Composite structure. It might make sense in a code-generation scenario to generate this traversing logic, but without using a Visitor that knows about all elements. Maybe it would make sense to hand-code a Visitor in this case once (if?) the data structure is stable? -- Christopher Fuhrman Professor Department of Software and IT Engineering ?cole de technologie sup?rieure (ETS) http://profs.logti.etsmtl.ca/cfuhrman/ +1 514 396 8638 From Tim.Muirhead at tibra.com Tue Jul 21 14:46:04 2009 From: Tim.Muirhead at tibra.com (Tim Muirhead) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] RE: Problem getting code to read data from files including using XInclude Message-ID: <7025D5D72EC4424F9456258BD1E6E52901B7C15AA8@lcinf01.tibra.com> Hi, I have followed Boris's advice and modified the sample program taken from examples/cxx/tree/multiroot It now compiles but when I run it with the following set to true conf->setParameter(XMLUni::fgXercesDoXInclude, true); It will give a runtime error test.xml:9:53 error: no scheme found in URI This only occurs when trying to include the file It is definitely picking up the correct file - as if you put in a invalid file name you get an 'unable to include resource 'bogusfile.xml' Also, the testRef.xml file appears valid. Any help would be greatly appreciated. Example files included as xsdTest2.zip Thanks Tim Muirhead From: Tim Muirhead Sent: Wednesday, 15 July 2009 16:28 To: 'xsd-users@codesynthesis.com' Subject: Problem getting code to read data from files including using XInclude Hi, I've been trying to get a simple example using xinclude to work and am wondering if someone can assist. I'm using xsd-3.2.0 and xerces 3.0.1, I've created an xsd schema that allows a choice between including a section of config directly, or including it from an another file. The example program (xmlval.cpp) then tries to read and print data. When I try and use an included file, it currently fails. It knows that that the file has been included, but perhaps I missing a step (like explicitly parsing the included file?) I haven't been able to find any examples on the web that show how xinclude works from the xsd to the code stage - so I created 4 simple files to demonstrate the usage of xinclude: These are test.xsd test.xml - the main xml testRef.xml - the 'included' xml xmlval.cpp - trys to read and print the data. (You can uncomment the section in test.xml to run the case when it is specifying it directly and not using xinclude) Any help would be greatly appreciated. Best regards Tim Muirhead The contents of this email including any attachments are confidential. If you have received this email in error, please advise the sender by return email and delete this email. Any unauthorised use of the contents of the email is prohibited and you must not disseminate, copy or distribute the message or use the information contained in the email or its attachments in any way. The views or opinions expressed are the author's own and may not reflect the views or opinions of Tibra. Tibra does not guarantee the integrity of any emails or attached files. E-mails may be interfered with, may contain computer viruses or other defects. Under no circumstances do we accept liability for any loss or damage which may result from your receipt of this message or any attachments. -------------- next part -------------- A non-text attachment was scrubbed... Name: xsdTest2.zip Type: application/x-zip-compressed Size: 5136 bytes Desc: xsdTest2.zip Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20090721/64a39882/xsdTest2.bin From bpringle at sympatico.ca Tue Jul 21 17:35:01 2009 From: bpringle at sympatico.ca (Bill Pringlemeir) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] --enumerator-regex usage. Message-ID: <873a8pafei.fsf@sympatico.ca> With the following schema, [sample.xsd] [/sample.xsd] I turned on --name-regex-trace and the output looks like this for enums, ... enumerator name: 'foo' ... I was hoping for, enumerator name: 'bar foo' enumerator name: 'baz foo' or something like that. Is it manditory that each simpleType have a seperate file to apply the transform rules on an enum? I don't know if many people use the --enumerator-regex option. I would suggest a --qualified-enumerator-regex or updating 'enumerator name:' text to inlude the simpleType. fwiw, Bill Pringlemeir. From boris at codesynthesis.com Wed Jul 22 02:29:34 2009 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] --enumerator-regex usage. In-Reply-To: <873a8pafei.fsf@sympatico.ca> References: <873a8pafei.fsf@sympatico.ca> Message-ID: Hi Bill, Bill Pringlemeir writes: > > > > > > > > > > > > > > > I turned on --name-regex-trace and the output looks like this for > enums, > > ... > enumerator name: 'foo' > ... > > I was hoping for, > > enumerator name: 'bar foo' > enumerator name: 'baz foo' Yes, the --enumerator-regex is applied on local, unqualified names. It was initially meant to allow changing the naming convention (e.g., making all enumerators upper-case) rather than mangling individual enumerator values, though people seem to be using them for this as well. Probably the best way to address this would be to add an option like --qualified-regex-names which makes all the --*-regex options work on qualified names. I've added this to my TODO list. Boris From boris at codesynthesis.com Wed Jul 22 13:58:21 2009 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] RE: Problem getting code to read data from files including using XInclude In-Reply-To: <7025D5D72EC4424F9456258BD1E6E52901B7C15AA8@lcinf01.tibra.com> References: <7025D5D72EC4424F9456258BD1E6E52901B7C15AA8@lcinf01.tibra.com> Message-ID: Hi Tim, Tim Muirhead writes: > It will give a runtime error > test.xml:9:53 error: no scheme found in URI > > This only occurs when trying to include the file > > > > > It is definitely picking up the correct file - as if you put in a > invalid file name you get an 'unable to include resource 'bogusfile.xml' > Also, the testRef.xml file appears valid. I investigated this a bit and it appears this is not about the validity of the file but rather about the URI scheme (e.g., http://, file://, etc). For some reason, XInclude implementation in Xerces-C++ does not like it when you have a relative path as system id. That is, if I try to use /tmp/test.xml, everything works but if I use just test.xml, I get the above error. I have filed a bug report about this: https://issues.apache.org/jira/browse/XERCESC-1879 One way to work around this problem is to use the LocalFileInputSource class provided by Xerces-C++ instead of fstream. Internally this class makes all relative paths absolute. I have updated your test to show how to do this: http://www.codesynthesis.com/~boris/tmp/xsdTest2.zip Boris From boris at codesynthesis.com Wed Jul 22 14:26:25 2009 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Visitor pattern automatically generated/ and/or included In-Reply-To: <955f8a1b0907202004s2bf5d350x24b9185e2114daf0@mail.gmail.com> References: <200907152232.50490.Markus.Hummel@gmx.de> <30304.192.12.88.7.1247974395.squirrel@www.dre.vanderbilt.edu> <955f8a1b0907202004s2bf5d350x24b9185e2114daf0@mail.gmail.com> Message-ID: Hi Christopher, Christopher Fuhrman writes: > Automatically generated object structures seem *very* likely to change. Hm, I don't know. If the schema is mature and stable, I don't see a reason why the object structure has to change very often. > The original question mentions getting an automatically generated traverser, > which is similar to two variants of Visitor mentioned in GoF: traversing > logic in an Iterator or in the Composite structure. It might make sense in a > code-generation scenario to generate this traversing logic, but without > using a Visitor that knows about all elements. There are a number of ways to improve the Visitor design so that there is no central Visitor class. For example, in the XSD compiler itself we use a traversal technique which has a separate traverser class for each object model type. These traversers can then be collected at runtime and dispatched on a object. The main drawback of such approaches is the speed since they rely on (custom) RTTI and dynamic type casting. The big advantage of the original visitor design is that it costs just two virtual function calls. > Maybe it would make sense to hand-code a Visitor in this case once > (if?) the data structure is stable? The problem is with implementing the accept() functions. They need to be part of the object model and the only two ways to achieve this without modifying the code generator is to modify the generated code or customize each type in the object model. I agree though that providing a hand-written Visitor interface is probably not a big deal in this case. Boris From sutambe at dre.vanderbilt.edu Sat Jul 18 23:33:15 2009 From: sutambe at dre.vanderbilt.edu (Sumant Tambe) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Visitor pattern automatically generated/ and/or included In-Reply-To: References: <200907152232.50490.Markus.Hummel@gmx.de> Message-ID: <30304.192.12.88.7.1247974395.squirrel@www.dre.vanderbilt.edu> Hi Boris, > The problem with automatically generating the Visitor mechanism is > that the Visitor class needs to define the visit() function for each > type in the object model. When you have separate compilation of > schemas that are included or imported, this becomes a very tricky > task. Can you please elaborate the difficulty here? What do you mean by separate compilation of schemas? > So it looks like the best bet to get this automated would be to > define the Visitor class manually and then customize the code > generator in XSD to emit the accept() function implementation > for each object model class. If you would like, I can give you > some pointers on how to do the customization. Is such customization possible without recompiling the code generator? Anyways, I'm interested in learning more on how to do this. > BTW, is anybody else interested in this functionality? Finally, I' extremely interested in the functionality! In fact, part of my research work in Vanderbilt University has focussed on improving such traversals in a type-safe way. You and the xsd-users subscribers might be interested in a research paper that I recently presented at a domain-specific languages conference. I blogged about it here. http://cpptruths.blogspot.com/2009/03/leesa-new-way-of-xml-programming-in-c.html Interested readers will find a lot of pointers to existing work on traversal programming in the paper. I thought this thread would be a prefect place to introduce this paper. I've heard comments from the researchers. I'm interested in gaining feedback from C++ developers who deal with schemas and traversals on a day-to-day basis. Critical and constructive comments are welcome. Thanks, Sumant. ---------------------------------------------- Sumant Tambe Research Assistant ISIS, Vanderbilt University Email: sutambe@dre.vanderbilt.edu From boris at codesynthesis.com Tue Jul 28 03:08:09 2009 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Re: invalidated iterators In-Reply-To: <661f825d0907270129y77727938o30b698404c53c176@mail.gmail.com> References: <661f825d0907270129y77727938o30b698404c53c176@mail.gmail.com> Message-ID: Hi Brian, In the future please send technical questions like these to the xsd-users mailing list (which I've CC'ed) instead of to me directly. For more information, see the Posting Guidelines: http://www.codesynthesis.com/support/posting-guidelines.xhtml B Hart writes: > Hi Boris, > > In my XSD code it seems that when I use a parsing function to create an > object model of my XML doc, and then subsequently change some element value > and re save the XML doc, if I have a sequence iterator it becomes > invalidated. If I change the name of the XML file that I save then the seq > iterator does not seem to be invalidated. However, would prefer to not have > to create a second file. Any ideas??? The object model is passed as a const reference and is not modified by serialization functions. So I don't see how serializing the object model can invalidate any iterators that point to it. However, the following scenario can lead to the behavior that you are observing: You obtain an iterator for a sequence somewhere in the object model. In another part of your program you add or remove some elements from this sequence. In this case, the iterator that you first obtained will be invalid. If you can't find the source of the problem, feel free to send a test case that reproduces this and I will take a look. Boris [The rest of the email follows for reference.] > Thanks, > > Brian Hart > > Here is a bit of the code: > > > LA_Config_T::InputProperties_sequence& ips(la->InputProperties()); > > ... > > for(LA_Config_T::InputProperties_iterator LA_iIt(ips.begin()); LA_iIt!= > ips.end(); LA_iIt++){ > ... > > xml_schema::namespace_infomap map; > map[""].name = ""; > map[""].schema = "LA_Config.xsd"; > std::ofstream ofs(la->LAConfigXMLFile().c_str()); > LA_Config(ofs, *la, map); > } //error happens here when for loop iterator is accessed From bhartsb at gmail.com Tue Jul 28 05:20:59 2009 From: bhartsb at gmail.com (B Hart) Date: Sun Oct 11 15:34:10 2009 Subject: [xsd-users] Re: invalidated iterators In-Reply-To: References: <661f825d0907270129y77727938o30b698404c53c176@mail.gmail.com> Message-ID: <661f825d0907280220xa3890beudb460ac3501248ba@mail.gmail.com> Hi Boris, Yes you were right on, I was forgetting about another thread. Thanks for your insight. Brian On Tue, Jul 28, 2009 at 12:08 AM, Boris Kolpackov wrote: > Hi Brian, > > In the future please send technical questions like these to the > xsd-users mailing list (which I've CC'ed) instead of to me directly. > For more information, see the Posting Guidelines: > > http://www.codesynthesis.com/support/posting-guidelines.xhtml > > > B Hart writes: > > > Hi Boris, > > > > In my XSD code it seems that when I use a parsing function to create an > > object model of my XML doc, and then subsequently change some element > value > > and re save the XML doc, if I have a sequence iterator it becomes > > invalidated. If I change the name of the XML file that I save then the > seq > > iterator does not seem to be invalidated. However, would prefer to not > have > > to create a second file. Any ideas??? > > The object model is passed as a const reference and is not modified by > serialization functions. So I don't see how serializing the object model > can invalidate any iterators that point to it. > > However, the following scenario can lead to the behavior that you are > observing: You obtain an iterator for a sequence somewhere in the > object model. In another part of your program you add or remove some > elements from this sequence. In this case, the iterator that you > first obtained will be invalid. > > If you can't find the source of the problem, feel free to send a test > case that reproduces this and I will take a look. > > > Boris > > > [The rest of the email follows for reference.] > > > Thanks, > > > > Brian Hart > > > > Here is a bit of the code: > > > > > > LA_Config_T::InputProperties_sequence& ips(la->InputProperties()); > > > > ... > > > > for(LA_Config_T::InputProperties_iterator LA_iIt(ips.begin()); LA_iIt!= > > ips.end(); LA_iIt++){ > > ... > > > > xml_schema::namespace_infomap map; > > map[""].name = ""; > > map[""].schema = "LA_Config.xsd"; > > std::ofstream ofs(la->LAConfigXMLFile().c_str()); > > LA_Config(ofs, *la, map); > > } //error happens here when for loop iterator is accessed >