[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Question about isolating records
At 2015-09-05 23:46 +0000, Mark Wilson pubs@xxxxxxxxxxxx wrote:
I am still missing something -- I have been building the key in File 1 with this code: You've transcribed my suggestion incorrectly. The use= attribute is relative to the match= node. I expressly used use="Shelfmark". The File2 tree is accessed when you use the third argument to the key() function. That, of course, gives me all the content of every <Items> as my pdf-number when I call Right ... because you didn't use the code I gave you. If I use: <xsl:key name="pdf-key" match="Item" use="doc('FILE2')/Shelfmark"/> I get nothing when I do the look-up. Also correct, because you must not access File2 when declaring the key. Am I supposed to build the key in File2, and if so, how do I then preserve it for use in File1. Declaring a key creates a key table for every input file. It is the third argument of the key() function that declares which file is looked up ... and if the third argument is absent the tree of the current node is used (which you don't want because that is File1). Sorry to be so dense, but I have never used keys before. Did you try the code that I gave you? I was expecting it to work without you making any changes. At 2015-09-05 23:54 +0000, you wrote: My last was not quite right: I am building the key in the stylesheet that processes File 1. The act of declaring a key will create a key table for every input file. PS. Lost your book when my last computer went south. All registered users get perpetual free updates ... I'll send you the password. . . . . . . . Ken
|
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
|