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

RE: xml/xslt 'merge' query

Subject: RE: xml/xslt 'merge' query
From: "Andreas L. Delmelle" <a_l.delmelle@xxxxxxxxxx>
Date: Wed, 26 May 2004 23:24:38 +0200
xslt merge messages
> -----Original Message-----
> From: Laurie Knight [mailto:arcn70@xxxxxxxxxxxxx]
>

Hi,

<snip what="source + target XML description" />
> <xsl:template name="lmk" match="/stockdate/lmk_stocklist/lmk_stock">

IIC, the problem is in your expectation that because a match pattern is
supplied, the template rule will match these nodes for you. Unfortunately,
this is *not* the case. It certainly isn't illegal to specify both match
pattern and name, but the effect of having both there simply means that the
template rule can be invoked through an xsl:call-template (name) as well as
through an xsl:apply-templates (match).

IIC, then it should be sufficient to change the following:

<xsl:call-template name="lmk">
  <xsl:with-param name="sqlstockcode" select="stockcode" />
</xsl:call-template>

to

<xsl:apply-templates select="/stockdate/lmk_stocklist/lmk_stock">
  <xsl:with-param name="sqlstockcode" select="stockcode" />
</xsl:apply-templates>

(for getting it to work, that is --getting it to work optimally would be a
different story, but since you seem keen on learning rather than having
someone else take away all your fun, I'll leave you to that... :) )

Your initial code just 'called the template', and so, prints out the value
of the param alright, but has no context node for which the subsequent test
can become true...


HTH!

Greetz,

Andreas

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.