[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Grouping using concatenated key


Subject: Re: [xsl] Grouping using concatenated key
From: jmcreynolds@xxxxxxxxxxxxxx
Date: Mon, 11 Dec 2006 10:36:21 -0600 (CST)

David,
Thanks again for your help.  It does help if the person seeking help
follows the rules, no? :)  Sorry for not adhering to the guidelines of the
group...

Here is the abbreviated XML representation that I am working with:

<NewDataset>
  <BillDetail>
    <OBLIGATION_ID>2750</OBLIGATION_ID>
    <PHONE_NUMBER>1234567890</PHONE_NUMBER>
  </BillDetail>
  <BillDetail>
    <OBLIGATION_ID>2750</OBLIGATION_ID>
    <PHONE_NUMBER>9876543210</PHONE_NUMBER>
  </BillDetail>
  <BillDetail>
    <OBLIGATION_ID>3940</OBLIGATION_ID>
    <PHONE_NUMBER>1234567890</PHONE_NUMBER>
  </BillDetail>
</NewDataset>

Does this clarify things?

Many thanks (yet again!),

JOHN
>
>    <xsl:template match="/">
>
> so you are at the document root. in a well formed document there can
> only be exactly one element child of / so
>
>  <xsl:for-each
> select="BillDetail[
>
> you are for-eaching over at one element so grouping is not going to be
> very interesting.
>
> i suspect that you have multiple BillDetail elements and they have a
> parent element, in which case you should (or could) put the grouping
> code  in the template for that element.
>
> Please see the posting guidelines at the list home page, which suggests
> posting _complete_  _small_ examples. Your posted input was quite large
> but has lots of detail not relevant to the problem   (<FROM_CITY> and
> friends) but isn't a well formed document as the two elements have no
> parent element so peopel can't post code that actually runs on your
> example.
>
> David


Current Thread
Keywords
xml