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

Re: Plse Help! something to do with counter....

Subject: Re: Plse Help! something to do with counter....
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Wed, 2 May 2001 11:12:10 +0100
Re:  Plse Help! something to do with counter....
Hi Justin,

> Hi, Thanks! It instead solve much of my problems but if I want to
> omit any one of the Resource element, for e.g I don't want to have a
> checkbox for the 3rd element but I still want to display other
> values of this element, and at the same time the value attribute of
> the checkbox will still be in consecutive numbers. position() don't
> seem to be able to work this way...

If you want to omit a Resource element, then don't select it with the
xsl:apply-templates.  So for example, if you don't want to get a
checkbox for the third Resource element, then use:

  <xsl:apply-templates select="List/Resource[position() != 3]" />

If you want to select the Resource elements that have a type attribute
equal to 'checkbox' then use:

  <xsl:apply-templates select="List/Resource[@type = 'checkbox']" />

The nodes that you select are the nodes that make up the current node
list, and the ones against which the position of the particular
Resource element you're processing will be judged.

If there are more technical details about which Resource elements
should be turned into checkboxes and which not, or about the output
that you want, then you should post them.  We don't mind complicated
XML, but the XSLT that's appropriate might change quite radically
depending on the technical details of your problem, so if the above
isn't appropriate, then do give us a sample of your source and what
you want as output.

I hope that helps anyway,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



 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.