Leon Messerschmidt wrote:
>
> > >I looked at it, but I needed something that could do some string
> > >manipulation. Table Names like my_table should become MyTable for java
> > >code.
> >
> > AFAIK XSL can do string manipulation just fine.
>
> I need to take out all the _ and make sure there is a capital letter where
> the _ used to be and then make sure everything else is lowercase. This is
> easier to do in java.
Using templates or XSL I would add javaname attribute anyway.
> > >The other reason is that I wanted to create java code that is easier to
> > edit
> > >and extend. It is more difficult to edit java code that is mingled in xsl
> > >that to edit a .java template.
> >
> > I think these stylesheets are not going to be edited frequently, so it
> > should not be that bad. I think using XSL to convert XML is the right way
> > because it a _standard_ way to do it. All you need to do is to come up
> with
> > the right stylesheet. You don't need to create some home-grown software,
> > simply use ready to use XML processor which is stable and has a standard
> to
> > conform to...
>
> I've yet to see the schema I generate without doing at least some minor
> changes to the templates. There is already talk of some new functionality
> that is needed to handle joins and so forth.
>
> It is also much easier to edit code that is template based that to reverse
> engineer something to create a stylesheet from.
You convinced me. Templates seem to be the right choice.
> > I will probably get round to trying this stuff.
> > My question here is whether you think that Torque is a good place to do
> the
> > work, or it is better to make Torque return it's results in strings and
> > create another tool which uses these results to do the work?
> > I also think that same applies to .java files as well. I do not like
> having
> > any generated files under source control. Does it make sense to generate
> the
> > java sources at the build time and feed them directly to compiler without
> > creating the files? I understand that you sometimes want to hand-edit the
> > sources, but I think it's due to Torque having bugs or lacking features,
> and
> > it's better to fix the problem where it starts. Once this is fixed
> > hand-editing will not be needed...
>
> I _always_ hand-edit my Peer code after it has been generated.
Can you tell in more detail what exactly you do it for? I believe this
should ultimately go away. No hand editing of generated files! That's
almost like hand editing .class ;-)
fedor.
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]