xsl-list
[Top] [All Lists]

Re: [xsl] Grouping using concatenated key

2006-12-11 09:36:48
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

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




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