Re: [Dspace-tech] Offtopic: place for general XSLT discussion?
First I should note that I described the problem inside-out. I needed to index a set of metadata elements in the DRI document by an attribute value from the METS document, not the other way around. Just getting that straight helped a lot. On Thu, Apr 03, 2008 at 03:00:34PM -0500, Dorothea Salo wrote: On Thu, Apr 3, 2008 at 2:06 PM, Mark H. Wood [EMAIL PROTECTED] wrote: Is there some good place to ask questions about XSLT in general? Try the XSL mailing list Mulberry Technologies runs: http://www.mulberrytech.com/xsl/xsl-list/. That led me to Dave Pawson's XSLT Questions and Answers (http://www.dpawson.co.uk/xsl/sect2/sect21.html) which provided a vital clue to what I was doing wrong. I'm bookmarking both. (In case this sounds interesting: in the item summary view I need to relate each of the item's bitstreams to a metadata element my aspect adds to the pageMeta element. Just one metadata element, or one element per bitstream? If the former, I'd be tempted to chuck it into a variable. One element per bitstream, but this hint led to a solution anyway -- thanks! I used the match= expression from my busted key element as the select= expression and assigned the set of relevant metadata nodes to a variable, then for each bitstream I run through the node set with for-each and pull out the text of the node with the attribute value matching the bitstream's xlink:href. A key or a direct reference would have been nice, but it turns out that there is no way to express either one in this case. Why this was necessary: I see two ways that document() could work, and nothing I've read (including the Recommendation!) explicitly says which is correct. One is to graft the new document into the existing source tree, which naively made sense but on reflection probably causes all sorts of problems, and in any case isn't the way it works. The other way is for document() to create a new, separate source tree and (apparently) push it onto a stack of partially-processed trees. The various axes can only address within the current tree, so there was no way for me to see out of the METS document to pluck values from the (stacked) DRI document. Variables exist independent of this structure, so I could assign a set of the necessary nodes to a variable and refer to it regardless of which node tree is being processed. The vital clue was noted by James Clark in the above-mentioned FAQ: / identifies the root node of the *current document*. This is stated in the XPath Recommendation, but it would have taken me a long time to get there. -- Mark H. Wood, Lead System Programmer [EMAIL PROTECTED] Typically when a software vendor says that a product is intuitive he means the exact opposite. pgp2z3wAeAOCV.pgp Description: PGP signature - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech
[Dspace-tech] Offtopic: place for general XSLT discussion?
Is there some good place to ask questions about XSLT in general? I've run into one of those problems where none of the books is specific enough, and I'm trying increasingly crazy variants of an expression to see what works. (In case this sounds interesting: in the item summary view I need to relate each of the item's bitstreams to a metadata element my aspect adds to the pageMeta element. I don't seem to understand how to use the value of element A as the comparand in an attribute-value predicate on element B, and since the object metadata is not in the main DRI document but is pulled in by the theme in the middle of processing, I don't think I can index it using a key element because the nodes I want to index don't exist at the point that the key element is processed. Grrr, my first serious foray into a new technology *always* turns into one of these.) -- Mark H. Wood, Lead System Programmer [EMAIL PROTECTED] Typically when a software vendor says that a product is intuitive he means the exact opposite. pgptOGmvoa8Yt.pgp Description: PGP signature - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech
Re: [Dspace-tech] Offtopic: place for general XSLT discussion?
On Thu, Apr 3, 2008 at 1:06 PM, Mark H. Wood [EMAIL PROTECTED] wrote: Is there some good place to ask questions about XSLT in general? I've run into one of those problems where none of the books is specific enough, and I'm trying increasingly crazy variants of an expression to see what works. This isn't discussion, but I found the Dave Pawson's XSLT FAQ to be extremely helpful: http://www.dpawson.co.uk/xsl/sect2/sect21.html I used often used John Shipman's XSLT document as a reference too: http://infohost.nmt.edu/tcc/help/pubs/xslt/ He has a graphic describing axis selection which is very helpful: http://infohost.nmt.edu/tcc/help/pubs/xslt/axis-sect.html - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech
Re: [Dspace-tech] Offtopic: place for general XSLT discussion?
On Thu, Apr 3, 2008 at 2:06 PM, Mark H. Wood [EMAIL PROTECTED] wrote: Is there some good place to ask questions about XSLT in general? Try the XSL mailing list Mulberry Technologies runs: http://www.mulberrytech.com/xsl/xsl-list/. (In case this sounds interesting: in the item summary view I need to relate each of the item's bitstreams to a metadata element my aspect adds to the pageMeta element. Just one metadata element, or one element per bitstream? If the former, I'd be tempted to chuck it into a variable. Dorothea -- Dorothea Salo [EMAIL PROTECTED] Digital Repository Librarian AIM: mindsatuw University of Wisconsin Rm 218, Memorial Library (608) 262-5493 - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech