Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Maximum ASP
  Ads  
Active Modules -- Active Forums for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  User Defined Ta...  Formatting Output
Previous Previous
 
Next Next
New Post 6/9/2008 4:23 AM
Resolved
User is offline msmith_lv
38 posts
10th Ranked


formatting Output 

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 7:11 AM
User is offline Stefan Cullmann
1553 posts
5th Ranked








Re: formatting Output 

 

resource:
http://www.w3schools.com/xsl/el_decimal-format.asp  


Stefan Cullmann - stefan.cullmann [at] dotnetnuke.com
form and List will be the successor of the User Defined Table module.
----------------------------------------------------------------------
Do you want to import external data to form and List /User Defined Table?
Check out http://www.codeplex.com/Csv2UDTImport
 
New Post 6/12/2008 3:22 AM
User is offline msmith_lv
38 posts
10th Ranked


Re: formatting Output 

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 3:51 AM
Accepted Answer 
User is offline Stefan Cullmann
1553 posts
5th Ranked








Re: formatting Output 

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


Stefan Cullmann - stefan.cullmann [at] dotnetnuke.com
form and List will be the successor of the User Defined Table module.
----------------------------------------------------------------------
Do you want to import external data to form and List /User Defined Table?
Check out http://www.codeplex.com/Csv2UDTImport
 
New Post 6/13/2008 11:34 PM
User is offline msmith_lv
38 posts
10th Ranked


Re: formatting Output 

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 Previous
 
Next Next
  Forum  DotNetNuke® Pro...  User Defined Ta...  Formatting Output
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Cygnusoft Custom Software
Cygnusoft has been providing cutting-edge custom software solutions for 20 years. Cygnusoft is also a leading start-up incubator, helping our partners build successful new businesses.
www.cygnusoft.com
Digicon: DotNetNuke design and development
Digicon is based in Brisbane, Queensland, Australia
digicon.com.au
Live Visitor Tracking & Live Chat For DotNetNuke
Track your visitors in real time and add live chat for sales & support. Free Trial.
www.whoson.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP