ASP Error: 70
Description: Permission denied
Source: Microsoft VBScript runtime error

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

Re: How to combine consecutive input nodes into one o

Subject: Re: How to combine consecutive input nodes into one output node?
From: JBryant@xxxxxxxxx
Date: Mon, 6 Dec 2004 13:59:31 -0600
xsl nodes combine
Check the following grouping resources:

Jeni Tennison's site: http://www.jenitennison.com/
Dave Pawson's FAQ: http://www.dpawson.co.uk/xsl/sect2/sect21.html

In Dave's FAQ, check both grouping and flat file transformation.

If you want to throw a bigger XML snippet and your shot at an XSL
transformation at the list, you'll probably get some help that way, too.
What you've included here doesn't show much. For example, depending on the
tags that contain the content you've shown, your problem may be as simple
changing how the parent element is handled. As it is, I can't see enough
to be any help (not that I'm a heavy hitter on the list anyway - probably
the best thing I can do is send you to those resources).

Jay Bryant
Bryant Communication Services




Gerald Wharney <geraldwharney@xxxxxxxxxxx>
12/06/2004 12:09 PM
Please respond to
xsl-list@xxxxxxxxxxxxxxxxxxxxxx


To
xsl-list@xxxxxxxxxxxxxxxxxxxxxx
cc

Subject
 How to combine consecutive input nodes into one output node?






Hi

I've only just started working with XML and XSL. What
I'm trying to do is to write a simple XSLT that will
change an Openoffice Writer document into fairly
presentable (X)HTML. I've accomplished most of what I
need to do except the following:

What I need to know is how to transform a bunch of
consecutive similar nodes into a single output node.

For example:

< ... >
<text:p text:style-name="Listing">Line 1</text:p>
<text:p text:style-name="Listing">Line 2</text:p>
<text:p text:style-name="Listing"><text:s
text:c="4"/>Line 3 (indented)</text:p>
<text:p text:style-name="Listing"><text:s
text:c="4"/>Line 4 (indented)</text:p>
<text:p text:style-name="Listing">Line 5</text:p>
< ... >

Here I need to combine all the _consecutive_ <text:p>
nodes which have the attribute "text:style-name" equal
to "Listing" so that the output looks something like:

<p class="Listing>
Line 1
Line 2
    Line 3 (indented)
    Line 4 (indented)
Line 5
</p>

Note that I need to take into account the <text:s>
nodes which provide the spacing and are interspersed
amongst the <text:p> nodes.

Any code, pointers to FAQs/manuals, or even keywords
to Google for will be much appreciated.

tia

=====
--
G W (no bush)



___________________________________________________________
Moving house? Beach bar in Thailand? New Wardrobe? Win #10k with Yahoo!
Mail to make your dream a reality.
Get Yahoo! Mail www.yahoo.co.uk/10k

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.