|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XSL Copy
Hi,
I have the following XML
<?xml version="1.0" ?>
<results>
<timeSeriesDetail>
<timeSeries>
<timeSeriesType>Equity</timeSeriesType>
<timeSeriesKey>DAX</timeSeriesKey>
</timeSeries>
<obs>
<date>19990817</date>
<level>5324.02</level>
<return>0</return>
</obs>
<timeSeriesDetail>
<timeSeriesDetail>
<timeSeries>
<timeSeriesType>Equity</timeSeriesType>
<timeSeriesKey>CAC40</timeSeriesKey>
</timeSeries>
<obs>
<date>19990817</date>
<level>124.02</level>
<return>2</return>
</obs>
<timeSeriesDetail>
<results>
I want to be able to get the timeSeriesDetail node for DAX. I am using the
following XSL
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:param name="tsType" select="Equity"/>
<xsl:param name="tsName" select="DAX"/>
<xsl:template match="//timeSeriesDetail/timeSeries[timeSeriesType=$tsType
and timeSeriesKey=$tsName]">
<xsl:copy>
<xsl:apply-templates select="*|@*|text()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
However, when I run this the tag names are stripped off from the output and
I only get the node contents. What am I doing wrong?
Thx,
Carlos Sanchez
RiskMetrics
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








