> John,
>
> My original idea was to just implement update queries as
> calls to Statement.executeUpdate(String sql), adding an
> sql:update() extension function to the XSLT.

I looked into this and it seemed to produce very tough to
maintain XSL code. Are you building one master string
from several XSLT functions ??


> The problem is doing it without breaking the existing API.

Since the extension API is interpretive, adding a new function
would not break the existing API. I have added several functions
to the SQL extensions while maintaining complete backward
compatibility except where bug fixes were addressed.


>
> A subtlety of doing updates are error handling, and also transaction
> control (commit and roll back.) Perhaps we would want to add
> transaction control functions to the extension as well.
>

Also primary key generation, delete's before updates, the logic to
determine insert or update.... Also there may be a problem because
XSLT may fire templates in any order it sees fit, so you may end up
trying to add child records prior to adding the parent.

>
> I take it XMLDB is an unpublished project right now? Where could
> I read about it?
>

Yes you are correct. My question now is where to host it. I don't have the
time to set a nice environment like Apache. We could submit it to Apache
but it would have to be repackaged. I need to discuss with the rest of the
group when to make this pubicly available although I think it could be any
time now, just need something to do it for.

Note to Apache Group: What does it take to submit a new package to
Apache ???

> If we can come up with a overall gameplan to the level of a rough API
> I'd be happy to go about coding a sample implementation.
>

Do you already have a copy of Xalan with the executeUpdate function
written ?? It should be fairly easy with the 2.1.0 code. I would be interested
in seeing the XSL code to do a multi table insert / update.

>
> Right now I'm building my servlet request parameters into a DOM,
> in a servlet filter.

Interesting, I am also working on a Xalan extension that will make the
Servlet environment available as a pseudo DOM inside the Transformation.
Much like the SQL extension works. I also plan to bring out functions
such as URL Rewriting so the transformation can participate in the
Session when rewriting is required.

Regards
John G


>
>
> John Gentilin wrote:
> >
> > Alan,
> >
> > We currently use Xalan for Queries and our own XMLDB Package
> > to convert an XML Stream into a series of SQL operations. Currently
> > I am working on the port from DOM mode to DTM mode. If you wanted
> > to throw around some ideas, I am will to discuss them.
> >
> > Another idea we have been kicking around is submitting our XMLDB module> as an 
>Open Source Project. Our biggest stopping point is how much bandwidth
> > will it require to support the process.
> >
> > What I have now is a UML Model of the extension code (using MagicDraw) and
> > I plan to start the coding process this weekend. Do you have any ideas on the XSL
> > code that will be used to produce the Database Updates ?? I was looking into just
> > adding our XMLDB as a extension of the redirect function but the end result was
> > getting ugly.
> >
> > Regards
> > John Gentilin
> >
> > Alan Canon wrote:
> >
> > > I'm interested in doing DML from my XSLT, in order to implement all
> > > of my business logic in XSLT (I can do everything but that.)
> > >
> > > Is support for update/insert/delete queries planned for the Xalan
> > > SQL extension? I know that this could create side effects within
> > > the database (that's the whole point), but so select
> > > queries can do this too if a user-defined function is called
> > > using the query. So adding DML capability seems like it's not
> > > entirely beyond the pale.
> > >
> > > Need a volunteer?
> >
> > --
> >
> > --------------------------------------
> > John Gentilin
> > SMART911
> > 18314 Carlwyn Drive
> > Castro Valley CA 94546
> >
> >     Contact Info
> > [EMAIL PROTECTED]
> > Phone 1-510-881-4821
> > --------------------------------------

--

--------------------------------------
John Gentilin
SMART911
18314 Carlwyn Drive
Castro Valley CA 94546

    Contact Info
[EMAIL PROTECTED]
Phone 1-510-881-4821
--------------------------------------

begin:vcard 
n:Gentilin;John
tel;fax:510-727-0931
tel;work:510-881-4821
x-mozilla-html:FALSE
url:www.smart911.com
org:SMART911;Development
adr:;;18314 Carlwyn Drive;Castro Valley;CA;94546;USA
version:2.1
email;internet:[EMAIL PROTECTED]
title:CTO
fn:John Gentilin
end:vcard

Reply via email to