User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the XML, XSLT and XPATH section within the Software Development category of DaniWeb, a massive community of 428,368 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,474 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our XML, XSLT and XPATH advertiser: Programming Forums
Views: 627 | Replies: 1
Reply
Join Date: May 2008
Posts: 1
Reputation: timar is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
timar timar is offline Offline
Newbie Poster

Copy all node till occurence of next li in xslt 1.0

  #1  
May 12th, 2008
Hi I need to convert below part
<ul>
<li id="L_115775_tr">
<span>
<a href="http://support.microsoft.com/ph/11732" id="L_115775">Windows Vista Solution Center</a>
</span>
<li id="L_116381_tr">
<span>
<a href="http://support.microsoft.com/ph/8722" id="L_116381">Windows Internet Explorer 7 Solution Center</a>
</span>
<li id="L_125705_tr">
<span>
<a href="http://support.microsoft.com/ph/1173" id="L_125705">Windows XP Solution Center</a>
</span>
<li id="L_147192_tr">
<span>
<a href="http://support.microsoft.com/gp/cp_email" id="L_147192">E-mail Solution Center </a>
</span>
<li id="L_140164_tr">
<span>
<a href="http://support.microsoft.com/ph/8753" id="L_140164">2007 Microsoft Office Suites Solution Center</a>
</span>
</li>
</li>
</li>
</li>
</li>
</ul>

To

<ul>
<li id="L_115775_tr">
<span>
<a href="http://support.microsoft.com/ph/11732" id="L_115775">Windows Vista Solution Center</a>
</span>
</li>
<li id="L_116381_tr">
<span>
<a href="http://support.microsoft.com/ph/8722" id="L_116381">Windows Internet Explorer 7 Solution Center</a>
</span>
</li>
<li id="L_125705_tr">
<span>
<a href="http://support.microsoft.com/ph/1173" id="L_125705">Windows XP Solution Center</a>
</span>
</li>
<li id="L_140164_tr">
<span>
<a href="http://support.microsoft.com/ph/8753" id="L_140164">2007 Microsoft Office Suites Solution Center</a>
</span>
</li>
</ul>

Basically it should copy all nodes and attributes till occurence of next <li> . Same process should be repeated for all <li> using xslt 1.0
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2008
Posts: 6
Reputation: ganymede is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ganymede ganymede is offline Offline
Newbie Poster

Re: Copy all node till occurence of next li in xslt 1.0

  #2  
May 25th, 2008
Wow, nice challenge,

In this case, I think i will use an apply-template on <li> element so I don't have to worry about the hierarchy.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb XML, XSLT and XPATH Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the XML, XSLT and XPATH Forum

All times are GMT -4. The time now is 6:54 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC