Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to create a summary for XML data

 
Amit Agarwal
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a java program that generates an XML document containing information on various electrical components in a circuit. I want to make a summary of the components in the circuit and display a report. Is this possible using any of the XML technologies or do I have to write a pure java code for this?
-------------
Amit
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you know the structure of your XML file, then you can write a stylesheet that includes all the summarizing logic.
 
Amit Agarwal
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ajith,
I know the structure of my XML file. I just wanted to know whether it is possible to put a summarizing logic using XSL.
I need to get a sub-total quantity against each category in the summary. is it possible to compute the sub-totals etc. using XSL.
Please tell me any online resources available, which could help me in this. I have seen a tutorial at http://www.w3schools.com/xsl but it does not talk of any type of computations (totals / count).
----------------
Amit
[This message has been edited by Amit Agarwal (edited June 13, 2001).]
 
Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use sum() and count() functions.
These are the best recourses for advanced XSLT:
XSLT Questions and Answers. http://www.dpawson.co.uk/xsl/sect2/sect21.html
Jeni's XSLT Pages: http://www.jenitennison.com/xslt/index.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic