Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

how to write an XSL for summing


This topic is 7739 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Hi

I want to sum up the bundle prices for which bundle id are equal. see the following flat XML. I am writing a xsl which transforms the flat xml into another xml. please tell me the logic and syntax of summing only the bundle prices which have equal bundle ids.

mainly i want a logic and syntax of xsl and xpath. i am attatching the xsl file also.

<ROWSET>

<RESPONSE>

<SERVICE_TYPE_ID>1</SERVICE_TYPE_ID>

<SERVICE_TYPE>credit</SERVICE_TYPE>

<SERVICE_TYPE_DESCRIPTION>Title Services</SERVICE_TYPE_DESCRIPTION>

<PRODUCT_CATEGORY_ID>1</PRODUCT_CATEGORY_ID>

<PRODUCT_CATEGORY>MultiCategory</PRODUCT_CATEGORY>

<PRODUCT_CATEGORY_DESCRIPTION>MultiCategory</PRODUCT_CATEGORY_DESCRIPTION>

<REQUEST_SCHEMA>Request1</REQUEST_SCHEMA>

<RESPONSE_SCHEMA>Response1</RESPONSE_SCHEMA>

<BUNDLE_ID>1</BUNDLE_ID>

<BUNDLE>Bundle-Credit</BUNDLE>

<BUNDLE_DESCRIPTION>This is a single offering bundle</BUNDLE_DESCRIPTION>

<PRICE>100</PRICE>

<PRODUCT>Merged In-File Report (1 Repository)</PRODUCT>

<PRODUCT_DESCRIPTION>Merged In-File Report (1 Repository)</PRODUCT_DESCRIPTION>

<TURNAROUNDTIME>10</TURNAROUNDTIME>

<PARTY_ID>2</PARTY_ID>

<PARTY_NAME>ORS</PARTY_NAME>

</RESPONSE>

<RESPONSE>

<SERVICE_TYPE_ID>1</SERVICE_TYPE_ID>

<SERVICE_TYPE>credit</SERVICE_TYPE>

<SERVICE_TYPE_DESCRIPTION>Title Services</SERVICE_TYPE_DESCRIPTION>

<PRODUCT_CATEGORY_ID>1</PRODUCT_CATEGORY_ID>

<PRODUCT_CATEGORY>MultiCategory</PRODUCT_CATEGORY>

<PRODUCT_CATEGORY_DESCRIPTION>MultiCategory</PRODUCT_CATEGORY_DESCRIPTION>

<REQUEST_SCHEMA>Request1</REQUEST_SCHEMA>

<RESPONSE_SCHEMA>Response1</RESPONSE_SCHEMA>

<BUNDLE_ID>5</BUNDLE_ID>

<BUNDLE>Bundle-New1</BUNDLE>

<BUNDLE_DESCRIPTION>This is a single offering Bundle</BUNDLE_DESCRIPTION>

<PRICE>500</PRICE>

<PRODUCT>Merged In-File Report (2 Repository)</PRODUCT>

<PRODUCT_DESCRIPTION>Merged In-File Report (2 Repository) Desc</PRODUCT_DESCRIPTION>

<TURNAROUNDTIME>200</TURNAROUNDTIME>

<PARTY_ID>2</PARTY_ID>

<PARTY_NAME>ORS</PARTY_NAME>

</RESPONSE>

<RESPONSE>

<SERVICE_TYPE_ID>1</SERVICE_TYPE_ID>

<SERVICE_TYPE>credit</SERVICE_TYPE>

<SERVICE_TYPE_DESCRIPTION>Title Services</SERVICE_TYPE_DESCRIPTION>

<PRODUCT_CATEGORY_ID>1</PRODUCT_CATEGORY_ID>

<PRODUCT_CATEGORY>MultiCategory</PRODUCT_CATEGORY>

<PRODUCT_CATEGORY_DESCRIPTION>MultiCategory</PRODUCT_CATEGORY_DESCRIPTION>

<REQUEST_SCHEMA>Request1</REQUEST_SCHEMA>

<RESPONSE_SCHEMA>Response1</RESPONSE_SCHEMA>

<BUNDLE_ID>6</BUNDLE_ID>

<BUNDLE>Bundle-New2</BUNDLE>

<BUNDLE_DESCRIPTION>This is a single offering bundle</BUNDLE_DESCRIPTION>

<PRICE>600</PRICE>

<PRODUCT>Merged In-File Report (3 Repository)</PRODUCT>

<PRODUCT_DESCRIPTION>Merged In-File Report (3 Repository) Desc</PRODUCT_DESCRIPTION>

<TURNAROUNDTIME>300</TURNAROUNDTIME>

