[xsl] flatten tree

Subject: [xsl] flatten tree
From: Jan Limpens <jan.limpens@xxxxxxxxx>
Date: Sun, 19 Sep 2004 17:30:04 -0300
hi people,

thanks in advance for all the great help you are giving to the community!

i habe a xml file like this:

<root>
  <foo>
    <bar lang="de">Hallo</bar>
    <bar lang="en">Hello</bar>
    <bar lang="es">Ola</bar>
  </foo>
  <foo>
   <!-- No "de" here -->
    <bar lang="en">Good Bye</bar>
    <bar lang="es">Hasta la vista</bar>
  </foo>
</root>

and an xsl file where I define
	<xsl:param name="selectedLanguage" select="'de'"/>
	<xsl:param name="defaultLanguage" select= "'en'"/>

and I want a result like
<div>
   <p>Hallo</p>
   <p>Goodbye<p/><!--Fallback to "en"-->
</div>

is there a good pattern for this situation?

--
Jan
http://www.limpens.com

Current Thread