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

Jeroen N. Witmond jnw at xs4all.nl
Thu Dec 21 16:19:33 EST 2006


First of all, thanks for a great product. It really makes accessing
XML from C++ much easier.

Unfortunately, I'm having problems finding out how to access
attributes with the xml prefix, specifically xml:base, from my
application code.  Nowhere in the documentation or the generated code
can I find a way to do so.

I tried using

  xsd cxx-tree --generate-xml-schema XmlSchema.xsd
  xsd cxx-tree --extern-xml-schema   XmlSchema.xsd [other options] \
toaccess.xsd

But this only resulted in the typedefs in namespace xml_schema being
declared in file XmlSchema.hxx instead of in toaccess.hxx.

On a related note: I came across an xsd file containing

  <xs:import namespace="http://www.w3.org/XML/1998/namespace"/>

Processing this xsd file results in an error about a missing
schemaLocation attribute.  Specifying one (for instance
http://www.w3.org/2001/XMLSchema.xsd as Google found) does not work.
And I don't think downloading the schema for schemas (and all files it
references) to a local disk and turning xsd loose on the result is a
viable option. :-)

Have I missed something? Or is this a known restriction?

I have installed
http://www.codesynthesis.com/download/xsd/2.3/linux-gnu/i686/xsd_2.3.0-1_i386.deb
on 2006-12-12.

Kind regards,

Jeroen.





More information about the xsd-users mailing list