[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to gain efficience using Muenchian method sort
Hi Sun-fu, > So My question is this : will the following two step approach gain > some efficiency what are the possible disadvantages included? I think you'll probably gain efficiency and simplicity from using a two-step approach, but with any efficiency question, the answer has to be "try it and see" - so much depends on your data, processor and so on that it's impossible to give absolute answers. > 2.3 When using key function to get the related data of each piece of > unique data, the original document to derive unique data has to be > recalled. Rather than doing that, when you create the intermediate node set, include within it all the information that you need to get, in a way that makes it easy to get. In other words, make the first transformation give you all the information that you need in a way that makes the second transformation easy to achieve. > Why do use <for-each select="/"> and define $thisPP for recalling > process? I have puzzled quite a while , even I keep on get desired > solutions. When you use xsl:for-each to select a single node, you're just doing it to change the current node. When you're using keys, you need to do that because the key() function only searches for keyed nodes within the document that the current node is in. You need to do the same kind of thing for the id() and unparsed-entity-uri() functions, but these are hardly used so people don't tend to come up against it. I hope that helps, Jeni --- Jeni Tennison http://www.jenitennison.com/ 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
|