This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

adding unique values to a drop-down list


I have xml that contains loans and their data (which includes broker name 
and id).

I need to add a drop-down of brokers to my page.  Each selection in the list 
box needs to display "Broker Name - Broker Id" and the value of each 
selection must be set to the Broker Id.  These selections must be listed 
alphabetically, with only unique values displayed (no duplicates).

For example:

Example XML:

<Loan>
  <BrokerSet>
    <Broker>
      <Name>ABC Broker</Name>
      <Id>123456</Id>
    </Broker>
  </BrokerSet>
</Loan>
<Loan>
  <BrokerSet>
    <Broker>
      <Name>LMN Broker</Name>
      <Id>345678</Id>
    </Broker>
  </BrokerSet>
</Loan>
<Loan>
  <BrokerSet>
    <Broker>
      <Name/>
      <Id/>
    </Broker>
  </BrokerSet>
</Loan>
<Loan>
  <BrokerSet>
    <Broker>
      <Name>LMN Broker</Name>
      <Id>345678</Id>
    </Broker>
  </BrokerSet>
</Loan>
<Loan>
  <BrokerSet>
    <Broker>
      <Name>ABC Broker</Name>
      <Id>999999</Id>
    </Broker>
  </BrokerSet>
</Loan>

For the xml listed above, the list box should contain the following values:
All Brokers
ABC Broker - 123456
ABC Broker - 999999
LMN Broker - 345678

How do I fill the list box with only unique selections which consist of 
broker name/broker id combinations?
How do I handle loans that do not have broker name or id data?

Thanks,
Katie



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]