This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Importing from database


> 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 http://www.xvrl.org 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
roger@cauvin.org




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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]