Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: conditional execution

From: "David Schwartz" <drschwar@--.---.--->
To: NULL
Date: 7/1/2004 4:30:00 PM
worked great; thx so much!!

-- 

Thanks,
David

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
David R. Schwartz, Ph.D.
Bellevue, WA
drs58@m...
"Oleg Tkachenko [MVP]" <oleg@NO!SPAM!PLEASEtkachenko.com> wrote in message
news:uc$m1dcXEHA.1036@T......
> David Schwartz wrote:
>
> > XML:
> > <root>
> > <team_member id="GW">George Washington</team_member>
> > <team_member id="TJ">Thomas Jefferson</team_member>
> > <issue id="i.0034.1">
> >   <description>first issue</description>
> >   <team_member_assoc member="GW"/>
> > </issue>
> > <issue id="i.0034.2">
> >   <description>2ndissue</description>
> >   <team_member_assoc member="GW"/>
> >   <team_member_assoc member="TJ"/>
> > </issue>
> > </root>
> >
> > DESIRED OUTCOME:
> > I want to create a list for each team_member of the issues with which
> > they're associated.
>
> Something like this:
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>    <xsl:key name="issuesByMember" match="root/issue"
> use="team_member_assoc/@member"/>
>    <xsl:template match="/">
>      <table>
>        <tr>
>          <th>Team Member</th>
>          <th>Issues</th>
>        </tr>
>        <xsl:apply-templates select="root/team_member"/>
>      </table>
>    </xsl:template>
>    <xsl:template match="team_member">
>      <tr>
>        <td>
>          <xsl:value-of select="."/>
>        </td>
>        <td>
>          <xsl:for-each select="key('issuesByMember', @id)">
>            <xsl:value-of select="description"/>
>            <br/>
>          </xsl:for-each>
>        </td>
>      </tr>
>    </xsl:template>
> </xsl:stylesheet>
>
> -- 
> Oleg Tkachenko [XML MVP]
> http://blog.tkachenko.com




transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent