xml - XSLT for-each select syntax -


i've inherited gross xslt project - can't figure out how line of code reads

<xsl:for-each select="*[local-name()='customerorderline'][count(. | key('orderline-by-shipaddress', *[local-name()='customerorderpostaladdresses']/*[local-name()='customerorderpostaladdress']/*[local-name()='postaladdress']/*[local-name()='line3'])[1]) = 1]"> 

i understand for-each selecting 'customerorderline' nodes based off 'orderline-by-shipaddress' key , kind of union between , current node.

i'm looking understand how code "reads" can better understand how it's working , i'll need change in order re-use technique.

read muenchian grouping here: http://www.jenitennison.com/xslt/grouping/muenchian.xml. used xsl:key group , identify first item in each group. for-each processes first customerorderline in each group grouping based on value of line3 descendant.


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -