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]

processing unique elements (as indicated by id attribute) once


Greetings -

I am struggling with a solution for the following:

I have an input xml file with a mix of well formed
HTML and some custom elements.  I want to be able to
process the custom elements once for each unique
element (for these purposes I am using the id
attribute of the element to determine if it is
unique).

Here is sample input:


<page>
  <gfeRepetition>
    <table>
      <gfeElement id="name1" method="name1">
        Element1
      </gfeElement>
      <gfeConditional id="cond2" test="test2">
	<gfeElement id="name1" method="name1">
           Element1
        </gfeElement>
	<gfeElement id="name2" method="name2">
           Element2
        </gfeElement>
      </gfeConditional>
      <gfeConditional id="cond2" test="test2" 
negate="true">
	<gfeElement id="name1" method="name1">
           Element1
        </gfeElement>
	<gfeElement id="name2" method="name2">
           Element2
        </gfeElement>
      </gfeConditional>
    </table>
  </gfeRepetition>
</page>

I have struggled with several different approaches -
but am unable to get any of them to do what I need.

Any suggestions as to how to accomplish this are
appreciated.

Thanks - Gary Bartlett

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

 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]