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

Wrapping pieces of content separately

Subject: Wrapping pieces of content separately
From: <Emily.Garrett@xxxxxxxxxxx>
Date: Thu, 24 Aug 2006 14:41:09 -0400
nested p content
I'm trying to convert XML into WordML and going from a recursive
structure to linear is difficult.  I  would like to try to read in XML
and output in tags like this in a recursive (normal) manner as an
intermediate step:

<p>title</p>
<p>paragraph</p>
<p>Here is a table from <r>hyperlink</r> which is below. <table>sldfkj
lsdfj lsd f</table> The above table was very small. <ul> <p>list
title</p> <p><li>Item 1</li></p><p><li>Item 2</li></p>The rest of it.
</p>

I would want to end up with this structure shown below (I don't need to
keep the <ul>), where I would take the nested <p> elements out and
structure them in a linear manner.  The content in the root level <p>
gets wrapped in separate <p> elements. This is the structure I need to
create,  but I would use WordML format in this step.:

<p>title</p>
<p>paragraph</p>
<p>Here is a table from <r>hyperlink</r> > which is below. </p>
<table>sldfkj lsdfj lsd f</table>
<p>The above table was very small. </p>
<p>list title</p>
<p><li>Item 1</li></p>
<p><li>Item 2</li></p>
<p>The rest of it.</p>

The problem is that content at the root needs to be in <p> tags, such as
"The above table was very small" and "The rest of it".   How do I
instruct the processing of it, not knowing the order?   Using
xsl:apply-templates will put <p> elements nested in other <p> elements
which won't work.  I need them to be divided into linear segments. I
thought if I could change them into a simpler set of tags, it might be
easier.  But I may not even need the intermediate step.

Thanks for any help you can provide.


Emily Garrett

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.