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

RE: XSL Copy

Subject: RE: XSL Copy
From: "Carlos Sanchez" <carlos@xxxxxxxx>
Date: Tue, 11 Apr 2000 14:12:57 -0500
carlos sanchez riskmetrics
Thx David,

Carlos Sanchez
RiskMetrics


-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of David Carlisle
Sent: Tuesday, April 11, 2000 11:52 AM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Re: XSL Copy



> 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?

tags don't have names (elements do)

For the root node and almost all its descendents, you have not specified
any template, so you get the default template which just recurses on the
children and finally copies the character data to the result.

<xsl:template match="//timeSeriesDetail/timeSeries[timeSeriesType=$tsType
and timeSeriesKey=$tsName]">

using // is almost always inefficient, or just plain wrong, and never
makes sense in a match pattern.

What I think you want is

<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="/">
<xsl:copy-of select="results/timeSeriesDetail[
      timeSeries/timeSeriesType=$tsTyp
       and
      timeSeries/timeSeriesKey=$tsName]"/>
</xsl:template>

</xsl:stylesheet>

but its hard to be sure...

David


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


 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.