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  |  

$4.95 Windows Hosting at Webhost4life.com
  Ads  
 


  Sponsors  

Meet Our Sponsors

The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
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
 


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.

 


Powered by Adcuent®.Com
Adcuent® Consulting & Technology offers custom development web applications and hosting projects under the brand of Powered by Adcuent®.Com
www.adcuent.com
Easily Build DNN Solutions with XMod
XMod makes it easy to build news articles, house listings, custom feedback forms, product reviews and much more - without programming
www.DNNDev.com
Software Development and Integration with DNN
HNP Solutions focuses on the pragmatic use of technology and process to meet an organization's business objectives. HNP Solutions employs seasoned Enterprise and Solution Architects, Delivery Managers and QA & Business Leads. Our capabilities range from project assessments & recommendations, design & code reviews, to full program implementations. We also work with organizations in need of senior staff augmentation purposes in the areas of Enterprise and Solution architecture.
www.hnpsolutions.com

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