Subject: RE: [xsl] triggers in XML From: Curtis Fisher <cdfisher@xxxxxxxxxx> Date: Sun, 20 Oct 2002 15:57:55 -0500 |
Okay, since some people consider this an irrelevant question for this forum, I will answer with what I know. Maybe the reason folks aren't answering is because the questions are not as clear as they could be. First Question: Triggers in a database are used to perform some action upon an insert, update or delete on a column in a row of the database. Typically, they cannot be rolled back (or undone) once the trigger has been performed unless you program a ton of stuff to check integrity first, before executing the trigger. It gets hairy in a hurry! Triggers can be very helpful to the application programmer, but are frowned upon by DBA's because some actions can be performed outside of the scope of the original transaction. Second Question: Yes there is a way to approximate "Trigger Like" behavior when updating XML files (at least this is what I believe you are asking). You could use an Event Parser like SAX which performs a "callback" to a function when it locates the Node of interest (whose name was previously registered after the parser was instantiated). Your function would likely perform some type of modification or calculation on the Node, at which time you could call another function that could update another node with another parser and so on and so forth... You would then have emulated the approximate behavior and problems associated with database triggers found in a DBMS, in XML. Why would you want to do this? If I have misunderstood your intent, please forgive me. Using a SAX parser is only one way to go about this, and the parser would have to be part of the architecture and usable with whatever language (PHP, Java, ECMA262) was selected. Our architectures for our products use a database for content storage and management, then publish XML to files which the web server and associated PHP engine transform to HTML using the Sablotron XSLT processor. That way we get all the database goodies and the benefits of XSLT output. If you need any other information feel free to contact me at cdfisher@xxxxxxxxxx Cheers, Curtis Fisher President Professional Content LLC 5421 Sterling Ave Kansas City, MO 64133 Bus: 816.353.4501 Cell: 816.914.8793 http://www.procontent.net -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of karan bhasin Sent: Sunday, October 20, 2002 2:20 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] triggers in XML I am working on a project to ensure the database integrity constraints on XML files. I would like to know the answer to following questions 1) why triggers are an issue in the traditional database systems and considered to circumvent the database integrity. 2) is there a poosible way to implement triggers for XML files If anyone has any answers or suggestions for this, please do reply back. Thanks Jaskaran ____________________________________________________________ Get 25MB of email storage with Lycos Mail Plus! Sign up today -- http://www.mail.lycos.com/brandPage.shtml?pageId=plus XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] triggers in XML, Antonio Gallardo Riv | Thread | RE: [xsl] triggers in XML, KIENLE, STEVEN C [IT |
Re: [xsl] triggers in XML, Antonio Gallardo Riv | Date | Re: [xsl] Access to unparsed entiti, Gregory Murphy |
Month |