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

RE: SQL SELECT statement in XSLT!!!!!!!!!!!!

Subject: RE: SQL SELECT statement in XSLT!!!!!!!!!!!!
From: "michel geadah" <m_ace_g@xxxxxxxxxxx>
Date: Fri, 08 Aug 2003 07:22:23 +0000
sql select utf
hi,
This is the source xml file:

<?xml version="1.0" encoding="utf-8" ?>
<BBSD_CUST_ACCOUNTS>
<mappings Record="1">
 <BRCH_CODE>1</BRCH_CODE>
 <CACC_NUM>TTTT/CACC_NUM>
 <CIRT_CODE>016</CIRT_CODE>
 <CURR_CODE>117</CURR_CODE>
 <CUST_ID>0001</CUST_ID>
 <ECOS_CODE>876</ECOS_CODE>
 <CACC_B_NAME>zzzzzz</CACC_B_NAME>
 <CACC_AVAIL_BAL>1548000</CACC_AVAIL_BAL>
 </mappings>
 <mappings>
 etc...
 </mappings>
 </BBSD_CUST_ACCOUNTS>

This is the relevant XSLT:

<?xml version='1.0' encoding='utf-8' ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml"/>
<xsl:template match="/">
<xsl:element name="WACCOUNTS">
<xsl:for-each select="//BBSD_CUST_ACCOUNTS/mappings">
<xsl:element name='{name()}'>
<CURR_ISO>
<xsl:value-of select="document('BBSC_CURRENCIES.xml')/BBSC_CURRENCIES
/mappings/CURR_ISO"/>
</CURR_ISO>
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:template>
</xsl:stylesheet>



I am going to put the select statement here:
select CURR_ISO from BBSC_CURRENCIES where CURR_CODE(in BBSD_CUST_ACCOUNTS)=CURR_CODE(in BBSC_CURRENCIES)


The output should be like this:
<?xml version="1.0" encoding="utf-8" ?>
<WACCOUNTS>
<mappings>
 <CUR_ISO>(VALUE FROM 'THE SELECT' STATEMENT ABOVE)</CUR_ISO>
 </mappings>
<mappings>
etc..
</mappings>
</WACCOUNTS>

Thanks a lot...
Michel

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail



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.