xsl-list
[Top] [All Lists]

[xsl] combine on key and dedupe

2010-03-22 20:38:45
Any advice on how to do the following would be greatly appreciated. I
need to combine and dedupe a list of authors, compiling all children
of grouped <author> into one <author> (grouped on <authorizedName>),
but deduping the <authorizedName>. See example below. I think I need
to use an XSL 2.0 for-each-group, but am not sure how. Duplicate
author elements will not be adjacent to each other. Thanks for any
help!

Two author records for the same <authorizedName>:

<author>
  <authorizedName>Joe Bob</authorizedName>
  <nickName>J-Bob</nickName>
  <title>Title1</title>
</author>

<author>
  <authorizedName>Joe Bob</authorizedName>
  <nickName>Joe</nickName>
  <title>Title2</title>
</author>

Turn into a single author record, compiling all children but deduping
<authorizedName>:

<author>
  <authorizedName>Joe Bob</authorizedName>
  <nickName>Joe</nickName>
  <nickName>J-Bob</nickName>
  <exampleTitle>Title1</exampleTitle>
  <exampleTitle>Title2</exampleTitle>
</author>

--~------------------------------------------------------------------
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>