Re: [xsl] Re: Unwrapping trees

Subject: Re: [xsl] Re: Unwrapping trees
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Fri, 14 Jun 2002 10:57:54 +0100
Dimitre,

> The following transformation:
[snip]

Next challenge... Using the stylesheet you recommended on the
following:

unwrapB.xml:
-----------
<p>
  text1
  <a href="1">
    text2
    <span>
      <a href="2">
        text3
        <a href="3">text4</a>
        text5
      </a>
      text6
    </span>
    text7
    <span>
      <a href="4">text8</a>
      text9
    </span>
    text10
  </a>
  text11
</p>

produces:

<p>
  text1
  <a href="1">
    text2
    
    text7
    </a>
   <span>
      <a href="2">
        text3
        <a href="3">text4</a>
        text5
      </a>
      text6
    </span>
   <span>
      <a href="4">text8</a>
      text9
    </span>
   <a href="1">
    text7
    
    text10
  </a>
  text11
</p>

I'm guessing, but I think Norm would like it to produce:

<p>
  text1
  <a href="1">
    text2
  </a>
  <span>
    <a href="2">
      text3
    </a>
    <a href="3">text4</a>
    <a href="2">
      text5
    </a>
    text6
  </span>
  <a href="1">
    text7
  </a>
  <span>
    <a href="4">text8</a>
    text9
  </span>
  <a href="1">
    text10
  </a>
  text11
</p>

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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


Current Thread