[xsd-users] Attempting to access attribute xml:base.

Jeroen N. Witmond [Bahco] jnw at xs4all.nl
Sat Sep 8 10:22:08 EDT 2007


Hi Boris,

Boris Kolpackov <boris at codesynthesis.com> writes:
> Hi Jeroen,
>
> Jeroen N. Witmond [Bahco] <jnw at xs4all.nl> writes:
>
>> > I took a look and it appears there are some constructs in both 2.3.1
>> > and 3.0.0 that prevent anyType from being customized. I am going to
>> > try and fix this for the next release. I can also build you a pre-
>> > release binary if you would like to give it a try before the release.
>>
>> I would like that, but there is no big hurry. :)
>
> Ok, I've fixed the problem and also added the 'comments' example in
> examples/cxx/tree/custom/ which customizes the anyType in order to
> preserve/manipulate XML comments.
>
> I've built a pre-release GNU/Linux binary (hopefully that's what you
> are using) for you to test:
>
> http://www.codesynthesis.com/~boris/tmp/xsd-3.1.0.a1-i686-linux-gnu.tar.bz2
>
> Let me know if you encounter any problems.

I'm using GNU/Linux, as you guessed, and the newly added 'comments'
example works out of the box, as expected. :)

Unfortunately, I still get compiler errors on the generated code with this
pre-release; see the attached file. Please let me know if you need more
information to solve this problem.

Jeroen.
-------------- next part --------------
cd /home/bahco/Repository/bugreports/codesynthesis/xml-base/custom-intended/
make clean&&make lax.o
rm XmlSchema.xsd *.?xx *.o driver
rm: cannot remove `driver': No such file or directory
make: [clean] Error 1 (ignored)
echo "Dummy file which serves as timestap for make. It was generated on `date`." > XmlSchema.xsd
/home/bahco/Sandbox/xsd-3.1.0.a1-i686-linux-gnu/bin/xsd cxx-tree --char-type wchar_t --generate-ostream \
		--extern-xml-schema XmlSchema.xsd \
		../DOM_association/lax.xsd
/home/bahco/Sandbox/xsd-3.1.0.a1-i686-linux-gnu/bin/xsd cxx-tree \
		--char-type wchar_t \
		--custom-type long=int64_t --custom-type unsignedLong=uint64_t --custom-type integer=int64_t \
		--generate-xml-schema \
		--custom-type anyType=XmlNamespace/anyType_base \
		--hxx-prologue '#include "XmlNamespace-fwd.hpp"'\
		--hxx-epilogue '#include "XmlNamespace.hpp"'\
		XmlSchema.xsd
g++ -g -Wall -W -I/home/bahco/Sandbox/xsd-3.1.0.a1-i686-linux-gnu/libxsd  -c -o lax.o lax.cxx
lax.cxx: In copy constructor ‘metadox::foo_type::foo_type(const metadox::foo_type&, xml_schema::flags, xml_schema::container*)’:
lax.cxx:128: error: invalid conversion from ‘xml_schema::container*’ to ‘xml_schema::type*’
lax.cxx:128: error:   initializing argument 3 of ‘xml_schema::XmlNamespace::XmlNamespace(const xml_schema::XmlNamespace&, xml_schema::flags, xml_schema::type*)’
lax.cxx: In constructor ‘metadox::foo_type::foo_type(const xercesc_2_7::DOMElement&, xml_schema::flags, xml_schema::container*)’:
lax.cxx:137: error: invalid conversion from ‘xml_schema::container*’ to ‘xml_schema::type*’
lax.cxx:137: error:   initializing argument 3 of ‘xml_schema::XmlNamespace::XmlNamespace(const xercesc_2_7::DOMElement&, xml_schema::flags, xml_schema::type*)’
/home/bahco/Sandbox/xsd-3.1.0.a1-i686-linux-gnu/libxsd/xsd/cxx/tree/elements.txx: In copy constructor ‘xsd::cxx::tree::simple_type<B>::simple_type(const xsd::cxx::tree::simple_type<B>&, xsd::cxx::tree::flags, xsd::cxx::tree::type*) [with B = xml_schema::XmlNamespace]’:
/home/bahco/Sandbox/xsd-3.1.0.a1-i686-linux-gnu/libxsd/xsd/cxx/tree/types.hxx:79:   instantiated from ‘xsd::cxx::tree::string<C, B>::string(const xsd::cxx::tree::string<C, B>&, xsd::cxx::tree::flags, xsd::cxx::tree::type*) [with C = wchar_t, B = xsd::cxx::tree::simple_type<xml_schema::XmlNamespace>]’
lax.cxx:86:   instantiated from here
/home/bahco/Sandbox/xsd-3.1.0.a1-i686-linux-gnu/libxsd/xsd/cxx/tree/elements.txx:36: error: invalid conversion from ‘xsd::cxx::tree::type*’ to ‘xml_schema::type*’
/home/bahco/Sandbox/xsd-3.1.0.a1-i686-linux-gnu/libxsd/xsd/cxx/tree/elements.txx:36: error:   initializing argument 3 of ‘xml_schema::XmlNamespace::XmlNamespace(const xml_schema::XmlNamespace&, xml_schema::flags, xml_schema::type*)’
/home/bahco/Sandbox/xsd-3.1.0.a1-i686-linux-gnu/libxsd/xsd/cxx/tree/parsing.txx: In constructor ‘xsd::cxx::tree::simple_type<B>::simple_type(const xercesc_2_7::DOMElement&, xsd::cxx::tree::flags, xsd::cxx::tree::type*) [with B = xml_schema::XmlNamespace]’:
/home/bahco/Sandbox/xsd-3.1.0.a1-i686-linux-gnu/libxsd/xsd/cxx/tree/parsing.txx:329:   instantiated from ‘xsd::cxx::tree::string<C, B>::string(const xercesc_2_7::DOMElement&, xsd::cxx::tree::flags, xsd::cxx::tree::type*) [with C = wchar_t, B = xsd::cxx::tree::simple_type<xml_schema::XmlNamespace>]’
lax.cxx:102:   instantiated from here
/home/bahco/Sandbox/xsd-3.1.0.a1-i686-linux-gnu/libxsd/xsd/cxx/tree/parsing.txx:75: error: invalid conversion from ‘xsd::cxx::tree::type*’ to ‘xml_schema::type*’
/home/bahco/Sandbox/xsd-3.1.0.a1-i686-linux-gnu/libxsd/xsd/cxx/tree/parsing.txx:75: error:   initializing argument 3 of ‘xml_schema::XmlNamespace::XmlNamespace(const xercesc_2_7::DOMElement&, xml_schema::flags, xml_schema::type*)’
make: *** [lax.o] Error 1

Compilation exited abnormally with code 2 at Sat Sep  8 16:07:20


More information about the xsd-users mailing list