[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] xml/xslt 'merge' query
Subject: RE: [xsl] xml/xslt 'merge' query From: "Laurie Knight" <arcn70@xxxxxxxxxxxxx> Date: Thu, 27 May 2004 17:45:14 +0100 |
Hi Andreas, Thats got the beastie of a problem, I knew it was something along those lines although I suspected my IF TEST rather than the template itself.. I've now got an intermediate xml format as required and I've managed to cut down on the lmk_stocks chunk to unique stocks, and I've got a second xslt template to format up the output html table! Many thanks for your pointer! Best regards! Laurie -- > -----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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] xml/xslt 'merge' query, Andreas L. Delmelle | Thread | [xsl] Reading two documents, Sindigi, Ganesh K |
Re: [xsl] NEED good information on , Steve Brown | Date | RE: [xsl] Performance Question: Exp, Andrew Welch |
Month |