|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: a nicer total sibling count than this
Macaulay,Malcolm (US) wrote:
that's not quite the case. What I'm needing to do is number *all* the defs if there are more than one. F'rinstance, given: <psp type="n">
<def>physical or mental ...</def>
<def>a condition in which ...</def>
</psp>I would want: 1 physical or mental ... 2 a condition in which ... Using the stylesheet including '<xsl:if test="preceding-sibling::def">' gives me physical or mental ... 2 a condition in which ... -> the first def isn't getting numbered. Blame the weirdness on dictionary conventions. Thanks also to Wendell, whose "count(../def) > 1" expression is probably the easiest to understand of all the solutions, and to Dimitre's "preceding-sibling::def or following-sibling::def" solution is very efficient and logical. Stewart XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








