|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Grouping Problem
Hi Puja,
In your XML, the stylesheet is refered as
<?xml-stylesheet type="text/xsl" href="example1.xsl"?>
. I believe then, you are using IE(its XSLT engine) to
transform the XML. If you can tell me the following
details, I can *explore the problem further* --
1) The IE version ,
2) You said, you want to do grouping. But what you
want to do with the groups formed. Is your required
*not sorting* ? ,
3) Why are you using these namespaces in XSL --
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/TR/REC-html40"
Your XML referes, <dataroot
xmlns:od="urn:schemas-microsoft-com:officedata"
generated="2003-10-15T12:22:08"> ..
If I am guessing right, your XML is related to
MSOffice.. Is it so?
*I also have some other doubts* (not related to this
question); if somebody can answer. On my Win2K
m/c(prof. edition), the following DLLs for XSLT
processor are present (in system32 directory) --
msxml3.dll
msxml3a.dll
msxml3r.dll
msxmlr.dll
msxml.dll
I also have XMLSpy installed (professional edition;
ver 5, release 3). Since XMLSpy has its own XSLT
engine also, I believe it also installs its DLLs in
windows.
I want to understand, which DLLs correspond to IE, and
which to XMLSpy.
My *own questions*, are for knowlege sake..
Regards,
Mukul
--- puja thakral <puja_thakral@xxxxxxxxx> wrote:
> Hi Everyone,
> I'm little stuck in a grouping problem.I'm sure
> someone can help me on this list.This list has
> really
> been very supportive.Thanks for all the help.
>
> Here is my XML document,
> <?xml version="1.0" encoding="UTF-8"?>
> <?xml-stylesheet type="text/xsl"
> href="example1.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></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>
> </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>
> </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>
> </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></Description>
>
<Deadline_x0020_Date>2001-01-15T00:00:00</Deadline_x0020_Date>
> <Program_x0020_Source>Other</Program_x0020_Source>
>
<Date_x0020_of_x0020_Notice>2000-06-26T00:00:00</Date_x0020_of_x0020_Notice>
> </GrantNet>
> </dataroot>
>
> My 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"
> xmlns="http://www.w3.org/TR/REC-html40">
>
> <xsl:key name="rows" match="GrantNet" use="fldCatID"
> />
>
> <xsl:output method ="html"/>
>
> <xsl:template match="dataroot">
> <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 face="Times New Roman">
> <a href="#fldCatID"><big>AH - Arts &
> Humanities</big></a><br/>
> <a href="#fldCatID"><big>ED -
> Education</big></a><br/>
> <a href="#fldCatID"><big>GS - Graduate Student
> </big></a><br/>
> <a href="#fldCatID"><big>HM - Health &
> Medicine</big></a><br/>
> <a href="#fldCatID"><big>ID -
> Interdisciplinary</big></a><br/>
> <a href="#fldCatID"><big>IN - International
> Programs</big></a><br/>
> <a href="#fldCatID"><big>SB - Social and Behavioral
> </big></a><br/>
> <a href="#fldCatID"><big>SEM - Science, Engineering
> & Math<br/>
> </big></a></font> </p>
> <xsl:apply-templates/>
>
> </BODY>
> </HTML>
> </xsl:template>
>
> <xsl:template match="GrantNet">
> <xsl:apply-templates select="GrantNet[generate-id(.)
> =
> generate-id(key('rows', fldCatID)[1])]"/>
>
> <xsl:apply-templates select="fldCatID"/>-
> <B><xsl:apply-templates
> select="Handout_x0020_Number"/></B><br/>
> <font color="#0000FF"><xsl:apply-templates
> select="fldSponsorDesc"/></font><br/>
> <B><U><xsl:apply-templates
> select="Program"/></U></B><br/><br/>
> <xsl:apply-templates
> select="Description"/><br/><br/>
>
> <P><I><font color="#0000FF">
> <A TARGET="_blank">
> <xsl:attribute name="HREF">
> <xsl:apply-templates select="URL"/>
> </xsl:attribute>
> <xsl:apply-templates select="URL"/>
> </A>
> </font>
> </I><br/></P>
>
> <xsl:apply-templates
> select="Deadline_x0020_Date"/><br/>
>
> <br/><hr/><p><center>[<a
> href="#TOP">TOP</a>]</center></p><hr/>
>
> </xsl:template>
>
> </xsl:stylesheet>
>
> I'm trying to group it by fldCatID but nothing seems
> to heppen.I tried using
> <xsl:apply-templates select="GrantNet[generate-id(.)
> =
> generate-id(key('rows', fldCatID)[1])]"/>
> but looks like I'm missing something.
>
> Any help is appreciated a lot.Thanks in advance.
> Regards,
> Puja.
>
>
> __________________________________
> 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
>
__________________________________
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








