[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Match first non-empty from different fragments

Subject: [xsl] Match first non-empty from different fragments
From: Karl Stubsjoen <kstubs@xxxxxxxxx>
Date: Wed, 19 Jan 2005 20:31:41 -0700

Do you call it a fragment?  Not sure - this type of verbiage always
confuses me.  Anyhow...

I have a parent and child arrangment of data, they are events.  An
event may have many meets so the event acts as the parent and the meet
the child.  The child event inherits information from the parent event
when no information for the child meet is provided; example:  if meet
name is blank, use event name.

Currently, I am doing a pretty yucky XSL:CHOOSE to accomplish the
above, but I'd much rather accomplish with an APPLY-TEMPLATES...  The
source of the data is something like this:

  <result name="event">
       <rs:data><z:row /></rs:data>
  <result name="meet">
       <rs:data><z:row /></rs:data>

Typically I would apply-templates on the result who's name is "meet",
then match on the rs:data and explicitly write out the z:rows to my
HTML.  That make sense?
The explicit z:row value of's is what throws me off and forces me to
do the XSL:CHOOSE.

Any ideas on a better approach?  Hope I'm not too vague, if so I can
provide more details!

Thanks : )


Current Thread