Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 8th, 2009, 08:46 AM
Authorized User
 
Join Date: May 2008
Posts: 31
Thanks: 6
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rangeshram
Default

From the above XSL: I have modified and rewritten the xsl for XPATH:

<xsl:template match='list[@type="number"]/listItem/para'>
<LI Style="list-style-type: arabic; font-family: Times New Roman; font-size:9pt; font-weight:normal;">
<xsl:apply-templates/>
</LI>
</xsl:template>

<xsl:template match='list[@type="number"]/list[@type="number"]'>
<xsl:apply-templates/>
</xsl:template>

<xsl:template match='list//list/listItem/para'>
<LI Style="list-style-type: arabic; font-family: Times New Roman; font-size:9pt; font-weight:normal;">
<xsl:apply-templates/>
</LI>
</xsl:template>

Please correct me the xpath for matching nested para element in the list tag.

Expecting your reply...
 
Old December 8th, 2009, 08:59 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Did my XSLT not work? If it didn't work what was the output you got and what was the output you were expecting?

You are repeating the same error here - running xsl:apply-template when the current context is the <para> element - the <para> element does not have any children, therefore this is never going to output anything.
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Grouping the nested list accroding to the level priyan24 XSLT 2 November 17th, 2009 07:17 AM
How to make a nested list tag that is valid? chobo2 CSS Cascading Style Sheets 1 April 21st, 2009 04:07 AM
extract nested list JohnBampton XSLT 3 February 26th, 2009 06:14 AM
Nested Bullet List tims XSLT 1 May 8th, 2008 06:37 AM
To get a list of specific tag from xml using v JelfMaria VB How-To 0 January 11th, 2005 07:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.