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

pulling child elements up to sibling level

Subject: pulling child elements up to sibling level
From: "Rick Geimer" <Rick.Geimer@xxxxxxx>
Date: Fri, 23 May 2003 09:28:53 -0700
unordered list child
Ok, It has been a while since I played around with XSLT, and my brain is a
little rusty. I can't seem to figure out how to do the following task. I
have instances where the source DTD allows markup like the following:

<?xml version="1.0"?>
<doc>
<para>Here is a <emphasis>paragraph</emphasis>with
      <unordered.list>
            <list.item>unordered</list.item>
            <list.item>lists</list.item>
      </unordered.list>
and
      <ordered.list>
            <list.item>ordered</list.item>
            <list.item>lists</list.item>
      </ordered.list>
embedded inside of it along with some <emphasis>formatting</emphasis>
tags</para>
</doc>

My target schema only allows lists and such as siblings of paragraphs, thus
I need to transform the document into something like this:

<?xml version="1.0"?>
<doc>
<para>Here is a <emphasis>paragraph</emphasis>with</para>
<unordered.list>
      <list.item>unordered</list.item>
      <list.item>lists</list.item>
</unordered.list>
<para>and</para>
<ordered.list>
      <list.item>ordered</list.item>
      <list.item>lists</list.item>
</ordered.list>
<para>embedded inside of it along with some <emphasis>formatting</emphasis>
tags</para>
</doc>

Any help would be appreciated, since my brain refuses to leave procedural
mode this morning no matter how much coffee I feed it.

Rick




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.