Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 5th, 2005, 01:30 PM
Authorized User
 
Join Date: Sep 2005
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default connecting to a msql database using xslt

is this possible?
how do u do a database connection on xslt

 
Old September 5th, 2005, 01:39 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

There's no standard way of accessing a SQL database from XSLT, but some processors offer extensions to do it. See for example

http://www.saxonica.com/documentatio...ion/intro.html

A more standard approach would be to use the facilities of the SQL databse to create an XML extract of the required data, and pipeline this as an input document into the XSLT transformation.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old September 6th, 2005, 10:51 AM
Authorized User
 
Join Date: Sep 2005
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

On this webpage there's a good example of connecting to a database

http://www.saxonica.com/documentatio...n/example.html

However i'm confused the way the drivers are managed
for example:

<xsl:param name="driver" select="'sun.jdbc.odbc.JdbcOdbcDriver'"/>
<xsl:param name="database" select="'jdbc:odbc:test'"/>

if i'm working with mysql, if i leave it the same, would that work? or the select inside the driver needs to changed?

also i was trying to follow the example but i didn't understand this part:

Register this database as a JDBC data source. (If you use Microsoft Access, register it as an ODBC data source called, say, Books, and then it will automatically be available under JDBC as "jdbc:odbc:Books".










Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting to Database bryantms ASP.NET 3.5 Basics 3 July 9th, 2008 12:34 AM
connecting to database stealthdevil Visual Basic 2005 Basics 2 November 5th, 2007 01:31 PM
Connecting to a database mfos Classic ASP Basics 0 December 20th, 2006 07:59 AM
Chapter14, checkout2.php-Msql error JECovill BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 May 30th, 2006 05:10 PM
database connecting princeofdhump Classic ASP Databases 3 August 7th, 2004 02:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.