This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
How to display more complicated xml document by xsl (again)?
- From: shenjun <shjunsuper at 263 dot net>
- To: "XSL-List at lists dot mulberrytech dot com" <XSL-List at lists dot mulberrytech dot com>
- Date: Wed, 6 Mar 2002 20:44:36 +0800
- Subject: [xsl] How to display more complicated xml document by xsl (again)?
- Organization: Eigenet
- Reply-to: xsl-list at lists dot mulberrytech dot com
(First, especially thanks for Jeni Tennison' help! Your reply is ok!)
Following is a series problem with last one.
<Content>
<Keywords>
<Keyword id=1>
<AAA>aaa</AAA>
</Keyword>
<Keyword id=2>
<CCC>ccc</CCC>
</Keyword>
<Keyword id=3>
<BBB>bbb</BBB>
</Keyword>
<Keyword id=4>
<DDD>ddd</DDD>
</Keyword>
<Keyword id=5>
<EEE>eee</EEE>
</Keyword>
</Keywords>
<Groups>
<Group name="group1">
<Member>1</Member>
<Member>2</Member>
</Group>
<Group name="group2">
<Member>4</Member>
<Member>5</Member>
</Group>
</Groups>
</content>
This time I want to display the Keyword in order. First line(tr/td) will display 'group1', second line display the Keyword 3 only, and the last line display 'group2'.
I used <xsl:key name="keywords" match="Content/Keywords/Keyword" use="@id"> to declare a keywords, and use <xsl:for-each select="//Groups/Group"> to display every group, but how and when to display the Keyword 3 ?
Thanks again. sjoy
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list