xsl-list
[Top] [All Lists]

Re: Joining sibling elements

2005-08-11 03:59:36
Mukul Gandhi wrote:
Hi Marcin,
   I think, in this case we have to follow some hard coding approach.
IMHO, I think there is a point when automation of XSLT Stylesheet
writing is not feasible.

You might be right. That's why I wondered from the start if that's feasible. Note that what I want to achieve is clearly and easily computable in many functional languages (I'm searching forward for a given pattern and applying a kind of compression to the output). Of course, given that XSLT is Turing Machine Equivalent, there must be a way to do this but it could be quite cumbersome.

Yet I can see some other way to do this. I use a template on a <a> level. I call a template which processes the node: If there are two sibling <b> elements with same children, I join d/text() contents adding a space, if not, I output the joined node processed so far (until the position of the following-node) and I call the same template recursively for the rest of the node.

This could work, I think, and should not even be very slow with this recursive processing. But turning this vague idea into code will take me some time :)

Best regards, and thanks again -
        Marcin

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



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