need to get record count when record_type=VALID through XSLT

sniper_progz

New Member
I have below xml data and need to get record count when record_type=VALID through XSLT. location_name and file_type are the inputs to the xslt. i have to get record count for each location_name and file_type when they were provided as inputs. Location_Name and File_Type are the variables in the XSLT.\[code\]<root><SellOutRecord> <FILE_TYPE>STOSO</FILE_TYPE> <RECORD_TYPE>VALID</RECORD_TYPE> <RECORD_NO>1</RECORD_NO> <LOCATION_NAME>XYZ el</LOCATION_NAME></SellOutRecord><SellOutRecord> <FILE_TYPE>STOSO</FILE_TYPE> <RECORD_TYPE>ERROR</RECORD_TYPE> <RECORD_NO>2</RECORD_NO> <LOCATION_NAME>XYZ el</LOCATION_NAME></SellOutRecord><SellOutRecord> <FILE_TYPE>STOSO</FILE_TYPE> <RECORD_TYPE>VALID</RECORD_TYPE> <RECORD_NO>3</RECORD_NO> <LOCATION_NAME>XYZ el</LOCATION_NAME></SellOutRecord><SellOutRecord> <FILE_TYPE>STOSO</FILE_TYPE> <RECORD_TYPE>WARNING</RECORD_TYPE> <RECORD_NO>3</RECORD_NO> <LOCATION_NAME>XYZ el</LOCATION_NAME></SellOutRecord><SellOutRecord> <FILE_TYPE>STOSO</FILE_TYPE> <RECORD_TYPE>ERROR</RECORD_TYPE> <RECORD_NO>4</RECORD_NO> <LOCATION_NAME>XYZ el</LOCATION_NAME></SellOutRecord><SellOutRecord> <FILE_TYPE>STOSO</FILE_TYPE> <RECORD_TYPE>ERROR</RECORD_TYPE> <RECORD_NO>6</RECORD_NO> <LOCATION_NAME>XYZ XYZ</LOCATION_NAME></SellOutRecord><SellOutRecord> <FILE_TYPE>STOSO</FILE_TYPE> <RECORD_TYPE>VALID</RECORD_TYPE> <RECORD_NO>7</RECORD_NO> <LOCATION_NAME>XYZ XYZ</LOCATION_NAME></SellOutRecord><SellOutRecord> <FILE_TYPE>STOSO</FILE_TYPE> <RECORD_TYPE>VALID</RECORD_TYPE> <RECORD_NO>8</RECORD_NO> <LOCATION_NAME>XYZ XYZ</LOCATION_NAME></SellOutRecord><SellOutRecord> <FILE_TYPE>STOSO</FILE_TYPE> <RECORD_TYPE>ERROR</RECORD_TYPE> <RECORD_NO>9</RECORD_NO> <LOCATION_NAME>XYZ XYZ</LOCATION_NAME></SellOutRecord><SellOutRecord> <FILE_TYPE>STOSO</FILE_TYPE> <RECORD_TYPE>VALID</RECORD_TYPE> <RECORD_NO>10</RECORD_NO> <LOCATION_NAME>XYZ XYZ</LOCATION_NAME></SellOutRecord><InventoryRecord> <FILE_TYPE>STOIV</FILE_TYPE> <RECORD_TYPE>ERROR</RECORD_TYPE> <RECORD_NO>2</RECORD_NO> <LOCATION_NAME>XYZ el</LOCATION_NAME></InventoryRecord><InventoryRecord> <FILE_TYPE>STOIV</FILE_TYPE> <RECORD_TYPE>VALID</RECORD_TYPE> <RECORD_NO>4</RECORD_NO> <LOCATION_NAME>XYZ el</LOCATION_NAME></InventoryRecord><InventoryRecord> <FILE_TYPE>STOIV</FILE_TYPE> <RECORD_TYPE>VALID</RECORD_TYPE> <RECORD_NO>5</RECORD_NO> <LOCATION_NAME>XYZ el</LOCATION_NAME></InventoryRecord><InventoryRecord> <FILE_TYPE>STOIV</FILE_TYPE> <RECORD_TYPE>ERROR</RECORD_TYPE> <RECORD_NO>8</RECORD_NO> <LOCATION_NAME>XYZ XYZ</LOCATION_NAME></InventoryRecord><InventoryRecord> <FILE_TYPE>STOIV</FILE_TYPE> <RECORD_TYPE>ERROR</RECORD_TYPE> <RECORD_NO>9</RECORD_NO> <LOCATION_NAME>XYZ XYZ</LOCATION_NAME></InventoryRecord><InventoryRecord> <FILE_TYPE>STOIV</FILE_TYPE> <RECORD_TYPE>VALID</RECORD_TYPE> <RECORD_NO>11</RECORD_NO> <LOCATION_NAME>XYZ XYZ</LOCATION_NAME></InventoryRecord><InventoryRecord> <FILE_TYPE>STOIV</FILE_TYPE> <RECORD_TYPE>VALID</RECORD_TYPE> <RECORD_NO>14</RECORD_NO> <LOCATION_NAME>XYZ XYZ</LOCATION_NAME></InventoryRecord><SalesInRecord> <FILE_TYPE>STOSI</FILE_TYPE> <RECORD_TYPE>VALID</RECORD_TYPE> <RECORD_NO>1</RECORD_NO> <LOCATION_NAME>XYZ el</LOCATION_NAME></SalesInRecord><SalesInRecord> <FILE_TYPE>STOSI</FILE_TYPE> <RECORD_TYPE>ERROR</RECORD_TYPE> <RECORD_NO>2</RECORD_NO> <LOCATION_NAME>XYZ el</LOCATION_NAME></SalesInRecord><SalesInRecord> <FILE_TYPE>STOSI</FILE_TYPE> <RECORD_TYPE>VALID</RECORD_TYPE> <RECORD_NO>3</RECORD_NO> <LOCATION_NAME>XYZ el</LOCATION_NAME></SalesInRecord><SalesInRecord> <FILE_TYPE>STOSI</FILE_TYPE> <RECORD_TYPE>WARNING</RECORD_TYPE> <RECORD_NO>3</RECORD_NO> <LOCATION_NAME>XYZ el</LOCATION_NAME></SalesInRecord><SalesInRecord> <FILE_TYPE>STOSI</FILE_TYPE> <RECORD_TYPE>ERROR</RECORD_TYPE> <RECORD_NO>4</RECORD_NO> <LOCATION_NAME>XYZ el</LOCATION_NAME></SalesInRecord><SalesInRecord> <FILE_TYPE>STOSI</FILE_TYPE> <RECORD_TYPE>ERROR</RECORD_TYPE> <RECORD_NO>7</RECORD_NO> <LOCATION_NAME>XYZ XYZ</LOCATION_NAME></SalesInRecord><SalesInRecord> <FILE_TYPE>STOSI</FILE_TYPE> <RECORD_TYPE>VALID</RECORD_TYPE> <RECORD_NO>8</RECORD_NO> <LOCATION_NAME>XYZ XYZ</LOCATION_NAME></SalesInRecord><SalesInRecord> <FILE_TYPE>STOSI</FILE_TYPE> <RECORD_TYPE>WARNING</RECORD_TYPE> <RECORD_NO>8</RECORD_NO> <LOCATION_NAME>XYZ XYZ</LOCATION_NAME></SalesInRecord><SalesInRecord> <FILE_TYPE>STOSI</FILE_TYPE> <RECORD_TYPE>ERROR</RECORD_TYPE> <RECORD_NO>10</RECORD_NO> <LOCATION_NAME>XYZ XYZ</LOCATION_NAME></SalesInRecord></root>\[/code\]the expected output is Rec_count=2 for location_name=XYZ el and File_type=STOSO Rec_count=3 for location_name=XYZ XYZ and File_type=STOSOThanks...
 
Back
Top