This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Re: Unwrapping trees
- From: Dimitre Novatchev <dnovatchev at yahoo dot com>
- To: Jeni Tennison <jeni at jenitennison dot com>
- Cc: xsl-list at lists dot mulberrytech dot com
- Date: Fri, 14 Jun 2002 03:28:02 -0700 (PDT)
- Subject: Re: [xsl] Re: Unwrapping trees
- Reply-to: xsl-list at lists dot mulberrytech dot com
--- Jeni Tennison <jeni@jenitennison.com> wrote:
> 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:
>
Hi Jeni,
You're completely right -- in case we have to guess what the structure
of the source xml document is, it is not possible to state that a
particular transformation is the solution to the problem -- the problem
is not specified precisely.
In particular, I thought that nested a's will always be children of a
span.
I think that precisely defining the structure of the input is more than
halfway progress towards a solution.
Cheers,
Dimitre.
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list