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

RE: [xsl] Match first non-empty from different fragments


Subject: RE: [xsl] Match first non-empty from different fragments
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Thu, 20 Jan 2005 09:36:10 +0200

Hi,

> 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:
>
> <results>
>   <result name="event">
>     <xml>
>        <rs:data><z:row /></rs:data>
>     </xml>
>   </result>
>   <result name="meet">
>        <rs:data><z:row /></rs:data>
>   </result>
> </results>
>
> 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!

Please do, I don't really understand what you're doing with the xsl:choose
processing and when you mention the value of z:row, it's sort of hard to see
what you mean given the fact that z:row elements have no content or
attributes.

Cheers,

Jarno


Current Thread