xsl-list
[Top] [All Lists]

RE: [xsl] Grouping into duplicates and non duplicate lists

2009-11-13 18:22:21
Hi Martin,

Sure here it is using the xml fragment below.

<h1>Generic Course Notes (applies to all study groups</h1>
<ul>
        <li>A</li>
        <li>B</li>
</ul>
<h1Specific Study Group Notes</h1>              
<h2>Award</h2>
<ul>
        <li>C</li>
</ul>
<h2>FFS</h2>
<ul>
        <li>C</li>
        <li>D</li>
</ul>

There could be many more Study Groups with more specific notes (eg not 
duplicates.

Thanks a lot Tim
        
Cavanagh, Tim (DFEEST) wrote:
Hi, I have scoured the web for help on this and have been through the 
archives and Jenis' grouping pages but I cannot work it out. So here goes.

I am using xslt 1.0 and MSXML parser

I have an xml file that has a series of notes Like so
<CourseNote>
          <CourseNoteItem>
            <StudyGroupName>Aboriginal or Torres Strait 
Islanders</StudyGroupName>
            <Year>2009</Year>
            <CourseNoteText>A</CourseNoteText>
            <StudyGroupOrder>2</StudyGroupOrder>
            <StudyGroupCode>ATSI</StudyGroupCode>
            <DisplaySequence>2</DisplaySequence>
          </CourseNoteItem>
          <CourseNoteItem>
            <StudyGroupName>Aboriginal or Torres Strait 
Islanders</StudyGroupName>
            <Year>2009</Year>
            <CourseNoteText>B</CourseNoteText>
            <StudyGroupOrder>2</StudyGroupOrder>
            <StudyGroupCode>ATSI</StudyGroupCode>
            <DisplaySequence>5</DisplaySequence>
          </CourseNoteItem>
          <CourseNoteItem>
            <StudyGroupName>Award</StudyGroupName>
            <Year>2009</Year>
            <CourseNoteText>A</CourseNoteText>
            <StudyGroupOrder>1</StudyGroupOrder>
            <StudyGroupCode>AWD</StudyGroupCode>
            <DisplaySequence>2</DisplaySequence>
          </CourseNoteItem>
          <CourseNoteItem>
            <StudyGroupName>Award</StudyGroupName>
            <Year>2009</Year>
            <CourseNoteText>B</CourseNoteText>
            <StudyGroupOrder>1</StudyGroupOrder>
            <StudyGroupCode>AWD</StudyGroupCode>
            <DisplaySequence>5</DisplaySequence>
          </CourseNoteItem>
          <CourseNoteItem>
            <StudyGroupName>Award</StudyGroupName>
            <Year>2009</Year>
            <CourseNoteText>C</CourseNoteText>
            <StudyGroupOrder>1</StudyGroupOrder>
            <StudyGroupCode>AWD</StudyGroupCode>
            <DisplaySequence>7</DisplaySequence>
          </CourseNoteItem>
          <CourseNoteItem>
            <StudyGroupName>FFS</StudyGroupName>
            <Year>2009</Year>
            <CourseNoteText>C</CourseNoteText>
            <StudyGroupOrder>4</StudyGroupOrder>
            <StudyGroupCode>FFS</StudyGroupCode>
            <DisplaySequence>7</DisplaySequence>
          </CourseNoteItem>
          <CourseNoteItem>
            <StudyGroupName>FFS</StudyGroupName>
            <Year>2009</Year>
            <CourseNoteText>D</CourseNoteText>
            <StudyGroupOrder>4</StudyGroupOrder>
            <StudyGroupCode>FFS</StudyGroupCode>
            <DisplaySequence>9</DisplaySequence>
          </CourseNoteItem>
        </CourseNote>

There can be many different StudyGroupCodes, many CourseNoteTexts and many 
Years. I would like to display a 'Generic' List of notes eg those that are 
duplicated in every StudyGroup and then display lists of StudyGroups with the 
CourseNoteTexts that are not duplicated in all other StudyGroups. I am 
familiar with keys and get get lists of unigue items and group them but I 
cannot exclude the items that do not appear in all StudyGroups... 

Can you post the XSLT output you want to create for the above input?

-- 

        Martin Honnen
        http://msmvps.com/blogs/martin_honnen/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>