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

Transforming an XML document where the content isn't i

Subject: Transforming an XML document where the content isn't in a special tag
From: Noam Raphael <noamraph@xxxxxxxxx>
Date: Wed, 17 Aug 2005 04:00:36 +0200
noam raphael
Hello,

I'm very new to XSL, so please forgive me if this question is stupid.

I want to transform an XML document which looks like this:

=====================
<header>
First Section
</header>
This section deals with a lot of <a href="bla.htm">things</a>.
One of them, is...

<header>
Second Section
</header>
Now, this section is different, becase...
=====================

into this HTML:

=====================
<h1>First Section</h1>
<p>This section deals with a lot of <a href="bla.htm">things</a>.
One of them, is...</p>
<h1>Second Section</h1>
<p>Now, this section is different, bacause...</p>
=====================

I have a problem with adding the <p></p> tags. The problem is that
their locations depends on the <header> tags. I can, of course, add a
</p> before a header and a <p> after it, but I'll get an extra one at
the beginning and at the end. Can I do this transformation with XSL?
(If it matters, I used <xsl:for-each select="text() | *">)

Thank you very much,
Noam Raphael

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.