[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] inserting an element (was: Up-conversion using XSLT 1.0)


Subject: [xsl] inserting an element (was: Up-conversion using XSLT 1.0)
From: Manfred Staudinger <manfred.staudinger@xxxxxxxxx>
Date: Sun, 23 Oct 2005 09:43:24 -0700

Hi all,
I've the following input document:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="../view-list.xsl" type="text/xsl"?>
<doc>
text-1
text-1
<div class="index">
elements in div
</div>
  text-2-1
  text-2-2
<ul>
text in ul
text in ul
</ul>
  text-2-3
  text-2-4
  text-2-5
text-4
text-4
</doc>
Each text-2 line starts with 3 blanks, there can be 0-10 ul-elements anywhere
between or immediate after text-2. The lines "text in ul" are
processed by using
a named template (not shown here).

I would like to insert an element "zitat" as a parent for "ul" and
text-2 using XSLT 1.0.
...
<zitat>
  text-2-1
  text-2-2
<ul>
text in ul
text in ul
</ul>
  text-2-3
  text-2-4
  text-2-5
</zitat>
...
The stylesheet for my unsuccessful attempt to achieve this may be
found in the Archive:
Subject: [xsl] Up-conversion using XSLT 1.0; Date: Mon, 17 Oct 2005
09:16:10 -0700

Any comments will be appreciated.
Regards, Manfred Staudinger, Vienna


Current Thread
Keywords