[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
-Steve
Re: [xsl] Simple template matching problem
Subject: Re: [xsl] Simple template matching problem From: Steve <subsume@xxxxxxxxx> Date: Mon, 7 May 2007 17:57:06 -0400 |
You suspect correct. You match for "Records/Record", which translates as: "Any element 'Record' that has a parent of 'Records' ". However, you seem to think of it as "Any element 'Records' with one or more 'Record' elements as children".
What you need is: match="Records[Record]" (you need a predicate, not a child specification).
I suppose I thought that Record[DATA_TYPE='x'] would override Records/Record because it was more specific. Obviously my ideas about xsl's ability to pick templates border on prescient.
> <xsl:template match="Records/Record"> > <xsl:apply-templates select="$invTable[COLUMN_NAME='beginDate']"> > <xsl:with-param name="value" select="//beginDate" />
btw, why do you need this? First of all, it is not there in the source, secondly (assuming your sample source is different than your real source), if the data is there, you can get it from the matching templates as well (or the matching templates have different sources, but the same elements, in which case I recommend that you switch modes as well, to keep from accidental infinite recursion).
Not really sure what you mean here. Yes, this is a much abbreviated snippet from the actual xsl. Why do I need what, exactly?
-Steve
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Simple template matching , Abel Braaksma | Thread | Re: [xsl] Simple template matching , Abel Braaksma |
Re: [xsl] How to merge multiple XML, David Carlisle | Date | Re: [xsl] Simple template matching , Abel Braaksma |
Month |