[Home] [By Thread] [By Date] [Recent Entries]
Hi Elizabeth,
Instead of your one key <xsl:key name="special-phone" match="phone[@type='special']" use ="@description | @paren | @description-place" /> try <xsl:key name="special-phone" match="phone[@type='special']"
use ="concat(@description,@paren,@description-place)" />That will set the key value to be unique for every combination of @description, @paren, @description-place. (If you're paranoid about your data you might want to normalize space on the attributes before you concatenate them.) [ <= note to Eudora users: "you're paranoid..." gets you two hot peppers, with an extra one for repeating it.] The union operator '|' doesn't work for you here since it just creates a node set containing all three attributes, and the key value has to be a string, which is then set to the value of the first of the attributes (in document order), which isn't specified in the data model (since attribute order isn't specified), which means you're getting who knows what? (But not what you want. :-) I hope that helps, Wendell
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



