My favorite way to do this involves an xslt 2.0 stylesheet and the data
in an xml format.
Assuming you data looks something like this.
---
cat 1
sub a
cat 2
sub b
cat 2
sub c
---
your xsl would in
There are many ways to skin this, this is how I do these kinds of things. Feels cleaner to me, but doesn't make it better.<@assign local$myarray <@array value="cat 2, sub 4;cat 1,sub 1;cat 1,sub 2;cat 3,sub 9;cat 1,sub 3;cat 2,sub 5;cat 2,sub 6;cat 3,sub 7;cat 3, sub 8;">><@assign local$myarray[0,1
from the search. I took the search and ordered it by category and BINGO - it works just fine. Sorry for the posts and my idiotic mistake. From: Ben Johansen [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 12, 2006 12:40 PMTo: witango-talk@witango.comSubject: Re: Witango-Talk: Creating an
o-talk@witango.comSubject:
Re: Witango-Talk: Creating an index
well for one thing are your sure of the sort of the data coming in.
i mean your going to need to do a order by col1 asc, col2 asc in the seach so that this technique works.
you also might want to try quoting the values in the @I
posts and my idiotic mistake.
From: Ben Johansen [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 12, 2006 12:40 PMTo:
witango-talk@witango.comSubject: Re: Witango-Talk: Creating an
index
well for one thing are your sure of the sort of the data coming in.
i mean your going to need to do a
PROTECTED]> wrote: I have been trying to do this with an array... I like your method, you have an actual snip? From: Alan Wolfe [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 11, 2006 2:03 PM To: witango-talk@witango.comSubject: Re: Witango-Talk: Creating an index
<@VAR header>"> <@assign header value="<@col num=1>">
<@VAR header> <@col num=2></@rows
Should be simple but I am just not seeing... I need a fresh set of eyes...
From: Alan Wolfe [mailto:[EMAIL PROTECTED]]
Sent: Wednesday,
;@col num=2>
</@rows
Should
be simple but I am just not seeing... I need a fresh set of
eyes...
From: Alan Wolfe [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 11, 2006 2:20 PMTo:
witango-talk@witango.comSubject: Re: Witango-Talk: Creating an
index
Sure, this uses h1
[EMAIL PROTECTED]] Sent: Wednesday, October 11, 2006 2:03 PM
To: witango-talk@witango.comSubject: Re: Witango-Talk: Creating an index
I'm not sure if it's the most efficient way to do it but here's what i do (in pseudocode)
set local$header to "" (blank)
loop through
Create a distinct array of just categories.Then loop through the new distinct array, and on each iteration, filter the original array, for this category, and loop through the new array with just those subjects, so a loop within a loop. -- Robert Garcia President - BigHead Technology VP Applicati
I have been trying to do this with an array...
I like your method, you have an actual
snip?
From: Alan Wolfe [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 11, 2006 2:03 PMTo:
witango-talk@witango.comSubject: Re: Witango-Talk: Creating an
index
I'm not sure if it&
I'm not sure if it's the most efficient way to do it but here's what i do (in pseudocode)
set local$header to "" (blank)
loop through the table and for each row:
{
if column 1 is diferent than local$header
{
write out the header
set local$header to column 1
}
write out colum
Sorry if this seems
so elementary...
I have a table that
lists categories and subjects - ie...
category1 subject1
category1subject2
category1subject3
category2 subject4
category2subject5
category2subject6
category3 subject7
category3subject8
13 matches
Mail list logo