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@xxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format