From jerry.yin at yahoo.com Mon Jun 8 17:04:46 2009
From: jerry.yin at yahoo.com (Jerry Yin)
Date: Mon Jun 8 17:04:54 2009
Subject: [xsde-users] xml parser error
Message-ID: <158312.88935.qm@web63202.mail.re1.yahoo.com>
Hi Experts,
?
I am new to this group. I tried to create a test hybrid/parser program using following schema. I could verfy the schema is correct using the Liquid XML studio. But when parser the idel.xml, I couldn't get the correct vaule. Could someone help me? If I parse the idel.xml, I even got a parser error at (4,34), which is the >
?
thanks,
Jerry
?
schema:
?
??
??
???
???
????
????
???
???
??
??
?
?
?
idle.xml
?
idel1.xml
__________________________________________________________________
Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca
From boris at codesynthesis.com Tue Jun 9 13:37:52 2009
From: boris at codesynthesis.com (Boris Kolpackov)
Date: Tue Jun 9 11:33:03 2009
Subject: [xsde-users] xml parser error
In-Reply-To: <158312.88935.qm@web63202.mail.re1.yahoo.com>
References: <158312.88935.qm@web63202.mail.re1.yahoo.com>
Message-ID:
Hi Jerry,
Jerry Yin writes:
?> If I parse the idel.xml, I even got a parser error at (4,34), which
> is the >
What does the error message say? I tried to do the same thing and
everything worked for me without any errors. I compiled your schema
like this:
xsde cxx-hybrid --generate-parser --generate-aggregate --namespace-map urn:ietf:params:xml:ns:dialog-info= test.xsd
Then I compiled and linked the attached test driver with the generated
code and then ran it on the test file. The output is as expected:
0
full
sip:alice@example.com
Boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: driver.cxx
Type: text/x-c++src
Size: 1119 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsde-users/attachments/20090609/ec78826f/driver.cxx
From jerry.yin at yahoo.com Tue Jun 9 21:56:14 2009
From: jerry.yin at yahoo.com (Jerry Yin)
Date: Tue Jun 9 21:56:21 2009
Subject: [xsde-users] xml parser error
Message-ID: <495405.47043.qm@web63204.mail.re1.yahoo.com>
Hi Boris,
?
Thanks for your response. After compare your driver.cxx with my testing code, I found my code was missing the dialog_info_p.root_namespace (), in the doc_p initialization. I copied this testing code from one example.
?
Mine:
??? xml_schema::document_pimpl doc_p (
????? dialog_info_p.root_parser (),
????? dialog_info_p.root_name ());
Yours:
?
??? xml_schema::document_pimpl doc_p (
????? dialog_info_p.root_parser (),
????? dialog_info_p.root_namespace (),
????? dialog_info_p.root_name ());
After I using your testing code, everything works fine now.
?
This is a great tool. Thanks a lot!
?
Jerry
--- On Tue, 6/9/09, Boris Kolpackov wrote:
From: Boris Kolpackov
Subject: Re: [xsde-users] xml parser error
To: "Jerry Yin"
Cc: xsde-users@codesynthesis.com
Received: Tuesday, June 9, 2009, 1:37 PM
Hi Jerry,
Jerry Yin writes:
?> If I parse the idel.xml, I even got a parser error at (4,34), which
> is the >
What does the error message say? I tried to do the same thing and
everything worked for me without any errors. I compiled your schema
like this:
xsde cxx-hybrid --generate-parser --generate-aggregate --namespace-map urn:ietf:params:xml:ns:dialog-info= test.xsd
Then I compiled and linked the attached test driver with the generated
code and then ran it on the test file. The output is as expected:
0
full
sip:alice@example.com
Boris
__________________________________________________________________
Make your browsing faster, safer, and easier with the new Internet Explorer? 8. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/
From swati_gaur at yahoo.com Wed Jun 10 03:44:43 2009
From: swati_gaur at yahoo.com (swati gaur)
Date: Wed Jun 10 03:44:51 2009
Subject: [xsde-users] Problem in QNX converting XML Schema to C++ files
Message-ID: <958932.97900.qm@web50807.mail.re2.yahoo.com>
--- On Tue, 5/19/09, swati gaur wrote:
> Hi,
> I? have downloaded xsde-3.1.0-i686-linux-gnu.tar and
> trying to create code using hello.xsd schema file in QNX. I
> am using the command" xsde cxx-parser hello.xsd" to produce
> produces two C++ files: hello-pskel.hxx? and
> hello-pskel.cxx but i get an error : xsde : can't access
> shared library.
>
> What could be the problem...Please Help
> ? ? ?
>
From boris at codesynthesis.com Wed Jun 10 13:09:36 2009
From: boris at codesynthesis.com (Boris Kolpackov)
Date: Wed Jun 10 11:04:47 2009
Subject: [xsde-users] Problem in QNX converting XML Schema to C++ files
In-Reply-To: <958932.97900.qm@web50807.mail.re2.yahoo.com>
References: <958932.97900.qm@web50807.mail.re2.yahoo.com>
Message-ID:
Hi,
I already replied to your question, please see:
http://www.codesynthesis.com/pipermail/xsde-users/2009-May/000110.html
If that does not help, please let us know what you have tried
and what is not working.
Boris
From jerry.yin at yahoo.com Wed Jun 10 12:23:29 2009
From: jerry.yin at yahoo.com (Jerry Yin)
Date: Thu Jun 11 12:08:49 2009
Subject: [xsde-users] How to remove the g1: string from the generated xml doc
Message-ID: <403027.74625.qm@web63207.mail.re1.yahoo.com>
Hi Experts,
?
The serializer appended the g1: token in the generated XML doc. How to remove it. Here are the original XML doc and the serialized doc.
?
thanks,
Jerry
?
Original XML:
?
?
Serialized XML:
?
??? terminated
?
__________________________________________________________________
The new Internet Explorer? 8 - Faster, safer, easier. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/
From boris at codesynthesis.com Thu Jun 11 14:20:19 2009
From: boris at codesynthesis.com (Boris Kolpackov)
Date: Thu Jun 11 12:15:29 2009
Subject: [xsde-users] Re: How to remove the g1: string from the generated
xml doc
In-Reply-To: <403027.74625.qm@web63207.mail.re1.yahoo.com>
References: <403027.74625.qm@web63207.mail.re1.yahoo.com>
Message-ID:
Hi Jerry,
Jerry Yin writes:
> The serializer appended the g1: token in the generated XML doc. How
> to remove it. Here are the original XML doc and the serialized doc.
> ??
> Original XML:
> ?
>
>
> [...]
> ?
> Serialized XML:
>
>
References: <403027.74625.qm@web63207.mail.re1.yahoo.com>
Message-ID:
Helo,
I has the same problem and here is my solution
infoMap[""].name = "http://www.landxml.org/schema/LandXML-1.2";
and optional but a good thing is to put also
infoMap[""].schema = "
http://www.landxml.org/schema/LandXML-1.2/LandXML-1.2.xsd";
so on you it should be
infoMap[""].name = "urn:ietf:params:xml:ns:dialog-info";
and then use the infoMap as parameter to serialization function
hope to help the answer,
Costy
On Thu, Jun 11, 2009 at 8:20 PM, Boris Kolpackov wrote:
> Hi Jerry,
>
> Jerry Yin writes:
>
> > The serializer appended the g1: token in the generated XML doc. How
> > to remove it. Here are the original XML doc and the serialized doc.
> >
> > Original XML:
> >
> >
> > >
> > [...]
> >
> > Serialized XML:
> >
> >
> You can get the same output as the original XML by specifying
> the custom namespace-prefix mapping:
>
> doc_s.add_default_prefix ("urn:ietf:params:xml:ns:dialog-info");
>
> See Chapter 8, "Document Serializer and Error Handling" in the
> Embedded C++/Serializer Mapping Getting Started Guide for more
> information:
>
>
> http://www.codesynthesis.com/projects/xsde/documentation/cxx/serializer/guide/index.xhtml#8
>
> Boris
>
>
From boris at codesynthesis.com Thu Jun 11 15:14:46 2009
From: boris at codesynthesis.com (Boris Kolpackov)
Date: Thu Jun 11 13:09:56 2009
Subject: [xsde-users] Re: How to remove the g1: string from the
generated xml doc
In-Reply-To:
References: <403027.74625.qm@web63207.mail.re1.yahoo.com>
Message-ID:
Hi Constantin,
Constantin Iacobescu writes:
> I has the same problem and here is my solution
>
> infoMap[""].name = "http://www.landxml.org/schema/LandXML-1.2";
This API is for the C++/Tree mapping which is not available in XSD/e.
In XSD/e we use C++/Serializer which provides a set of functions in
the document serializer class that allow you to set the namespace-
prefix mappings as well as the schema location information. See
Chapter 8, "Document Serializer and Error Handling" in the Embedded
C++/Serializer Mapping Getting Started Guide for details:
http://www.codesynthesis.com/projects/xsde/documentation/cxx/serializer/guide/index.xhtml#8
Boris
From Amrita.Garg at audiocodes.com Mon Jun 15 07:00:09 2009
From: Amrita.Garg at audiocodes.com (Amrita Garg)
Date: Mon Jun 15 07:45:22 2009
Subject: [xsde-users] covariance issue
Message-ID: <659CD1391ADEEC47AE3001E30804F014684F20A003@ACLMAIL01.corp.audiocodes.com>
Hi,
I have generated some source/headers files using CodeSynthesis XSD/e.
Now I want to compile the generated files on Microsoft Visual 6.0.
So I added the source files of CodeSynthesis XSD/e(ones in directory libxsde).
When I compile I am getting errors because CodeSynthesis XSD/e files use covariance which is not supported by Microsoft Visual 6.0.
So is there any way to turn off covariance in order to compile on Microsoft visual 6.0
Warm Regards,
Amrita
________________________________
This email and any files transmitted with it are confidential material. They are intended solely for the use of the designated individual or entity to whom they are addressed. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, use, distribution or copying of this communication is strictly prohibited and may be unlawful.
If you have received this email in error please immediately notify the sender and delete or destroy any copy of this message
From biziosan at comcast.net Sun Jun 14 14:22:58 2009
From: biziosan at comcast.net (Fabrizio Santini)
Date: Mon Jun 15 07:46:09 2009
Subject: [xsde-users] XSDe in a VC++ 2008 project
Message-ID: <4A354002.8070908@comcast.net>
Hello,
I need a very light XML parser and serializer for my MFC project, and
XSDe is just perfect! I am trying to compile a very simple example
(protocol) as a VC++ project 2008 with MFC. Although I know it is
possible to compile XSDe examples using nmake, I was unable to port the
makefile settings into the VC++ 2008 solution to run this example. The
compilation seems to go smoothly, but linking produces lots of
conflicts. Has anyone successfully compiled and run an MFC application
with XSDe?
Thank you so much for your help!
From boris at codesynthesis.com Mon Jun 15 15:30:43 2009
From: boris at codesynthesis.com (Boris Kolpackov)
Date: Mon Jun 15 13:25:50 2009
Subject: [xsde-users] XSDe in a VC++ 2008 project
In-Reply-To: <4A354002.8070908@comcast.net>
References: <4A354002.8070908@comcast.net>
Message-ID:
Hi Fabrizio,
Fabrizio Santini writes:
> I need a very light XML parser and serializer for my MFC project, and
> XSDe is just perfect! I am trying to compile a very simple example
> (protocol) as a VC++ project 2008 with MFC. Although I know it is
> possible to compile XSDe examples using nmake, I was unable to port the
> makefile settings into the VC++ 2008 solution to run this example. The
> compilation seems to go smoothly, but linking produces lots of
> conflicts. Has anyone successfully compiled and run an MFC application
> with XSDe?
I haven't tried XSD/e with an MFC application but it definitely should be
possible. Seeing that you are getting link errors I would first look for
these two things:
1. I assume you added libxsd.lib to be linked to your application in the
linker settings.
2. You need to make sure that libxsd was built with the same runtime
settings as you application. For that go to your project settings,
C++ compiler tab, and check the command line. There you should
see one of the /M* options (e.g., /MT, /MTd, etc). Add the same
option to the config/config.nmake file to the CFLAGS and CXXFLAGS
variables. Then clean (name /f nmakefile clean) and build
(name /f nmakefile) libxsd. There could be other options on the
command line that you may want to copy but normally only the /M*
ones cause link failures.
If none of the above helps, feel free to send your test application
so that I can take a look.
Boris
From boris at codesynthesis.com Mon Jun 15 16:36:18 2009
From: boris at codesynthesis.com (Boris Kolpackov)
Date: Mon Jun 15 14:31:24 2009
Subject: [xsde-users] covariance issue
In-Reply-To: <659CD1391ADEEC47AE3001E30804F014684F20A003@ACLMAIL01.corp.audiocodes.com>
References: <659CD1391ADEEC47AE3001E30804F014684F20A003@ACLMAIL01.corp.audiocodes.com>
Message-ID:
Hi Amrita,
Amrita Garg writes:
> I have generated some source/headers files using CodeSynthesis XSD/e.
> Now I want to compile the generated files on Microsoft Visual 6.0.
> So I added the source files of CodeSynthesis XSD/e(ones in directory
> libxsde). When I compile I am getting errors because CodeSynthesis XSD/e
> files use covariance which is not supported by Microsoft Visual 6.0.
We do use covariant return types when support for polymorphism is
enabled. Without support for polymorphism I believe it should be
possible to use XSD/e with VC++ 6.0.
It is better to use the provided nmakefile to build libxsd. This
nmakefile selects a specific set of source files depending on the
configuration (I think the reason you get the errors is because
you have added all the files in libxsd, including those that are
used only when support for polymorphism is enabled). So I suggest
that you follow the instructions in the accompanying INSTALL file
to build libxsd.lib. Once this is done you can build your application
using the VC++ IDE and will simply need to link to libxsd.lib.
Let us know if you run into any problems with this approach. If you
get any compile errors, please include them in your email.
Boris
From swati_gaur at yahoo.com Thu Jun 18 08:28:25 2009
From: swati_gaur at yahoo.com (swati gaur)
Date: Thu Jun 18 08:28:33 2009
Subject: [xsde-users] covariance issue
Message-ID: <81215.94205.qm@web50806.mail.re2.yahoo.com>
Hi, I ve? compiled and could run files created using CodeSynthesis XSD/e in VC++ 6.0
without any covariance issue.
What is covariance issue ??I don't know about it.
--- On Mon, 6/15/09, Amrita Garg wrote:
From: Amrita Garg
Subject: [xsde-users] covariance issue
To: "xsde-users@codesynthesis.com"
Date: Monday, June 15, 2009, 4:30 PM
Hi,
I have generated some source/headers files using CodeSynthesis XSD/e.
Now I want to compile the generated files on Microsoft Visual 6.0.
So I added the source files of CodeSynthesis XSD/e(ones in directory libxsde).
When I compile I am getting errors because CodeSynthesis XSD/e files use covariance which is not supported by Microsoft Visual 6.0.
So is there any way to turn off covariance in order to compile on Microsoft visual 6.0
Warm Regards,
Amrita
________________________________
This email and any files transmitted with it are confidential material. They are intended solely for the use of the designated individual or entity to whom they are addressed. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, use, distribution or copying of this communication is strictly prohibited and may be unlawful.
If you have received this email in error please immediately notify the sender and delete or destroy any copy of this message
From boris at codesynthesis.com Thu Jun 18 12:17:34 2009
From: boris at codesynthesis.com (Boris Kolpackov)
Date: Thu Jun 18 10:12:39 2009
Subject: [xsde-users] covariance issue
In-Reply-To: <81215.94205.qm@web50806.mail.re2.yahoo.com>
References: <81215.94205.qm@web50806.mail.re2.yahoo.com>
Message-ID:
Hi Swati,
swati gaur writes:
> Hi, I ve? compiled and could run files created using CodeSynthesis XSD/e
> in VC++ 6.0 without any covariance issue.
> What is covariance issue ??I don't know about it.
The covariant return type feature in C++ allows you to override
a virtual function with a return type that is derived from the
return type of this function as declared in the base class. Here
is an example:
struct RB {};
struct RD: RB {};
struct B
{
virtual RB* f ();
};
struct D: B
{
virtual RD* f ();
};
This feature is not supported in VC++ 6.0. The XSD/e runtime and
generated code only use covariant return types when support for
polymorphism is enabled. Amrita was accidently compiling files
from the XSD/e runtime which are only used when polymorphism is
enabled. Now, after this has been resolved, everything is working
fine.
Boris
From lthota at yahoo.com Tue Jun 23 19:43:33 2009
From: lthota at yahoo.com (Laxmi Thota)
Date: Tue Jun 23 19:43:41 2009
Subject: [xsde-users] XSD features
Message-ID: <855089.37680.qm@web30302.mail.mud.yahoo.com>
CodeSynthesis XSD/e supports both parsing and serialization, but does it support fitting into existing data types. Or does CodeSysnthesis XSD all of these functionality.
Thanks.
From boris at codesynthesis.com Thu Jun 25 14:27:23 2009
From: boris at codesynthesis.com (Boris Kolpackov)
Date: Thu Jun 25 12:22:49 2009
Subject: [xsde-users] XSD features
In-Reply-To: <855089.37680.qm@web30302.mail.mud.yahoo.com>
References: <855089.37680.qm@web30302.mail.mud.yahoo.com>
Message-ID:
Hi Laxmi,
Laxmi Thota writes:
> CodeSynthesis XSD/e supports both parsing and serialization, but does
> it support fitting into existing data types.
Yes, XSD/e provides two mappings, C++/Parser and C++/Serializer, that
can be used to respectively parse and serialize XML to/from existing,
application-specific data types. See the following links for details:
http://www.codesynthesis.com/products/xsde/c++/parser/
http://www.codesynthesis.com/products/xsde/c++/serializer/
The third mapping, C++/Hybrid, is built on top of these two mappings
and provides the ability to auto-generate the data types:
http://www.codesynthesis.com/products/xsde/c++/hybrid/
Boris