On Tue, Jan 15, 2013 at 12:37 AM, Charles Kinney <[email protected]> wrote:
> Thanks. You guessed correctly: I am using Mirage. Your suggestion has helped
> me get started on customizing the list.
>
> I'm a former database programmer, with minimal web programming background.
> Can you please explain just a bit more on the need for the <xsl:variable
> name= ... > statement?

On Tue, Jan 15, 2013 at 12:37 AM, Charles Kinney <[email protected]> wrote:
> I'm a former database programmer, with minimal web programming background. 
> Can you please explain just a bit more on the need for the <xsl:variable 
> name= ... > statement?

The thing to keep in mind about XSLT is that it's not a programming
language. It's a templating language. For procedural programmers, it
takes a bit getting used to, but it helps understand what's going on.
The xsl files are not processed line by line. The XML input (in DSpace
the DRI document, or the METS (dim namespace) documents) are being
processed cyclically by the templates until a match is found. So
you're always processing some part of the DOM tree. When you're in one
part, a distant part is accessible only by "going up" elements
(../sibling). DOM trees which are in files that are currently not
being matched, are not normally accessible (save a trick or two). So
one of the tricks is to remember part of the tree when you're
processing it into a variable and use it when processing a different
document. In this case, we're remembering a fragment of the DRI input
document (only in order to determine what kind of list we're
rendering) and use it when processing the METS input document.

You could safely leave it out, but you would notice that all item
lists are rendered with your modifications, not only recent items.


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to