xsl-list
[Top] [All Lists]

RE: Re: Sorting Problem(solved)

2003-10-16 10:24:03
Try Googling on "Muenchian grouping"
-- 
Charles Knell
cknell(_at_)onebox(_dot_)com - email



-----Original Message-----
From:     puja thakral <puja_thakral(_at_)yahoo(_dot_)com>
Sent:     Thu, 16 Oct 2003 09:54:25 -0700 (PDT)
To:       xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject:  Re: [xsl] Sorting Problem(solved)

Hi everone,
Thanks for posting the replies.I got it.But another
thing is that I've a huge database from which I'm
pulling the data.As I applied the generateid
function,it gives me the same catogories again and
again.For eg,it gives me 
ID
ID
ID
ID 
as many times as it's there.I want a particular
category to be displayed only once in the beginning.
For eg,
Categories
-------------
ID
GS
ED
HM
--------------
And I also want it to be displayed only once as a
heading as the particular category starts.
For eg,
                    ID
ID-101
Program
Description

ID-202
Program
Description

And then the heading in the beginning should point to
the headings down the page.If u find problem
understanding my question,let me know.I'll try to make
it more clear.
Thanks a lot for all the help.
Regards,
Puja.


--- puja thakral <puja_thakral(_at_)yahoo(_dot_)com> wrote:
Thanks everyone.
Thanks for  the references.I'll look into them.
Besides that my xml is

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl"
href="example2.xsl"?>
<dataroot
xmlns:od="urn:schemas-microsoft-com:officedata"
generated="2003-10-15T12:22:08">


<GrantNet>
<Issue_x0020_Number>0005</Issue_x0020_Number>
<Handout_x0020_Number>111</Handout_x0020_Number>
<fldCatID>GS</fldCatID>
<fldSponsorDesc>American Association of University
Women</fldSponsorDesc>
<Program>2000-2001 American Fellowships</Program>
<URL>http://www.aauw.org/3000/fdnfelgra.html</URL>
<Description>American Fellowships </Description>

<Deadline_x0020_Date>1999-11-15T00:00:00</Deadline_x0020_Date>
<Program_x0020_Source>Web</Program_x0020_Source>

<Date_x0020_of_x0020_Notice>1999-10-11T00:00:00</Date_x0020_of_x0020_Notice>
<Annual_x0020_Program>0</Annual_x0020_Program>
</GrantNet>

<GrantNet>
<Issue_x0020_Number>0103</Issue_x0020_Number>
<Handout_x0020_Number>752</Handout_x0020_Number>
<fldCatID>ID</fldCatID>
<fldSponsorDesc>American Council of Learned
Societies</fldSponsorDesc>
<Program>Library of Congress Fellowships in
International Studies</Program>
<URL>http://www.acls.org</URL>
<Description></Description>

<Deadline_x0020_Date>2000-10-02T00:00:00</Deadline_x0020_Date>
<Program_x0020_Source>Mailing from
Sponsor</Program_x0020_Source>

<Date_x0020_of_x0020_Notice>2000-08-25T00:00:00</Date_x0020_of_x0020_Notice>
<Annual_x0020_Program>0</Annual_x0020_Program>
</GrantNet>

<GrantNet>
<Issue_x0020_Number>0103</Issue_x0020_Number>
<Handout_x0020_Number>753</Handout_x0020_Number>
<fldCatID>ID</fldCatID>
<fldSponsorDesc>American Council of Learned
Societies</fldSponsorDesc>
<Program>Contemplative Practice
Fellowships</Program>
<URL>http://www.acls.org</URL>
<Description></Description>

<Deadline_x0020_Date>2000-11-01T00:00:00</Deadline_x0020_Date>
<Program_x0020_Source>Mailing from
Sponsor</Program_x0020_Source>

<Date_x0020_of_x0020_Notice>2000-08-25T00:00:00</Date_x0020_of_x0020_Notice>
<Annual_x0020_Program>1</Annual_x0020_Program>
</GrantNet>

<GrantNet>
<Issue_x0020_Number>0101</Issue_x0020_Number>
<Handout_x0020_Number>606</Handout_x0020_Number>
<fldCatID>SB</fldCatID>
<fldSponsorDesc>A.L. Mailman Family Foundation,
Inc.</fldSponsorDesc>
<Program>Foundation Grants</Program>
<URL>http://www.mailman.org</URL>
<Description>
Goals 
</Description>
<Program_x0020_Source>Other</Program_x0020_Source>

<Date_x0020_of_x0020_Notice>2000-06-26T00:00:00</Date_x0020_of_x0020_Notice>
<Annual_x0020_Program>0</Annual_x0020_Program>
</GrantNet>

</dataroot>

xsl is

<?xml version='1.0' encoding="UTF-8"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns:fo="http://www.w3.org/1999/XSL/Format";
xmlns:xlink="http://www.w3.org/1999/xlink";>
<xsl:output omit-xml-declaration="yes"
indent="yes"/> 
<xsl:template match="/">

<HTML>
<HEAD>
  <TITLE>GrantNet</TITLE>
</HEAD>
<BODY>

<A NAME="TOP"/>       
<h2 align="center"><font color="#800000">Office Of
Research and Sponsored Programs<BR/><BR/>GrantNet
Month 2003</font></h2><BR/>
<p align="left"><font color="#004080" face="Times
New
Roman"><a name="Sorted by Disciplines"><big>Sorted
by
Disciplines</big></a></font></p>
<p align="left"><font color="#004080" face="Times
New
Roman">

<xsl:for-each select="dataroot/GrantNet">
<xsl:sort select="fldCatID"/>
<a href="#{generate-id(fldCatID)}"><xsl:value-of
select="fldCatID"/></a><br/>
</xsl:for-each>
</font></p>

<xsl:for-each select="dataroot/GrantNet">
<xsl:sort select="fldCatID"/>
</xsl:for-each>

<xsl:for-each select="dataroot/GrantNet">
<P><B><center><strong><font
color="#000080"><big><big>
<a name="{generate-id(fldCatID)}">
<xsl:value-of select="fldCatID"/>
</a></big></big></font></strong></center></B></P>
<P>
<B><xsl:value-of select="fldCatID"/>-<xsl:value-of
select="Handout_x0020_Number"/></B><BR/>
<font color="#0000FF"><xsl:value-of
select="fldSponsorDesc"/></font><BR/>
<B><U><xsl:value-of select="Program"/></U></B></P>
<xsl:value-of select="Description"/>
<BR><I><font color="#0000FF"><a href="@">
<xsl:value-of select="URL"/></a>
</font></I>
<BR><B>Deadline:<xsl:value-of
select="Deadline_x0020_Date"/></B></BR></BR>
<hr/>

<p><center>[<a
href="#TOP">TOP</a>]</center></p><hr/>
</xsl:for-each>

</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>




__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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