I have a collection of plays and poems from different authors. My XML looks like this:
<works>
<editions>
<edition>
<playtitle>Henry IV, Part 1</playtitle>
<playcode>1H4</playcode>
<genre>play</genre>
<metadataBlock>
<meta content="Shakespeare, William" name="Creator"/>
</metadataBlock>
</edition>
</editions>
</works>
I have used the following code successfully to extract the "playcode" from all the plays:
<xsl:when test="$only = 'plays'">
<xsl:sequence select="/works/editions/edition[genre = 'play']/playcode"/>
</xsl:when>
However, I cannot figure it out how to extract the "playcode" from all the plays written by Shakespeare. I have tried multiple possibilities such as:
<xsl:when test="$only = 'plays'">
<xsl:sequence select="/works/editions/edition[genre = 'play'
and @content='Shakespeare, William'
and @name='Creator']/playcode"/>
</xsl:when>
And such as:
<xsl:when test="$only = 'plays'">
<xsl:sequence select="/works/editions/edition[genre =
'play']/playcode/metadataBlock/meta[@content='Shakespeare, William'
and@name='Creator']"/>
</xsl:when>
What am I missing??