Hello Daniel,
I just tested it shortly but you are in a dim:field node and do some checking
(tests). So when you do the for-each loop your are still in the node
corresponding to schema dc and element contributor ... to access the other
dim:field not (mdschema='myschema') you first need to elevate one level to the
dim:dim node by changing the for-each loop to:
<xsl:for-each
select="../dim:field[@mdschema='myschema'][@element='author'][not(@qualifier)]">
HTH,
Wilko
Von: Daniel Shin [mailto:[email protected]]
Gesendet: Donnerstag, 3. Mai 2012 16:41
An: [email protected]
Betreff: [Dspace-tech] Problem with XSLT - loop
Hi,
I'm trying to do a for-each loop without success.
The purpose is to put a link for dc.contributor.author that have a
correspondent name on another metadata schema.
The mets metadata page shows ok.
My code:
<xsl:if test="./@mdschema='dc' and
./@element='contributor'<mailto:./@mdschema='dc'%20and%20./@element='contributor'>">
<xsl:if test="./@qualifier='author'<mailto:./@qualifier='author'>">
<xsl:for-each
select="dim:field[@mdschema='myschema'][@element='author'][not(@qualifier)]">
<xsl:copy-of select="./node()"/>
<a href="http://...." target="_blank">Hello Test</a>
</xsl:for-each>
</xsl:if>
</xsl:if>
...
The pages not showing "Hello Test".
No problem with <xsl:if> conditions tests.
What's wrong?
Thanks in advance.
Daniel
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech