From Andre.Moreira at helvar.com Thu Apr 2 04:14:50 2015
From: Andre.Moreira at helvar.com (Moreira Andre)
Date: Thu Apr 2 10:19:55 2015
Subject: [xsde-users] Using xsde in win32 to replace xsd
Message-ID: <36FE3F160A663D47A0B113E40D656B389BB94600@servex10.Service.asp>
Hello,
The codebase of the app I am working on shares the same codebase with win32 and ARM applications that we are developing. In the win32 codebase we have been using xsd successfully for the last year, but we now want to be able to use xmls in the ARM platform as well and xsde is the way to go.
Obviously we would like to use xsde in win32 as well in order to reduce dependencies and keep the codebase as simple as possible. I was under the impression that xsde was an in place replacement for xsd without the dependencies, but all examples use pimp/pskel and simpl/sskel besides the usual generated files.
Is it possible for xsde to generate the files with parsing and serialization so that at least the created methods use the same signature?
On final note. I am building the library with the /MDd option and I "ported" the cxx\hybrid\hello example to a VS2013 solution that was using /MD. This caused a crash in this line doc_p.parse(argv[1]);
As soon as I realized an set the correct build option It worked fine, but it was a pain to realize why. It might help someone in the future to know that they need to double-check build options if something "weird" happens.
Best regards
Andre Moreira
Software Engineer
[emailfooter]
[Description: Description: Description: Description: images] follow on LinkedIn [Description: Description: Description: Description: twitter] follow on Twitter
This email and any files transmitted with it are confidential and may also be privileged. If you are not the intended recipient, you should not copy, forward or use any part of it or disclose its contents to any person. If you have received it in error, please notify our system manager immediately on +44 (0)1322 617200. This email and any automatic copies should be deleted after you have contacted the system manager. Except where this email is sent in the usual course of our business, the views expressed in this email are those of the sender and not those of Helvar Limited.
This communication is from Helvar Limited. Helvar Limited is a limited company registered in England and Wales with registered number 01478926. Helvar Limited accepts no responsibility for software viruses, and you should check for viruses before opening any attachments. Internet communications are not secure, and therefore Helvar Limited does not provide any guarantee or warranty that this message or any attachments shall remain confidential. To ensure client service levels and business continuity, Helvar Limited operates a policy whereby emails can be read by its employees other than the addressee. This policy complies with the Telecommunications (Lawful Business Practice), (Interception of Communications) Regulations 2000.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 5993 bytes
Desc: image001.jpg
Url : http://codesynthesis.com/pipermail/xsde-users/attachments/20150402/6b66ef39/image001.jpg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 764 bytes
Desc: image002.jpg
Url : http://codesynthesis.com/pipermail/xsde-users/attachments/20150402/6b66ef39/image002.jpg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 1154 bytes
Desc: image003.png
Url : http://codesynthesis.com/pipermail/xsde-users/attachments/20150402/6b66ef39/image003.png
From boris at codesynthesis.com Fri Apr 3 04:13:47 2015
From: boris at codesynthesis.com (Boris Kolpackov)
Date: Fri Apr 3 04:25:25 2015
Subject: [xsde-users] Using xsde in win32 to replace xsd
In-Reply-To: <36FE3F160A663D47A0B113E40D656B389BB94600@servex10.Service.asp>
References: <36FE3F160A663D47A0B113E40D656B389BB94600@servex10.Service.asp>
Message-ID:
Hi Andre,
Moreira Andre writes:
> The codebase of the app I am working on shares the same codebase with
> win32 and ARM applications that we are developing. In the win32 codebase
> we have been using xsd successfully for the last year, but we now want
> to be able to use xmls in the ARM platform as well and xsde is the way
> to go.
Note that the choice between XSD and XSD/e is not really about
architectures but more whether the target is a resource-constrained,
mobile/embedded platform. These days ARM is used in all kinds of
general-purpose machines. For instance, nothing will prevent you
from using XSD on, say, ARM-based Raspberry Pi running full
GNU/Linux stack (e.g., Debian). It is a full-featured Linux
machine.
> Obviously we would like to use xsde in win32 as well in order to reduce
> dependencies and keep the codebase as simple as possible. I was under the
> impression that xsde was an in place replacement for xsd without the
> dependencies,
No, that impression is incorrect. XSD/e object model/APIs are very
different compared to XSD.
> Is it possible for xsde to generate the files with parsing and
> serialization so that at least the created methods use the same
> signature?
Again, no, XSD/e object model is very different. You will have to
port your code.
> On final note. I am building the library with the /MDd option and
> I "ported" the cxx\hybrid\hello example to a VS2013 solution that
> was using /MD. This caused a crash in this line doc_p.parse(argv[1]);
>
> As soon as I realized an set the correct build option It worked fine,
> but it was a pain to realize why. It might help someone in the future
> to know that they need to double-check build options if something
> "weird" happens.
Yes, thanks for the note. The INSTALL file suggests that you copy
the exact options from your VC++ project to the config.nmake in
order to avoid "surprises" like this.
Boris
From adi4info at gmail.com Thu Apr 30 05:44:32 2015
From: adi4info at gmail.com (Adinath Shetye)
Date: Thu Apr 30 10:09:56 2015
Subject: [xsde-users] Empty class generated for numerical facets
Message-ID:
Hi All,
Im trying to generate a XML from schema.xsd(pasted below) using xsde
version 3.2.0 on Ubuntu-14.
Generated code using command:xsde cxx-hybrid --generate-parser
--generate-serializer --generate-aggregate Schema.xsd
But the Schema.hxx file generated has empty class. It should have contained
setter/getter funtions for lattitude.
Am I doing something wrong or "restriction base="xs:integer" is not
supported?
*Schema.xsd used:*
0.0000001 degree (0.1 micro degree)
*Schema.hxx:*
// Latitude (fixed-length)
//
class Latitude: public ::xml_schema::integer_base
{
public:
Latitude ();
};
/ Begin prologue.
//
//
// End prologue.
#include "Schema.hxx"
// Latitude
//
*Schema.cxx:*
#include
#include
// Latitude
//
Latitude::
Latitude ()
{
}
// Begin epilogue.
//
//
// End epilogue.
#include
Thanks in Advance,
Adinath
From boris at codesynthesis.com Thu Apr 30 11:22:47 2015
From: boris at codesynthesis.com (Boris Kolpackov)
Date: Thu Apr 30 11:23:08 2015
Subject: [xsde-users] Empty class generated for numerical facets
In-Reply-To:
References:
Message-ID:
Hi Adinath,
Adinath Shetye writes:
> class Latitude: public ::xml_schema::integer_base
Note that the class derives form integer_base. The "setters/getters"
you are looking for are defined there.
See Chapter 5, "Mapping for Built-In XML Schema Types" for details.
Boris
From adi4info at gmail.com Thu Apr 30 14:12:27 2015
From: adi4info at gmail.com (Adinath Shetye)
Date: Fri May 1 07:54:32 2015
Subject: [xsde-users] Empty class generated for numerical facets
In-Reply-To:
References:
Message-ID:
Thanks Boris,
Sorry I missed to see that point in documentation. Got my program working.
Regards,
Adinat
On Thu, Apr 30, 2015 at 5:22 PM, Boris Kolpackov
wrote:
> Hi Adinath,
>
> Adinath Shetye writes:
>
> > class Latitude: public ::xml_schema::integer_base
>
> Note that the class derives form integer_base. The "setters/getters"
> you are looking for are defined there.
>
> See Chapter 5, "Mapping for Built-In XML Schema Types" for details.
>
> Boris
>