RE: [xsl] Importing from database

Subject: RE: [xsl] Importing from database
From: "Roger L. Cauvin" <roger@xxxxxxxxxx>
Date: Fri, 29 Jun 2001 22:37:20 +0200
> I have some data in an MS SQL Server database that I'd like to
> publish on paper using XSL, so I wonder if there are any good
> rules for how to achieve this. I know about the export XML
> functionality in SQL Server, but I figured that maybe this step
>  isn't necessary. As the data is filtered through XSLT later,
> maybe there's a way to do the connection between the
> database and XSLT directly, perhaps with extensions?

You can use XVRL (eXtensible Value Resolution Language) enables you to refer
to values in external data sources and pull the data into your XML document.

For your case, as long as you have a JDBC driver for the MS SQL Server
database, you would just:

1.  Include xvrl:value elements in your XML document to refer to SQL result
sets in the database.

2.  Run JResolver (or another XVRL parser) on the XML document to extract
the data and produce an XML document with the resolved output.

3.  You can optionally specify a stylesheet for JResolver to apply after it
resolves the external data.

The Java XVRL parsers available at include a built-in
relational database resolver that extracts values from relational database
(based on an SQL query), a web page resolver for "scraping" data from web
pages, and a time resolver for inserting the current time or date in your
XML documents.


Roger L. Cauvin

 XSL-List info and archive:

Current Thread