Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] select/except based on position()

From: "Michael Kay" <mike@--------.--->
To: <xsl-list@-----.------------.--->
Date: 10/3/2009 10:07:00 AM
(1 to count(/items/item))[. != $num]

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay  

> -----Original Message-----
> From: jesper.tverskov@g... 
> [mailto:jesper.tverskov@g...] On Behalf Of Jesper Tverskov
> Sent: 03 October 2009 10:30
> To: xsl-list@l...
> Subject: [xsl] select/except based on position()
> 
> I would like to generate a sequence of numbers. @no contains a number.
> $num the item position not to be included.
> 
> The following works:
> select="/items/item/@no except /items/item[$num]/@no"
> 
> But I would like to base the selection on position().
> The following first step of the new solution is also working:
> select="/items/item[position() != $num]/@no"
> 
> Now, I would like to drop @no. I only made it up because I 
> couldn't solve my problem without it. @no contains the 
> position of the item!
> 
> The following is the closed I have been able to get so far, 
> but it doesn't work:
> select="/items/item[position() != $num]/position()"
> 
> This is what I want: For an item, return the item positions 
> of the other items.
> 
> Any hints for how to change the select statement?
> 
> Cheers,
> Jesper
> 
> --~------------------------------------------------------------------
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail: <mailto:xsl-list-unsubscribe@l...>
> --~--
> 


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@l...>
--~--



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent