Win a copy of Java by Comparison (eBook) this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help in XSL  RSS feed

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have an input XML file in which a node has an attribute value like "20020412", which is nothing but a date.(Century+Year+Month+Day) I have an XSL file to fetch the contents from the XML file and present it. The problem is that, how to get the attribute value like "20020412" and print it like "04/12/2002" format. Is there any function available in XSL? Please help me...
 
Ranch Hand
Posts: 1011
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. There is a XSLT function you can use:
format-number().
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!