[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: ordering and iteration problem
It was a pleasant suprise to see some of my code cited. Jeni Tennison writes: [...] > So I'd adapt the keys to include information about the parent > circuit-breaker-panel of the circuit-breaker, as follows: > > <xsl:key name="breakers-by-column" match="b:circuit-breaker" > use="concat(generate-id(parent::b:circuit-breaker-panel), > ':', @column)" /> > <xsl:key name="breakers" match="b:circuit-breaker" > use="concat(generate-id(parent::b:circuit-breaker-panel), > @row, ':', @column)" /> > > If a circuit-breaker-panel was given an ID of 'abc' then you could get > the circuit breaker in the first cell in the first row with: > > key('breakers', 'abc:1:1') I take it that the generate-id() is needed because there is no other way to test for node identity? Rather than using concat() to generate a compound key, would it also work to use the same key as before but then select from the resulting node-set only the circuit-breaker with the right parent? XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|