Re: [xsl] How do I change a XSL style sheet to group data together under one heading
2007-05-22 12:30:28
Hi Abel,
Thank you for your input. Sorry I could not get back to you earlier.
I have been looking at several versions of Muenchian Grouping and are
reading up on what I can find. Have printed several bits of information
from the Internet and are trying to get to grips with the terminology. I am
also trying several things I do see and if it does not work I start again.
Your output gives me the frame work to build on and I am learning from it.
I will get it it working as I do have some time to play with it before I
need to submit a report.
I thank you for your patience and encouragement and the time you were
willing to spend in dealing with my problem.
Thanks.
Hennie
From: Abel Braaksma <abel(_dot_)online(_at_)xs4all(_dot_)nl>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] How do I change a XSL style sheet to group data together
under one heading
Date: Tue, 22 May 2007 17:27:54 +0200
Hi Hennie,
I highly recommend you to read any first chapter of any textbook or
tutorial book on XSLT. Even the very basic introduction on
www.w3schools.com will (may?) give you the information you need to craft
your own XPath expression to the level needed for your needs in this
stylesheet.
To give you a head start:
1. Combining node sets is done with the union operator |, not with the
comma operator (which is introduced in XSLT 2.0, not 1.0)
2. It is not possible to do a node test on a string. Thus,
self::concat(x,y) is not legal, because concat returns a string.
3. The function not() can have only one argument. If you want to combine
several not-tests, you'll have to use multiple not() functions: not(a) or
not(b) etc, instead of not(a,b). Of course you can also combine node tests
inside the not() using the union operator.
Spending one or two days with learning XPath and XSLT will save you a lot
of problems and time. To learn about how keys work and how they can help
you with grouping, is (quite) a bit harder: search for Muenchian Grouping
on the net. To be able to mold this code the way you want it, and to
maintain it, learning XSLT or hiring someone that already knows XSLT are
your best options.
Cheers,
-- Abel Braaksma
kieters c wrote:
I have tried the following and the error mesage for each.
<!-- date-time must become an attribute -->
<xsl:apply-templates select="sample_date_time, cp_name,
imis_cp_ext, dischg_sample_cd, sample_comment" /> ####
<xsl:apply-templates select="key('sample',
concat(sample_date_time, cp_name, imis_cp_ext, dischg_sample_cd,
sample_comment))" />
and
<xsl:apply-templates select="*[not(self::sample_date_time, cp_name,
imis_cp_ext, dischg_sample_cd, sample_comment)]" />
Line 16, character 38 (I assume it is line ###)
Stylesheet error: Invalid XPath Expression
Select
<!-- date-time must become an attribute -->
<xsl:apply-templates select="sample_date_time" />
<xsl:apply-templates select="key('sample',
concat(sample_date_time, cp_name, imis_cp_ext, dischg_sample_cd,
sample_comment))" />
And
<xsl:apply-templates select="*[not(self::sample_date_time, cp_name,
imis_cp_ext, dischg_sample_cd, sample_comment)]
error:
Line 24 character 34
Error in XPath Expression,
Error in XPath Expression,
Finally I tried the same as above but
<xsl:apply-templates select="*[not(self::concat(sample_date_time, cp_name,
imis_cp_ext, dischg_sample_cd, sample_comment))]" />
Error
Line 24 character 34
Stylesheet error: Invalid XPath Expression
Select
I unfortunately do not have any say in the format of the final result as
it is laid down by some other authority.
Thanks.
Hennie
--~------------------------------------------------------------------
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>
--~--
_________________________________________________________________
Make free PC-to-PC calls with no loss of life!
http://www.communicationevolved.com/en-za/
--~------------------------------------------------------------------
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>
|
- Re: [xsl] How do I change a XSL style sheet to group data together under one heading, (continued)
- Re: [xsl] How do I change a XSL style sheet to group data together under one heading, Abel Braaksma
- Re: [xsl] How do I change a XSL style sheet to group data together under one heading, Abel Braaksma
- Re: [xsl] How do I change a XSL style sheet to group data together under one heading, kieters c
- Re: [xsl] How do I change a XSL style sheet to group data together under one heading, Abel Braaksma
- Re: [xsl] How do I change a XSL style sheet to group data together under one heading, kieters c
- Re: [xsl] How do I change a XSL style sheet to group data together under one heading, Abel Braaksma
- Re: [xsl] How do I change a XSL style sheet to group data together under one heading, kieters c
- Re: [xsl] How do I change a XSL style sheet to group data together under one heading, Abel Braaksma
- Re: [xsl] How do I change a XSL style sheet to group data together under one heading, kieters c
- Re: [xsl] How do I change a XSL style sheet to group data together under one heading, Abel Braaksma
- Re: [xsl] How do I change a XSL style sheet to group data together under one heading,
kieters c <=
RE: [xsl] How do I change a XSL style sheet to group data together under one heading, Michael Kay
|
|
|