BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


Uncategorized
swapping two integer values without using temporary
Debugging script
Combinations of k out of n numbers
Permutations of the values of N nodes
What is BEEP (BXXP)?
Family Tree maker
Alternative Ordering - ""Women and Children to the lifeboats first""
Meta-Patterns: Design Patterns Explained
XML Helper functions in Visual Basic
nodeset of child templates using document()
Converting INI files to XML
Table with more than one column
Create an N-Column Table from XML node-set
Fullxml 2
Randomization of node-sets or node-lists
Sorting the results and use the Axis
Finding the Maximum Date
TreeMaker
XMLEditor - WebClipping
RSS / RDF Newsfeed Reader


 
 

<< System.XMLWCF, WS, SOAP >>


By Don Kackman
First Posted 10/01/2001
Times viewed 121

A simple template to display singular and plural counts


Summary Wraps up the logic for displaying the count of items.

I've found that when you are summarizing data you always come up against this situation: You application needs to display a string like this: This item has 1 child or This object has 2 children The easiest thing is to do something like This item has 1 child object(s) which always bugs me. So here is a simple XSLT template for doing the count and selecting the correct singular or plural modifier:

Additional information


Rate this article on a scale of 1 to 10 (0 votes, average 0)

Your vote :  

<< System.XMLWCF, WS, SOAP >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML