[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Joining sibling elements

Subject: Re: Joining sibling elements
From: Marcin Miłkowski <milek_pl@xxxxx>
Date: Thu, 11 Aug 2005 12:59:36 +0200
Re:  Joining sibling elements
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.