xsl-list
[Top] [All Lists]

Re: Eliminating duplicate nodes

2002-10-12 16:00:23
Hi Mac,

you must tell us, how you define "duplicate nodes". In your XML the following snippet is obviously duplicate:

>       <panel id="selection">
>         <label id="selection">Select the template type:</label>
>         <button id="download">Download New Templates</button>
>         <label id="detail"></label>
>       </panel>

But what is when one of the text nodes is different or the button has another id, but the rest is the same? Tell us the rules for identity.

Another question is what you are doing with <xsl:call-template/>. This often breaks normal XML tree processing.

Did you have already a look at http://www.jenitennison.com/xslt/grouping/muenchian.xml? Can you post a bit of your non-working code?

Regards,

Joerg

Mac Martine wrote:

Hi-
 I am trying creating an HTML page from XML/XSL.
I want to eliminate duplicate nodes, and it seems like there are 2 ways
to do this: using variables, and using keys. But I haven't gotten either
to work yet.
Could someone recommend which method would be better, and maybe help get
me started on the right path?

Below is a little snippet of my xml:
I use <call-template> when I hit nodes of a certain name

Thanks-
 Mac

<desktop>
          <label id="titleBar"></label>
      <panel id="selection">
        <label id="selection">Select the template type:</label>
        <button id="download">Download New Templates</button>
        <label id="detail"></label>
      </panel>
      <panel id="style">
        <label id="style">Choose your Slideshow style:</label>
        <label id="preview"></label>
      </panel>

         <label id="titleBar"></label>
      <panel id="selection">
        <label id="selection">Select the template type:</label>
        <button id="download">Download New Templates</button>
        <label id="detail"></label>
      </panel>
      <panel id="style">
        <label id="style">Choose your Slideshow style:</label>
        <label id="preview"></label>
      </panel>
</desktop>


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



<Prev in Thread] Current Thread [Next in Thread>