Relational Tables and structured documents

MW info at
Mon Mar 23 08:42:37 GMT 1998


I was pondering about related problems the other day.
What I came up with - in the absence of any other solution
out there - was some kind of stylesheet language for mapping relational
data to XML/HTML.

It takes database information (e.g. ODBC DSN, table names)
as input and then defines the output in terms of group/detail elements.
A very rough example could be (XVSL: XML View Styleshett Language;
"View" stands for views on relational data):

<xvsl connection="DSN=mydsn;USER=myuser;PWD=xxxx" sql="select * from addr
inner join project on addr.ID=project.addrID">
  <group field="">
    <ADDR ID="=fields('ID')">
      <NAME><field name="" /></NAME>
        <NUMBER><field name="project.number" /></NUMBER>
        <TOTAL><field name="" /></TOTAL>
      <PROJECTSUM><aggregate field="" function="sum"

Lower case tags are supposed to be XVSL tags, upper case ones define the
output. The following could be an example of output genereated by the
XVSL stylesheet:

  <ADDR ID="1">
    <NAME>Ralf Westphal</NAME>
  <ADDR ID="45">
    <NAME>John Doe</NAME>

(Maybe this way of converting "simple" relations to
XML is overkill, but it can be defined outside any
database, does not necessarily require any coding
in some programming language and uses a well known
paradigm (group-detail).)

If you (or anyone) should find this way of expressing relation
to XML mappings of interest, let´s get together on it.

Ralf Westphal
Mey & Westphal RIPOSTE Software

>At 10:55 AM 3/20/98, Peter Murray-Rust wrote:
>>At 22:37 21/03/98 -0500, Jonathan Robie wrote:
>>[... PeterMR...]
>>>This is rather analogous to the object-to-relational mapping problem. If
>>>you define schemas in XML and define a mapping onto the relational
>>>database, there is a solution. Or you can have someone define how the
>>>should be made to create the XML elements. There is not, of course, a
>>Thanks. This is indeed the solution I have been pursuing. My intention is
>>to control the joins through a set of declarations (in XML :-) - this
>>that they can be reconfigured by different people/clients. I wondered if
>>there was already a standard 'language' for this or whether I just hack my
>>own and hope.
>This is something I've been thinking about, but my thoughts are currently a
>bunch of notes on pieces of scrap paper. I would love to discuss this with
>anybody who is interested. I think that this is an extremely promising
>area; ideally, I would like to see a solution more general than just
>relational databases, but not as complicated as RDF.
>jonathan at
>Texcel Research
>xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
>Archived as:
>To (un)subscribe, mailto:majordomo at the following message;
>(un)subscribe xml-dev
>To subscribe to the digests, mailto:majordomo at the following
>subscribe xml-dev-digest
>List coordinator, Henry Rzepa (mailto:rzepa at

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as:
To (un)subscribe, mailto:majordomo at the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list