Subject: [xsl] Relationships in for-each statement From: "Bob Portnell" <simply.bobp@xxxxxxxxx> Date: Thu, 7 Sep 2006 13:21:14 -0700 |
<productionCrew> <crew @program= ""> <member> <role> ... </role> <givenname> ... </givenname> <surname> ... </surname> ... </member> </crew> <crew> ... </crew> </productionCrew>
I have my test to see if it's finding my target person's name (and that person is acting) anyplace...
<xsl:if test="//member[(role='Actor') or (role='Guest Star') or (role='Host')][concat(tv:givenname, ' ', tv:surname) = $matcher]">
Which works fine. Once I know the person is in the data, I go looking in detail, and my current solution for that is...
<!-- Loop on every crew listed --> <xsl:for-each select="//member[(role='Actor') or (role='Guest Star') or (role='Host')][concat(tv:givenname, ' ', tv:surname) = $matcher]" > <!-- Get //crew @program and do stuff --> <xsl:variable name="progID" select="../@program" /> <!-- And stuff -->
... which works. But I have similar loops elsewhere where I can successfully get those two operations combined into a single for-each. The simplest one is...
How would I go about getting to where my for-each would be operating from the @program of (the assorted met conditions)?
Bob Portnell simply.bobp@xxxxxxxxx
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Ignoring a child element, Michael Kay | Thread | Re: [xsl] Relationships in for-each, David Carlisle |
RE: [xsl] Data Relativity Question, Michael Kay | Date | RE: [xsl] inline troubles, Luke Jones |
Month |