Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListFormatting OutputFormatting Output
Previous
 
Next
New Post
6/9/2008 6:23 AM
 

Could use some help formatting numeric output in my xsl files, to include comma separators and fixed decimals.  That is, I want to display integers in the format  '99,999' instead of '99999', and numbers as '99.99' instead of '99.999999999999'

Can someone provide the syntax, or point me to a resource?

Much obliged!

 
New Post
6/11/2008 9:11 AM
 
 
New Post
6/12/2008 5:22 AM
 

I really appreciate the lead, it looks like a good resource.

If I could impose one more time... when I translated their example code to my installation I got a compile error. Their example has only one data element, where I have almost 500 lines of code and about 30 data fields, so I think perhaps I am not nesting the formatting tags correctly (I am using the master-detail schema). Can you give me bit more guidance?

For example, <xsl:template> tags already exist in the file. Do I also add the <xsl:template match="/"> tag pair from the example, and if so, where exactly does it go in the hierarchy? Also, do I need to do anything with the formatting fields in the individual data columns in "Manage User Defined Table" view, or is that only applicable to the default grid?

I really appreciate your help. The module documentation does not address this issue at all.

-Michael

 
New Post
6/13/2008 5:51 AM
Accepted Answer 

If you have a column "ANumber", the token2XSL Editor will generate

     <xsl:value-of select="udt:ANumber" disable-output-escaping="yes" />

If you want to apply number formatting, you will need to call the format-number function.

    <xsl:value-of select="format-number(udt:ANumber,'###,##0')" disable-output-escaping="yes" />

The formating setting is currently ignored inside XSL and only applied to the default grid. I added it as enhancement request: http://support.dotnetnuke.com/Default.aspx?p=15&i=7901

 
New Post
6/14/2008 1:34 AM
 

Stefan:

That worked, THANK YOU!

I'm finding that this is really a powerful module, it just takes a lot of tweaking to get it to do exactly what you want. I'm looking forward to the next release!

-Michael

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListFormatting OutputFormatting Output


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out