<PARTY_ID>2</PARTY_ID>

<PARTY_NAME>ORS</PARTY_NAME>

</RESPONSE>

<RESPONSE>

<SERVICE_TYPE_ID>1</SERVICE_TYPE_ID>

<SERVICE_TYPE>credit</SERVICE_TYPE>

<SERVICE_TYPE_DESCRIPTION>Title Services</SERVICE_TYPE_DESCRIPTION>

<PRODUCT_CATEGORY_ID>1</PRODUCT_CATEGORY_ID>

<PRODUCT_CATEGORY>MultiCategory</PRODUCT_CATEGORY>

<PRODUCT_CATEGORY_DESCRIPTION>MultiCategory</PRODUCT_CATEGORY_DESCRIPTION>

<REQUEST_SCHEMA>Request1</REQUEST_SCHEMA>

<RESPONSE_SCHEMA>Response1</RESPONSE_SCHEMA>

<BUNDLE_ID>8</BUNDLE_ID>

<BUNDLE>Bundle-new4</BUNDLE>

<BUNDLE_DESCRIPTION>This is a Multiple offering bundle</BUNDLE_DESCRIPTION>

<PRICE>100</PRICE>

<PRODUCT>Merged In-File Report (1 Repository)</PRODUCT>

<PRODUCT_DESCRIPTION>Merged In-File Report (1 Repository)</PRODUCT_DESCRIPTION>

<TURNAROUNDTIME>10</TURNAROUNDTIME>

<PARTY_ID>2</PARTY_ID>

<PARTY_NAME>ORS</PARTY_NAME>

</RESPONSE>

<RESPONSE>

<SERVICE_TYPE_ID>1</SERVICE_TYPE_ID>

<SERVICE_TYPE>credit</SERVICE_TYPE>

<SERVICE_TYPE_DESCRIPTION>Title Services</SERVICE_TYPE_DESCRIPTION>

<PRODUCT_CATEGORY_ID>1</PRODUCT_CATEGORY_ID>

<PRODUCT_CATEGORY>MultiCategory</PRODUCT_CATEGORY>

<PRODUCT_CATEGORY_DESCRIPTION>MultiCategory</PRODUCT_CATEGORY_DESCRIPTION>

<REQUEST_SCHEMA>Request1</REQUEST_SCHEMA>

<RESPONSE_SCHEMA>Response1</RESPONSE_SCHEMA>

<BUNDLE_ID>8</BUNDLE_ID>

<BUNDLE>Bundle-new4</BUNDLE>

<BUNDLE_DESCRIPTION>This is a Multiple offering bundle</BUNDLE_DESCRIPTION>

<PRICE>500</PRICE>

<PRODUCT>Merged In-File Report (2 Repository)</PRODUCT>

<PRODUCT_DESCRIPTION>Merged In-File Report (2 Repository) Desc</PRODUCT_DESCRIPTION>

<TURNAROUNDTIME>200</TURNAROUNDTIME>

<PARTY_ID>2</PARTY_ID>

<PARTY_NAME>ORS</PARTY_NAME>

</RESPONSE>

<RESPONSE>

<SERVICE_TYPE_ID>3</SERVICE_TYPE_ID>

<SERVICE_TYPE>valuation</SERVICE_TYPE>

<SERVICE_TYPE_DESCRIPTION>Valuation Services</SERVICE_TYPE_DESCRIPTION>

<PRODUCT_CATEGORY_ID>3</PRODUCT_CATEGORY_ID>

<PRODUCT_CATEGORY>Information</PRODUCT_CATEGORY>

<PRODUCT_CATEGORY_DESCRIPTION>Title Information</PRODUCT_CATEGORY_DESCRIPTION>

<REQUEST_SCHEMA>Request3</REQUEST_SCHEMA>

<RESPONSE_SCHEMA>Response3</RESPONSE_SCHEMA>

<BUNDLE_ID>3</BUNDLE_ID>

<BUNDLE>Bundle-Appraisal</BUNDLE>

<BUNDLE_DESCRIPTION>This is a Mutiple offering bundle</BUNDLE_DESCRIPTION>

<PRICE>200</PRICE>

<PRODUCT>1004 URAR/Single Family</PRODUCT>

<PRODUCT_DESCRIPTION>1004 URAR/Single Family</PRODUCT_DESCRIPTION>

<TURNAROUNDTIME>100</TURNAROUNDTIME>

<PARTY_ID>2</PARTY_ID>

<PARTY_NAME>ORS</PARTY_NAME>

</RESPONSE>

</ROWSET>

  • 2 weeks later...

This topic is 7739 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.