[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|