XSLT nested output

Attila <[email protected]> Mon, 20 Aug 2007 16:43:23 -0400
Newsgroups gmane.text.xml.xslt.extensions
Message-ID <[email protected]>
Hi,
I'm trying to generated nested C++ code with XSLT.

I have a structure in the XML like so:

<parmDefinition>
 <string>
 <int>
 <int>
  <expression type="AND">
    <int>
    <string>
    <expression type="OR">
       <float>
       <int>
    </expression>
  </expression>
</parmDefinition>

I want it to generated (pretty) c++ like so:

CSequenceType = new Sequence(
                                                       new String(),
                                                       new Int(),
                                                       new Int(),
                                                       new ANDSequence(

new Int(),

        new String(),

new ORSequence(

new Float(),

new Int()

)

)
                                                        );

Unfortunately I get it all un-nested and jumbled like so:

CSequenceType = new Sequence(
new String(),
new Int(),
new Int(),
new ANDSequence(
new Int(),
new String(),
new ORSequence(
new Float(),
new Int()
)
)
);


How can I traverse the above <parmDefinition> and also put in white-space
nesting?

Thanks for the help

_______________________________________________
exslt mailing list
[email protected]
http://www.exslt.org/list