From: Sylvain, Gregory M (gsylvain_at_[hidden])
Date: 2005-07-15 13:46:12
For dependency purposes, and lack of time, I can just specify the class names that will be generated from the XSD Schema file as targets that will be generated from this source.
So, I need a rule for this correct ?
I'm thinkin' the rule would take as parameters a name (for reference elsewhere in the Jamfile as a dependency), the schema file to use as a source andthen the list of C++ class files that should be generated (targets).
The rule would generate a new 'virtual' target to force the execution of the XSD Schema compiler on the sources (an action). The rule should then addthe (resulting) targets to the list of derived dependencies of `this' dependency. (so that anything that is dependant on `this' target will now havethese additional dependencies to reconcile. Since these new dependencies are C++ files, Jam already knows how to reconcile them into C++ object files.
My problem still remains is how to write such a rule which runs the XSD Schema compiler and adds the resulting C++ files as new virtual targets ?
Any assistance would be appreciated. Thanks.
From: jamboost_at_[hidden] [mailto:jamboost_at_[hidden]]On
Behalf Of Vladimir Prus
Sent: Friday, July 15, 2005 9:34 AM
Subject: Re: [jamboost] Re: [Boost.build v2 (1.32.0)] Writing an
extension for LEIF (XSD to C++ Class Ge
On Wednesday 13 July 2005 15:38, greg_sylvain wrote:
> Thanks for the reply. Sorry for the mis-direct posting.
> LEIF's xsd2cpp tool generates a C++ class for each xsd:complexType
> in the XSD schema. Accordingly, you can get a lot of classes from a
> single schema file. All of the class files have a respective '.h'
> header file for a respective implentation file ('.cpp').
> In addition, the tool can take a configuration file that can re-map
> any complexType element names to the respective C++ class name you
> desire. For instance, all of our complexTypes are spelled out in
> lower case and underscores, while our C++ class names use Hungarian
> notation of mixed case class names. That it, the XSD complexType
> ruleset_directive is remaped to become the C++ class RulesetDirective.
This complicates matters quite a bit!
At the moment:
1. Boost.Build should know the list of sources to compile before running the
2. Boost.Build cannot extract anything from source files.
The best solution I have in mind is to build Boost.Jam with Python support,
and write Python code that will scan the .xml file and extract the names from
there. Would such a solution acceptable for you?
-- Vladimir Prus http://vladimir_prus.blogspot.com Boost.Build V2: http://boost.org/boost-build2 Yahoo! Groups Links
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk