473,395 Members | 2,689 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Unable to identify the level for Nested List inside an order list

Unable to identify the same level for nested lists in all scenarios, when the nested-list inside an ordered list the conversion process executes with out proper list order for nested list items. The Ordered / Un-ordered lists are not recognized in case of nested lists.

Example:
Expand|Select|Wrap|Line Numbers
  1. <ordered-list token="digit">
  2.     <item>
  3.         <para>I Item of I</para>
  4.     </item>
  5.     <item>
  6.         <para>Nested 1</para>
  7.         <ordered-list token="uc-letter">
  8.             <item>
  9.                 <para>1st Item of 1st</para>
  10.             </item>
  11.         </ordered-list>
  12.         <ordered-list token="lc-letter">
  13.             <item>
  14.                 <para>2nd Item of 1st</para>
  15.             </item>
  16.         </ordered-list>
  17.     </item>
  18. </ordered-list>
  19. <ordered-list token="digit">
  20.             <item>
  21.                 <para>3rd Item of 1ast</para>
  22.             </item>
  23. </ordered-list>
The output should be

1. I Item of I
2. Nested 1
A. 1st Item of 1st
a. 2nd Item of 1st
1. 3rd Item of 1ast

But with the current scenario we are getting
1. I Item of I
2. Nested 1

A. 1st Item of 1st
B. 2nd Item of 1st
2. 3rd Item of 1ast

This process is while converting the XML file to a word document with .Net process of wordML processing. Need changes in XSLT file.
May 21 '10 #1
3 2451
jkmyoung
2,057 Expert 2GB
Need to see your xslt for more details. Are you using the for-each, or template method?
May 21 '10 #2
Thanks for the response. We are using for-each.

Expand|Select|Wrap|Line Numbers
  1. <xsl:when test="not(contains($ancestor-names-ftnote-listitempara,'ftnote'))">
  2. <xsl:for-each select="./ancestor::*">
  3. <xsl:value-of select="../@*"/>
  4. </xsl:for-each>
  5. <w:listPr>
  6.        <w:ilvl w:val="{$level}"/>
  7.       <w:ilfo w:val="{$ilfo}"/>
  8. </w:listPr>
  9.  
  10. </xsl:when>
In this i the level value is getting properly implemented, but i am not able to identify the inner list with same level to check the <ordered-list> and <ordered-list>. Hence the nested list items are not properly getting changes. For the sequense nested list the value is continuing with the first list value. If we mention the uc-letter, it should start with capital A. But itis continuing with (b). Please suggest.
May 24 '10 #3
jkmyoung
2,057 Expert 2GB
What is the encompassing for-each or template match?
Where are you setting the variable $ilfo?
May 25 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: roopa | last post by:
I have declared a class with name List; and in main() function, i have declared the List object as follows class List { public: List() { cout<<"In List Constuctor";
5
by: Zero.NULL | last post by:
My multiple level nested corelated query is not fetching correct result. It work fine on small set of data, but fails on larger set of data. Any clue? Explaining data storing and discussing...
2
by: ormy28 | last post by:
I really need some help with the following problem if anyone would be willing. I need a list box to list the opposite of what appears in a query. Heres the details: My database is for a...
7
by: Michael Birkmose | last post by:
Hi, Using gcc the following is possible: int some_function(struct local_struct { int member;} a); This function takes one parameter "a" of the type struct local_struct. This type is...
2
by: | last post by:
Hi I'm trying to have a drop down list inside a repeater where the data for the list is extracted from a database along with other items but I can't seem to get it to work for the list. My...
5
by: =?Utf-8?B?U3dhcG5pbA==?= | last post by:
hi, I want to copy the elements of one list to the other list. Is there any function to do this operation in C#. Plz explain with example.
11
by: Pieter | last post by:
Hi, I have a class clsSubClass which inherits from clsClass. When I instantiate an object of clsClass (MyClass), and I instantiate an object from clsSubclass (MySubClass) I can do an "MyClass...
11
by: keirnus | last post by:
Hello, Is it possible to add checkboxes inside a list box? Scrolling down the items will scroll down the checkboxes as well. I can't add directly the checkbox inside the list box using the...
11
by: mathieu | last post by:
Hi there, I am trying to write something very simple to test if a list contains another one: a = b = but 'a in b' returns False. How do I check that a is indeed contained
0
by: Rusalex | last post by:
Hi everyone, I need to write a 16 level nested stored procedure. I wrote the code but when I run my program only 4 levels run. It doesn't matter what number of stored procedure is at the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.