This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Building tables in XSL

 
Chicken Farmer ()
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I do a rowspan in XSL, so that if a field in a table has two values, those values can be separated into two sub-fields? I think the best way to ask is to show what I want something to look like and what I have in my XSL right now.
Here's what I would want a row to look like:

Basically a task can have a spacecraft, ground station, or both, and each one of those will have a resource field associated with it. So rowspan is going to be variable.
Right now, my XSL looks like:

This works fine, and displays the appropriate data, but it would be nice to have some sort of separator within the SC_GS and Resource fields for easier viewing.
Programmatically it was easy to this when I was building the HTML page with a servelt. However, doing the same with XML and XSL is proving a bit trickier. Any help would be appreciated.
Thanks!
Jason
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have the power to change the XML schema, you can split the field into two and not worry about it in the XSL.
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure I get what you are trying to say..........
If you need a gap between two columns(?), would it be possible to add a new "td" element with "& nbsp" (without the space)....
 
jason adam
Chicken Farmer ()
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not a huge issue, more a nice-to-have. Our XSL displays the table with borders around each field. Somtimes a single row will have a field that will contain two data instead of one, so splitting that field into two smaller fields, but still on the same row, would be ideal. Basically two boxes within one box.
 
This tiny ad is wafer thin:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!