[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: "xstlApplyOneTemplate:key was not compiled" when
> <xsl:template name="GetData"> > <xsl:param name="counter"/> > <xsl:variable name="path" > select="/Template/Field/Listing/Group[@number=$counter]/pt"/> > <xsl:key name="myKey" > match="/Template/Field/Listing/Group[@number=$counter]/pt" use="@time"/> xsl:key is a top-level element so you can't put it inside a template. You can move it outside, remove the @number predicate from the match and then combine @number and @time in some way in the use attribute. For example <xsl:key name="myKey" match="/Template/Field/Listing/Group" use="concat(@number,'-',@time)"/> (BTW, you could use match="Group", unless you're expecting the source document to contain other Group elements that you don't want matched) Then, of course, you also have to modify your use of the key to combine $counter in the same way, eg ...generate-id(key('myKey',concat($counter,'-',@time))... best regards, John.
|
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
|