[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

read records from database in XSLT

Subject: read records from database in XSLT
From: Ming <myu@xxxxxxxx>
Date: Tue, 14 May 2002 17:00:13 -0600
xsl read from database
Hi,

I have a question regarding reading records from a database in XSLT.

I have the following xml file:

<files>
<file db="db1" name="/record/2233/21/1/12_mmish"  />
<file db="db2" name="/record/2233/21/2/34_ytrrm"  />
</files>

And the name attribute is a key in a mysql table. What I want is the
value of the key. So, I can use "select recordvalue from Record where
keyvalue = '/record/2233/21/1/12_mmish'" to get the record value from
the table.

The record value is actually in xml format like this:
<xml>
  <db1>
   <title> title1 </title>
  </db1/>
</xml>

What I need is to read the whole value in my stylesheet using something
like <xsl:variable name='record' select="document(@name)/xml"/>. But
since the name attribute is not the path to a xml file, I cannot use
this method.

Can anyone give me some suggestions on how to approach this or some
information I can know more about using queries in my stylesheet?

Thanks a lot.

Ming



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.