[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Templates Producing Similar Output

Subject: Templates Producing Similar Output
From: "Peter Eschenbrenner" <cen_sys@xxxxxxxxxxx>
Date: Tue, 1 Apr 2003 10:48:44 -0600
peter eschenbrenner
I am of the opinion that similar items should be built/managed using the
same templates.  I am building SQL statements and like the idea of
having the same template produce statements to pull data out and put it
back in.  I am not worried as much about performance as I am about
maintainablility.


SELECT    client.datecreated,
UPDATE    datecreated='$db_client_datecreated',
INSERT    (datecreated, ...) VALUES ( '$db_client_datecreated', ...)

SELECT    <tableName />.<fieldName />, ...
UPDATE    <fieldName />='$db_<tableName />_<fieldName />', ...
INSERT    (<fieldName />, ... ) VALUES ( '$db_<tableName />_<fieldName
/>', ...)
 

The first part of INSERT is the same as SELECT but without the
<tableName />. prefix.  The last part of INSERT is the same as UPDATE
but without the <fieldName />= prefix.  So as I see it there are two
options:


SELECT would have one template
UPDATE would have one template
INSERT would have two templates
-- OR --
SELECT and INSERT would share a template with a parameter
UPDATE and INSERT would share a template with a parameter


Question:
Should I build the templates to be shared?


Peter Eschenbrenner (XSL newbie)

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.