Subject: Re: [xsl] Plse Help! something to do with counter.... From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx> Date: Wed, 2 May 2001 11:12:10 +0100 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Plse Help! something to d, Poh Justin KT | Thread | Re: [xsl] Plse Help! something to d, Poh Justin KT |
RE: [xsl] How does XSLT deal with i, Michael Kay | Date | [xsl] using XSL with SAX or DOM par, Sebastian Schirmer |
Month |