Hi
I am a newbie to XSL therefore my question may not be very challenging to you guys but i would appreciate your help.
I have an XML file :
-----------------------------------------------------------
<?xml-stylesheet href="XSLforGilts.XSL" type="text/xsl"?>
<?xml version="1.0"?>
<GiltValuation>
<GiltInfo SecID="0221522" SecName="CONVERSION 9%" SecPrice="114.6088"/>
<GiltInfo SecID="0668594" SecName="STANDARD CHT.BK. 1999 6 3/4" SecPrice="100.6407"/>
<GiltInfo SecID="0676359" SecName="JTI(UK) FINANCE PLC 1999 6 5/8" SecPrice="101.2412"/>
<GiltInfo SecID="0786742" SecName="SCOTTISH MORTGAGE IT DEB G/R" SecPrice="168.5772"/>
<GiltInfo SecID="0836540" SecName="INTEG.ACCM.SVS. 2000 6.48%" SecPrice="104.3163"/>
<GiltInfo SecID="0892188" SecName="TREASURY STOCK 8%" SecPrice="117.2444"/>
<GiltInfo SecID="0893114" SecName="TREASURY STOCK 8 3/4" SecPrice="130.7322"/>
<GiltInfo SecID="0999799" SecName="TREASURY STOCK 8%" SecPrice="131.6309"/>
<GiltInfo SecID="123914" SecName="LIFFE-LONG GILT MAR 2008 (GBP" SecPrice="108.98"/>
<GiltInfo SecID="3088069" SecName="TREASURY STOCK 5%" SecPrice="103.5824"/>
</GiltValuation>
-------------------------------------------------------
and corresponding XSL (XSLforGilts.XSL)
which is used to extract securities where price is >100
--------------------------------------------------------
<?xml version="1.0" ?>
- <xsl:stylesheet version="1.0" xmlns:xsl="- <xsl:template match="GiltInfo[@SecPrice>110]">
- <p>
- <b>
<xsl:value-of select="@SecName" />
</b>
<xsl:value-of select="@SecPrice" />
</p>
</xsl:template>
</xsl:stylesheet>
-----------------------------------------------------
XSL does the trick for me - when i open my XML with internet explorer browser it shows me the names and prices of all securities matching criterion price>100.
However my true aim is to be able to import that extracted XML into excel.
I know that i will probably need to change the namespace declaration in XSL but at the moment i can't get the syntax right. Could anyone help me here by droping me a working line of code to replace this :
<xsl:stylesheet version="1.0" xmlns:xsl="
Thanks in advance
I am a newbie to XSL therefore my question may not be very challenging to you guys but i would appreciate your help.
I have an XML file :
-----------------------------------------------------------
<?xml-stylesheet href="XSLforGilts.XSL" type="text/xsl"?>
<?xml version="1.0"?>
<GiltValuation>
<GiltInfo SecID="0221522" SecName="CONVERSION 9%" SecPrice="114.6088"/>
<GiltInfo SecID="0668594" SecName="STANDARD CHT.BK. 1999 6 3/4" SecPrice="100.6407"/>
<GiltInfo SecID="0676359" SecName="JTI(UK) FINANCE PLC 1999 6 5/8" SecPrice="101.2412"/>
<GiltInfo SecID="0786742" SecName="SCOTTISH MORTGAGE IT DEB G/R" SecPrice="168.5772"/>
<GiltInfo SecID="0836540" SecName="INTEG.ACCM.SVS. 2000 6.48%" SecPrice="104.3163"/>
<GiltInfo SecID="0892188" SecName="TREASURY STOCK 8%" SecPrice="117.2444"/>
<GiltInfo SecID="0893114" SecName="TREASURY STOCK 8 3/4" SecPrice="130.7322"/>
<GiltInfo SecID="0999799" SecName="TREASURY STOCK 8%" SecPrice="131.6309"/>
<GiltInfo SecID="123914" SecName="LIFFE-LONG GILT MAR 2008 (GBP" SecPrice="108.98"/>
<GiltInfo SecID="3088069" SecName="TREASURY STOCK 5%" SecPrice="103.5824"/>
</GiltValuation>
-------------------------------------------------------
and corresponding XSL (XSLforGilts.XSL)
which is used to extract securities where price is >100
--------------------------------------------------------
<?xml version="1.0" ?>
- <xsl:stylesheet version="1.0" xmlns:xsl="- <xsl:template match="GiltInfo[@SecPrice>110]">
- <p>
- <b>
<xsl:value-of select="@SecName" />
</b>
<xsl:value-of select="@SecPrice" />
</p>
</xsl:template>
</xsl:stylesheet>
-----------------------------------------------------
XSL does the trick for me - when i open my XML with internet explorer browser it shows me the names and prices of all securities matching criterion price>100.
However my true aim is to be able to import that extracted XML into excel.
I know that i will probably need to change the namespace declaration in XSL but at the moment i can't get the syntax right. Could anyone help me here by droping me a working line of code to replace this :
<xsl:stylesheet version="1.0" xmlns:xsl="
Thanks in advance