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

Axis specifier questions once again

Subject: Axis specifier questions once again
From: a kusa <akusa8@xxxxxxxxx>
Date: Wed, 11 Nov 2009 13:26:00 -0600
 Axis specifier questions once again
Hi:

I have a nested list like this:

<list1>
<note><para>test</para></note>
  <listlevel>
  sample1
 </listlevel>

<list2>
  <listlevel>
  sample2
 </listlevel>
<list3>

  <listlevel>
sample3
 </listlevel>
</list3>

  <listlevel>
  sample4
 </listlevel>
<list3>

  <listlevel>
  sample5
 </listlevel>
</list3>
  <listlevel>
  sample6
 </listlevel>
<note><para>1 Note</para></note>
<note><para>2 Note</para></note>
<note><para>3 Note</para></note>
</list2>
</list1>

Every listX/listlevel represents a stepX when transformed. StepX is
also a nested list.

So, <list1> would be transformed into <step1><text>sample</text></step1>
<listlevel>
sample
<listlevel>

So in my transformation, the above snippet would transform as follows
with the exception of the last notes where I am having a problem:

<step1>
<note><para>test</para></note>
  <text>
  sample1
</text>
<step2>
    <text>
  sample2
  </text>
<step3>

  <text>
sample3
 </text>
</step3>
</step2>
<step2>
  <text>
  sample4
 </text>
<step3>

  <text>
  sample5
 </text>
</step3>
</step2>
<step2>
  <text>
  sample6
 </text>

<note><para>1 Note</para></note>
<note><para>2 Note</para></note>
<note><para>3 Note</para></note>
</step2>
</step1>

Now, here is my problem. I want the <note> elements at the end of the
last <listlevel> element to come under the last step2 element.

If I use following-sibling::*[self::note], that obviously does not
work because those notes will be displayed even under <step3>.

I am having a hard time coming up with a specific rule for these
<note> elements right under the last listlevel so that theybe
displayed only under that listlevel.

Can anyone please help me here?

Thanks

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.