[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
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)
_________________________________________________________________
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
RE: [xsl] SQL SELECT statement in XSLT!!!!!!!!!!!!
Subject: RE: [xsl] SQL SELECT statement in XSLT!!!!!!!!!!!! From: "michel geadah" <m_ace_g@xxxxxxxxxxx> Date: Fri, 08 Aug 2003 07:22:23 +0000 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] SQL SELECT statement in X, Jeff Beadle | Thread | RE: [xsl] SQL SELECT statement in X, Michael Kay |
Re: [xsl] Creating Multiple Variabl, allan . mccluskey | Date | RE: [xsl] how to process a element , David . Pawson |
Month |
Keywords