xsl-list
[Top] [All Lists]

flatten tree

2004-09-19 13:30:04
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">Olá</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


<Prev in Thread] Current Thread [Next in Thread>