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

Re: Descendant::??

Subject: Re: Descendant::??
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Tue, 22 Apr 2008 19:27:45 +0200
Re:  Descendant::??
Dan,

In all your replies and examples you fail to show that you apply xsl:apply-templates somewhere in your matching template. Hence, it can only match once, because you instruct the processor *not* to continue.

Don't start trying difficult axes when you don't need to (sell, the descendant axis is not difficult, but all you need is the default child axis). Like I said in a previous post: try to keep it simple at first. Also, try the fully working example of David Carlisle sent in this thread, four messages prior to this one (and answer his post, he took the time to create a working example).

On a side note: keep the mail subject intact while in the same thread, that is easier for the archive, which is collected per subject.

Kind regards,
-- Abel Braaksma

Dan Acuff wrote:
Do I want to use the Descendant predicate to get all nodeset children of
the one I match on?

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output encoding="UTF-8" method="html" version="4.01"
omit-xml-declaration="yes" media-type="text/html"/>
<!-- value passed dynamically via asp -->
<xsl:param name="paraCatagory"/>
<xsl:template match="menu">
<xsl:apply-templates
select="descendant::category[@name=$paraCatagory]"/>
</xsl:template>
<xsl:template match="category">
<div class="cat_module">
<xsl:value-of select="category/@display_name"/>
<br/>
<a href="{category/info/link}">
<img src="{category/info/images/image}"/>
</a>
</div>
</xsl:template>
</xsl:stylesheet>

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.