|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSLT filter syntax advice?
At 2009-11-25 23:04 -0500, Doug Meade wrote:
Hey folks - You don't show the syntax that isn't working, so it is difficult to guess where you are going wrong. I assume I need to pass the category as a parameter, but still not getting it quite right. No, I'm not sure what you mean by a "parameter" as there are no functions being called. My guess is you are using /Catalog/Category/Item to display the items ... which, of course, displays all items each time you use that address. If this is your case, you need to instead use a relative address: <xsl:for-each select="/Catalog/Category">
...stuff for category...
<xsl:for-each select="Item">
...stuff for the item within the category...
</xsl:for-each>
</xsl:for-each>But, as I said, I'm only guessing what you are doing wrong. Look for discussions of relative XPath addresses. You position yourself in the document node tree and then use relative addresses to get information that is relative hierarchically to your point. *If* your information were relative as siblings then you would need to look into grouping rather than into hierarchy, but given your example, grouping isn't what you need here. I hope this helps. . . . . . . . . . . Ken
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






