Subject: [xsl] How to take a node set and convert it into a table view From: "Sam Carleton" <scarleton@xxxxxxxxxxxxxxxx> Date: Mon, 11 Dec 2006 16:01:19 -0500 |
Folks, you all have been very helpful when I have had very specific questions and example data/desired output to go along with it. Now I am faced with a problem that is simply too complex to simplify down as to provide you with example data, but conceptually it isn't very hard, I think...
The final output is a simple detail table: A table with 5 columns and one or more rows. Each cell of the table is a key/value pair.
1: The first one is fixed where there will always be only 4 name/value pairs 2: The second, like the first is fixed, but there are 8 name/value pairs. 4 need to go on the 1st row with one empty cell and the last 4 go on the second row. 3: The third had 6 fixed name/value pairs, but then can have one or more name value pairs after the fixed name/value pairs.
What I am doing and is viable, though a bit bloated for #1 and #2 is simply manually create those tables with the correct layout. It isn't the prettiest code I have ever written, but it gets the job done.
It is #3 that has me stumped. My initial thought is to do something along the lines of what Micheal is doing in XSLT 2nd Edition Programmers ref with the Kight's Tour Stylesheet. That is create new node sets. It just happens that the first 4 name/value pairs of #1 and #2 are also the same as nodes 2 thou 5 of #3. So, I am thinking that there has to be some way within XSLT to take a node set of X nodes and convert it into a table view. Is there?
The next problem is that the data is coming from all over the place. All the names are hard coded in the XSLT. Some of the value are at or under the current node, but other values are accessed via keys. How would I go about creating a new node with such scattered data?
I would prefer not to change the data, unless that is the only choice, so that is not out of the question, either. -- Miltonstreet Photography http://www.miltonstreet.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] the best approach, Sam Carleton | Thread | Re: [xsl] How to take a node set an, David Carlisle |
Re: [xsl] Problem getting margin-to, J.Pietschmann | Date | Re: [xsl] How to take a node set an, David Carlisle |
Month |