xsl-list
[Top] [All Lists]

[xsl] Group by parameter tag

2009-03-25 06:15:58
Hello everybody!

I have this .xml file:

<?xml version="1.0" encoding="windows-1252"?>
<file xmlns="http://bibtexml.sf.net/";>
   <entry id="art">
    <article>
      <author>Isabel Menéndez and Luis Gomez</author>
      <note>note1</note>
      <note>note2</note>
    </article>
  </entry>
  <entry id="boo">
    <book>
      <author>John Boyne</author>
      <note>note3</note>
    </book>
  </entry>
<entry id="conf">
    <conference>
      <title>One title</title>
      <note>note4</note>
      <note>note5</note>
     <note>note6</note>
    </conference>
  </entry>

<entry id="inb">
    <inbook>
      <title>The Title</title>
      <number>3</number>
    </inbook>
  </entry>

</file>


I need one template (version 1.0 or 2.0) to group by tags note separated by "and" words, but I have a problem. Really, the tag I must group by, must come like a parameter. This is, I dont know really the tag name I must group by. The result must be:


<?xml version="1.0" encoding="windows-1252"?>
<file xmlns="http://bibtexml.sf.net/";>
   <entry id="art">
    <article>
      <author>Isabel Menéndez and Luis Gomez</author>
      <note>note1 and note2</note>
    </article>
  </entry>
  <entry id="boo">
    <book>
      <author>John Boyne</author>
      <note>note3</note>
    </book>
  </entry>
<entry id="conf">
    <conference>
      <title>One title</title>
      <note>note4 and note 5 and note6</note>
    </conference>
  </entry>

<entry id="inb">
    <inbook>
      <title>The Title</title>
      <number>3</number>
    </inbook>
  </entry>

</file>


Could anybody help me?
Thank You, Regards

Izaskun Gutierrez



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

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