This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: appropriate use of xsl?
- From: "James Fuller" <james dot fuller at o-idev dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Thu, 22 Aug 2002 20:10:06 +0100
- Subject: RE: [xsl] appropriate use of xsl?
- Reply-to: xsl-list at lists dot mulberrytech dot com
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of
> rhodespc@telerama.com
> Sent: 22 August 2002 19:42
> To: xsl-list@lists.mulberrytech.com
> Subject: [xsl] appropriate use of xsl?
>
>
> Hi all,
>
> I am struggling with how to solve this problem. I am wondering if I am
> using xsl as my one and only hammer.
>
> I have n number of tables, that are all very similar, but in some way
> different. Column names may mismatch. The date in one table me be in
> mm/dd/yyyy, while another may be in yyyy/mm/dd.
ok, but i get worried when you talk about data from the display point of
view...continue
> I need to display the union of these tables in a homogenous way. That is
> if I have a column called "order date", i need to display
> table1.order_date and table2.orderdate, and in a consistent date format.
so you want to merge data sets.....
http://www.exslt.org/set/index.html
or take a look at some of the techniques at http://www.topxml.com
> One idea I had was to define one standard dtd that would be the format I
> would pass to my application. I would create an xml file for each
> different format, and to define how each attribute would map to the
> standard defined in a dtd. I would use xsl to do the transformation to
> the standard format, and to do the data conversion...
>
> Summary:
> 1) convert the jdbc resultset to an xml file
why not use the cool castor tool which helps you marshall data to and fro
JDBC
nice article here
http://www.xml.com/pub/a/2002/07/24/databinding.html
> 2) create dtd for the common xml file format
> 3) create a xsl file for each of the distinct formats that I encounter to
> transform them to the common format
well, I am slightly confused at what u are doing, but will attempt;
- why not merge your data in the 'ahem' data layer using SQL ?
- yes creating a DTD or XML schema is always recc., but do this at the end,
when you know your format, you are not required to do this during
development !
- think of how you want to organise your *data* not your tables......first,
then create an xslt file with a load of sub templates that will handle every
unique situation...u could have different xslt files...but not necc
if u include a sample of your xml and desired output will attempt to help
further
gl, jim fuller
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list