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

Re: Output is incorrect...

Subject: Re: Output is incorrect...
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 29 Sep 2000 19:13:39 GMT
Re: Output is incorrect...
> However, when id=_2, I seem to get the
> contents of the "art" nodes

you haven't specified a template for cat elements that don't have
@id=$id so you get the default one, which drops through to th eart
elements, and seing as there isn't a template for those either
you'll get the character data of their content.

If you specify _0 you trap everything at th etop
if you specify _1 you get _1 stuff as you expect
and the default template is applied to _2 but there is no pcdada content
in that branch so you see nothing wrong.
If you specify _2 then you get all the pcdata in every other branch.

add 
<xsl:template match="cat"/>

to your stylesheet to kill off all the cats by default and just let
through the one with the more specific

<xsl:template match="cat[@id=$id]">

David


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.