OK, I have a finding aid structure like so:
<c01 level="file">
<c02 level="file"></c02>
</c01>
For my XSLT template, I’d like to be able to match only nodes with the attribute of level=”file” that have a parent also with the attribute of level=”file” so that I can enact some specific formatting on the child.
Normally to match level=”file” I just use the following:
<xsl:template match="*[@level="file"]">
However, for the purposes of formatting (indentation, etc), I need the node that is a child of a node with the same attribute to be treated differently than its parent. So something like:
<xsl:template match="*[@level="file"] and parent::[@level="file"]">
Any ideas? I hope this makes sense. Thanks!
Use:
This template matches any element the string value of whose
levelattribute is"file"and that is a child of an element the string value of whoselevelattribute is"file"Do note: No
..orparent::axis or//are used and this is probably the simplest and most precise match pattern.