On Mon, Nov 21, 2011 at 22:34, Shaw Yu <[email protected]> wrote:
> So this will be done within item-view.xsl, and in this way, all things will
> be displayed regularly (default display) except for that particular
> collection, right?

No, you can use it in most templates (including those in
item-view.xsl). More precisely, you can use it anywhere where DRI is
the document you're processing in XSLT, which is almost everywhere. A
notable exception you will run into is DIM, which is a different imput
XMLdocument processed in XSLT for individual items (it contains item
metadata). So you cannot use it in templates which match="dim:dim".
You will have to use it in its parent template.

> Also, I saw all the existing xsl:if clauses are within the individual filed
> templates. Does this mean that I also need to create the above xsl:if
> clauses within all the individual filed templates for detail view or is
> there a way to use a single xsl:if clause for all the fields of a particular
> collection? So what I am trying to say is if it's possible (desirable) to
> divide the item-view.xsl file to two parts, one for the default collection,
> and another for a new collection.

xsl:if clauses can be anywhere inside xsl:templates (the restriction I
just mentioned pertains to contents of its "test" attribute).

XSLT files do not matter too much to the computer. You can organize it
any way you want. What matters are individual xsl:templates. So you
probably want to have something like this:

<xsl:template name="code-for-default-collection">
...
</xsl:template>

<xsl:template name="code-for-collection-123">
...
</xsl:template>

<xsl:template name="some-parent-template">
...
  <xsl:choose>
    <xsl:when
 
test="substring-after(/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='request
 '][@qualifier='URI'], 'handle/123456789/')='123'">
      <xsl:call-template name="code-for-collection-123"/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:call-template name="code-for-default-collection"/>
    </xsl:otherwise>
  </xsl:choose>
...
</xsl:template>

You could have even all templates in a single XSLT file in your theme,
not that I recommend it.

> Sorry for too many questions.

No problem. It would be helpful to know how you intend to customize
the detailed view, what you want to achieve.

Regards,
~~helix84

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to