xsl-list
[Top] [All Lists]

Merge 2 files and sort output

2003-04-23 12:08:54
Hello!

I have 2 input files - files with articles in different xml structure -
and i want to merge them to one file and sort the output file by the
date values. So that articles of file1 and file2 are mixed.

Here is the structure of file1:
<document>
  <ARTICLE>
    <headline>...</headline>
    <date>21-05/2002</date>
    <text>...</text>
  </ARTICLE>
...
</document>

File2:
<document>
  <article>
    <head>...</head>
    <text>...</text>
    <date>
      <day>10</day>
      <month>05</month>
      <year>2002</year>
    </date>
  </article>
...
</document>

So far i have made a xsl file where i have set a variable to my file2
and then i run through a for-each for file1 and a for-each for file2. So
i get an output file where all articles of file1 are first and then
those of file2 are following. But i want them sorted by the date that
articles of file1 and file2 are mixed. How can i do this?

Thanks,
Sascha Slabschi


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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