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]

Re: Unwrapping trees


/ Jeni Tennison <jeni@jenitennison.com> was heard to say:
| If I had to use XSLT for some reason, then I'd do a two-step
| transformation. First, create a flattened start/end structure,
| something like:

Ah, yes. Thank you, Jeni.

| I'm a bit confused, though, by the fact that the text 'text' within
| the span element *isn't* within the second half of the wrapping a
| element. I would have expected you to want:

Let's try again:

<p>
  text
  <a href="1">
    text
    <span>
      <a href="2">test</a>
      text
    </span>
    text
  </a>
  text
</p>

into

<p>
  text
  <a href="1">
    text
    <span/>
  </a>
  <span>
    <a href="2">test</a>
  </span>
  <a href="1">
    <span>
      text
    </span>
    text
  </a>
  text
</p>

| so before I start thinking about the actual XSLT, can you confirm that
| the rule is that if an element within an a element contains another a
| element, then that element is put at the same level as the containing
| a element?

I can't quite parse that at 7am. Uhm, but the rule is "pull the nested anchors"
to the top so they aren't nested anymore without otherwise changing the markup
to the greatest extent possible.

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@Sun.COM   | Men are more like the times they live in than
XML Standards Engineer | they are like their fathers.--Ali Ibn-abi-talib
XML Technology Center  | 
Sun Microsystems, Inc. | 

 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]