[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Having Trouble With Condition For Default Nodeset
At 2006-07-05 10:49 +1000, Duncan Anker wrote:
On the use of "//", the $currency-data comes from a select="document(..)" and so seems to be required or I get no result set - although I can probably fold the currency-data and codes into a single select. Better pass me that mallet again. :)
Note my emphasis. I'm not saying it is evil ... sometimes you really do need to search each and every descendent ... but often you do not. Many new users of XSLT liberally use "//" thinking that it will somehow stop at the items they are looking for, not realizing that it goes below anything it finds looking all the way to every leave of every subtree looking for more of what is being looked for. Perhaps you need something like "document(..)/*/codes". For example, in UBL we are using code lists expressed in genericode[1] and something like "document(..)/*/SimpleCodeList/Row[Value/SimpleValue=$code]" would be more efficient and less wasteful than "document(..)//Row[Value/SimpleValue=$code]". I hope this helps. . . . . . . . Ken -- Registration open for UBL training: Montrial, Canada 2006-08-07 Also for XSL-FO/XSLT training: Minneapolis, MN 2006-07-31/08-04 Also for UBL/XML/XSLT/XSL-FO training: Varo,Denmark 06-09-25/10-06 World-wide corporate, govt. & user group UBL, XSL, & XML training. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|
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
|