From vherard at alphasqr.com Wed May 13 08:36:50 2009
From: vherard at alphasqr.com (vherard@alphasqr.com)
Date: Sun Oct 11 15:34:09 2009
Subject: [xsd-users] Boost date customization in xsd
Message-ID: <20090513053650.f9339f9fc63982ff33f985f6b62d68cf.d81629797d.wbe@email.secureserver.net>
I someone o the custom provide that takes simple_type base class is
W output. serialization output.
W it shoul error.<
-------------- next part --------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xml-schema-custom.cxx
Type: text/x-c++
Size: 1527 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20090513/e5a6d73b/xml-schema-custom.bin
-------------- next part --------------
United States Of America
New York
From boris at codesynthesis.com Thu May 14 09:05:31 2009
From: boris at codesynthesis.com (Boris Kolpackov)
Date: Sun Oct 11 15:34:09 2009
Subject: [xsd-users] Boost date customization in xsd
In-Reply-To: <20090513053650.f9339f9fc63982ff33f985f6b62d68cf.d81629797d.wbe@email.secureserver.net>
References: <20090513053650.f9339f9fc63982ff33f985f6b62d68cf.d81629797d.wbe@email.secureserver.net>
Message-ID:
Hi,
vherard@alphasqr.com writes:
> I added a constructor to the example you provide that takes a Boost
> date as input and I'm concerned that the simple_type base class is
> not correctly initialized.
>
> date::
> date (const gregorian :: date& d)
> : simple_type ( boost :: gregorian :: to_extended_iso_string (d) , NULL , 0 , 0 ) ,
> gregorian::date (d)
> {
> }
The simple_type type has the default c-tor which should be used in this
case:
date::
date (const gregorian::date& d)
: gregorian::date (d)
{
}
> When I serialize classes that use customized dates, I get incorrect
> output.
You need to implement serialization operators for the custom date type,
something along these lines:
namespace xml_schema
{
void
operator<< (xercesc::DOMElement& e, const date& d)
{
e << to_extended_iso_string (d);
}
void
operator<< (xercesc::DOMAttr& a, const date& d)
{
a << to_extended_iso_string (d);
}
void
operator<< (xml_schema::list_stream& ls, const date& d)
{
ls.os_ << to_extended_iso_string (d);
}
}
Boris
From vherard at alphasqr.com Tue May 19 09:11:27 2009
From: vherard at alphasqr.com (vherard@alphasqr.com)
Date: Sun Oct 11 15:34:09 2009
Subject: [xsd-users] Boost date customization in xsd
Message-ID: <20090519061127.f9339f9fc63982ff33f985f6b62d68cf.a21a91caa7.wbe@email.secureserver.net>
Thanks. This is very usefull. Regards
-------- Original Message --------
Subject: Re: [xsd-users] Boos From: Boris Kolpackov I added a constructor to the Boost
> date as input and I'm conce > not correctly initialized.< > date::
> date (const gregorian :: date& d)
> , NULL , > gregorian::date (d)
> {
> }
The simp this
case:
date::
date (const gregorian::date& d)
: gregorian::date (d) {
}
> When I serialize classes that use customized dat incorrect
> output.
You need to implement serializat type,
something along these lines:
namespace xml_schema
{
void
operator<< (xercesc::DOMElem {
e << to_extended_iso_string (d }
void
operator<< (xercesc::DOMAttr& a, const dat {
a << to_extended_iso_string (d);
}
voidoperator<< (xml_schema::list_stream& ls, const date& d)
ls.os_ << to_extended_iso_string (d);
}
}
Boris
From PaquetP at navcanada.ca Fri May 22 07:41:32 2009
From: PaquetP at navcanada.ca (Paquette, Patrick)
Date: Sun Oct 11 15:34:09 2009
Subject: [xsd-users] Removing elements from sequence
Message-ID: <474534909BE4064E853161350C47578E09C56BCC@ncrmail1.corp.navcan.ca>
Maybe I'm just missing something obvious, but is there a way to remove
an element from an XSD generated sequence without having the custom
smart ptr pointer delete it, and without cloning it? Something like:
auto_ptr m (XSDGeneratedClassInstance.SomeSequence().pop_back())
???
Patrick Paquette
Programmer
Nav Canada - Flight Inspection Engineering
Technical Systems Center
280 Hunt Club Road
Ottawa, ON
K1V 1C1
(613) 248-6939
From boris at codesynthesis.com Mon May 25 09:26:36 2009
From: boris at codesynthesis.com (Boris Kolpackov)
Date: Sun Oct 11 15:34:09 2009
Subject: [xsd-users] Removing elements from sequence
In-Reply-To: <474534909BE4064E853161350C47578E09C56BCC@ncrmail1.corp.navcan.ca>
References: <474534909BE4064E853161350C47578E09C56BCC@ncrmail1.corp.navcan.ca>
Message-ID:
Hi Patrick,
Paquette, Patrick writes:
> Maybe I'm just missing something obvious, but is there a way to remove
> an element from an XSD generated sequence without having the custom
> smart ptr pointer delete it, and without cloning it?
No, there is currently no support for detaching a sequence element
from the tree.
Boris
From PaquetP at navcanada.ca Tue May 26 08:07:44 2009
From: PaquetP at navcanada.ca (Paquette, Patrick)
Date: Sun Oct 11 15:34:09 2009
Subject: [xsd-users] Removing elements from sequence
Message-ID: <474534909BE4064E853161350C47578E0A8B6DEA@ncrmail1.corp.navcan.ca>
Not a big problem, I can work around it - just wanted to be sure, thanks
Boris!
Patrick
> -----Original Message-----
> From: Boris Kolpackov [mailto:boris@codesynthesis.com]
> Sent: May 25, 2009 09:27 AM
> To: Paquette, Patrick
> Cc: xsd-users@codesynthesis.com
> Subject: Re: [xsd-users] Removing elements from sequence
>
> Hi Patrick,
>
> Paquette, Patrick writes:
>
> > Maybe I'm just missing something obvious, but is there a
> way to remove
> > an element from an XSD generated sequence without having the custom
> > smart ptr pointer delete it, and without cloning it?
>
> No, there is currently no support for detaching a sequence element
> from the tree.
>
> Boris
>
>
From Daniel.Macumber at nrel.gov Tue May 26 11:04:49 2009
From: Daniel.Macumber at nrel.gov (Macumber, Daniel)
Date: Sun Oct 11 15:34:09 2009
Subject: [xsd-users] Linker error with double types when using wchar_t
Message-ID: <07186B30C3DFE948B0EE2862AC1999F70110062F@MAILBOX2.nrel.gov>
I am having trouble with double types when using xsd cxx-tree with --char-type wchar_t in xsd 3.2. Specifically, the linker seems to be looking for and missing methods returning special characters related to nan, infinity, etc that have to do with doubles. I have modified the hello.xsd and driver.cxx files as shown below to add an optional double element ("number") to the schema and support the wchar_t character type. I have seen related issues on this list before but none specifically mentioning the problem with double types.
Thanks a lot,
Dan
#################### Command line args ####################
xsd.exe cxx-tree --generate-serialization --generate-ostream --char-type wchar_t hello.xsd
#################### Changes to hello.xsd ####################
The hello_t type consists of a greeting phrase and a
collection of names to which this greeting applies.
The greeting element contains the greeting phrase
for this hello object.
The name elements contains names to be greeted.
The hello element is a root of the Hello XML vocabulary.
Every conforming document should start with this element.
#################### Changes to driver.cxx ####################
int main (int argc, char* argv[])
{
if (argc != 2)
{
cerr << "usage: " << argv[0] << " hello.xml" << endl;
return 1;
}
try
{
string greeting(argv[1]);
auto_ptr h (hello (wstring(greeting.begin(), greeting.end())));
for (hello_t::name_const_iterator i (h->name ().begin ());
i != h->name ().end ();
++i)
{
wcout << h->greeting () << ", " << *i << "!" << endl;
}
}
catch (const xml_schema::exception& e)
{
wcerr << e << endl;
return 1;
}
}
From boris at codesynthesis.com Tue May 26 12:09:09 2009
From: boris at codesynthesis.com (Boris Kolpackov)
Date: Sun Oct 11 15:34:09 2009
Subject: [xsd-users] Linker error with double types when using wchar_t
In-Reply-To: <07186B30C3DFE948B0EE2862AC1999F70110062F@MAILBOX2.nrel.gov>
References: <07186B30C3DFE948B0EE2862AC1999F70110062F@MAILBOX2.nrel.gov>
Message-ID:
Hi Daniel,
Macumber, Daniel writes:
> I am having trouble with double types when using xsd cxx-tree with
> --char-type wchar_t in xsd 3.2. Specifically, the linker seems to
> be looking for and missing methods returning special characters
> related to nan, infinity, etc that have to do with doubles.
This is a bug. Thanks for reporting it and for the test case. I have
prepared a fix:
http://codesynthesis.com/~boris/tmp/xsd-3.2.0-wchar_t-literals.zip
http://codesynthesis.com/~boris/tmp/xsd-3.2.0-wchar_t-literals.tar.gz
Simply replace the files in the stock xsd-3.2.0 distribution with the
versions in one of these archives.
Boris
From Daniel.Macumber at nrel.gov Tue May 26 13:06:42 2009
From: Daniel.Macumber at nrel.gov (Macumber, Daniel)
Date: Sun Oct 11 15:34:09 2009
Subject: [xsd-users] Linker error with double types when using wchar_t
In-Reply-To:
References: <07186B30C3DFE948B0EE2862AC1999F70110062F@MAILBOX2.nrel.gov>
Message-ID: <07186B30C3DFE948B0EE2862AC1999F70110063B@MAILBOX2.nrel.gov>
Great, thank you Boris your patch worked for me!
Thanks a lot,
Dan
-----Original Message-----
From: Boris Kolpackov [mailto:boris@codesynthesis.com]
Sent: Tuesday, May 26, 2009 10:09 AM
To: Macumber, Daniel
Cc: xsd-users@codesynthesis.com
Subject: Re: [xsd-users] Linker error with double types when using wchar_t
Hi Daniel,
Macumber, Daniel writes:
> I am having trouble with double types when using xsd cxx-tree with
> --char-type wchar_t in xsd 3.2. Specifically, the linker seems to
> be looking for and missing methods returning special characters
> related to nan, infinity, etc that have to do with doubles.
This is a bug. Thanks for reporting it and for the test case. I have
prepared a fix:
http://codesynthesis.com/~boris/tmp/xsd-3.2.0-wchar_t-literals.zip
http://codesynthesis.com/~boris/tmp/xsd-3.2.0-wchar_t-literals.tar.gz
Simply replace the files in the stock xsd-3.2.0 distribution with the
versions in one of these archives.
Boris
From yilu at 21cn.com Sat May 30 08:41:57 2009
From: yilu at 21cn.com (abc)
Date: Sun Oct 11 15:34:10 2009
Subject: [xsd-users] unable to build on Freebsd 6.4 - (CPU amd64)
Message-ID: <15913612.151451243687317657.JavaMail.root@webmail6>
Hi all:
when I download the source code, and extracted it into /tmp foler,
then goes into /tmp/xsd-3.2.0-2/xsd and issue command "make install",
however I only got:
"makefile", line 6: Could not find
Error expanding embedded variable.
the 6th line is:
include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make
I can not found bootstrap.make on my machine. What's wrong going here?
By the way, I've downloaded cd xsd-3.2.0-x86_64-linux-gnu, however,
the command line tool xsd can not run, error msg:
freebsd64# bin/xsd
ELF binary type "0" not known.
bin/xsd: Exec format error. Binary file not executable.
References
Visible links
Hidden links:
1. http://click.21cn.com/urlhitcounter3.php3?url=http://market.21cn.com/w/pay/gdtel/080707/kdtc.html!mail&key=MV8w&rd=1
From shybovycha at gmail.com Sun May 31 18:29:05 2009
From: shybovycha at gmail.com (Artem Shubovych)
Date: Sun Oct 11 15:34:10 2009
Subject: [xsd-users] Troubles while parsing XML documents with XSD
Message-ID:
Hi, there!
I have such a trouble: I'm using XSD in C++ and trying to parse COLLADA. My
code compiles without any errors and warnings, but when I try to run my
simple program (which just tells me, when it finds tag in XML document) I
got messages like "error: no declaration found for element ...". I copied
XSD to the same directory as my XML document. But how to tell COLLADA XML
document, which XSD to use? Here is the beginning part of my COLLADA
documents, which I try to parse:
alorino
Else doesn't matters. Please, tell me how to tell, which schema should
parser use. I tried many variants, like:
but nothing has changed.