
print "<\?xml version='1.0'\?>\n";
print "<LOG>\n";


while (<>){

chomp($_);


my($id,$ipaddress,$day,$month,$year,$time,$url,$reference,$searchterm,$textfield,$facet,$sort,$expand,$more,$page,$record,$follow,$refine,$seconds,$visit_num,$elapsed,$visit_step,$code,$task) = split("	",$_);



if (($code eq "SingleTermText") || ($code eq "MultipleTermText") || ($code eq "EmptyTextSearch") || ($code eq "SwitchTextField")){
 
  print"<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>$searchterm</SEARCHTERM>\n<FIELD>$textfield</FIELD>\n<FACET>-</FACET>\n<REFINE>-</REFINE>\n<EXPAND>-</EXPAND>\n<MORE>-</MORE>\n<RECORD>-</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";

}

if ($code eq "BooleanTextSearch"){
	
	print"<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>$searchterm</SEARCHTERM>\n<FIELD>$textfield</FIELD>\n<FACET>$facet</FACET>\n<REFINE>$refine</REFINE>\n<EXPAND>-</EXPAND>\n<MORE>-</MORE>\n<RECORD>-</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";
}
if ($code eq "MultipleFieldsText"){
	

	 print"<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>$searchterm</SEARCHTERM>\n<FIELD>$textfield</FIELD>\n<FACET>$facet</FACET>\n<REFINE>$refine</REFINE>\n<EXPAND>-</EXPAND>\n<MORE>-</MORE>\n<RECORD>-</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";
}


if ($code eq "BeginSimpleText"){
   print "<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>-</SEARCHTERM>\n<FIELD>-</FIELD>\n<FACET>-</FACET>\n<REFINE>-</REFINE>\n<EXPAND>-</EXPAND>\n<MORE>-</MORE>\n<RECORD>-</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";
}

if ($code eq "BeginAdvancedSearch"){
   print "<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>-</SEARCHTERM>\n<FIELD>-</FIELD>\n<FACET>-</FACET>\n<REFINE>-</REFINE>\n<EXPAND>-</EXPAND>\n<MORE>-</MORE>\n<RECORD>-</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";
}

if ($code eq "BeginNewTitlesSearch"){
   print "<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>-</SEARCHTERM>\n<FIELD>-</FIELD>\n<FACET>-</FACET>\n<REFINE>-</REFINE>\n<EXPAND>-</EXPAND>\n<MORE>-</MORE>\n<RECORD>-</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";
}

if ($code eq "BeginCallNumberSearch"){
   print "<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>-</SEARCHTERM>\n<FIELD>-</FIELD>\n<FACET>-</FACET>\n<REFINE>-</REFINE>\n<EXPAND>-</EXPAND>\n<MORE>-</MORE>\n<RECORD>-</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";
}


 
if (($code eq "AddFacet")||($code eq "RemoveFacet")){

 print "<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>-</SEARCHTERM>\n<FIELD>-</FIELD>\n<FACET>$facet</FACET>\n<REFINE>-</REFINE>\n<EXPAND>-</EXPAND>\n<MORE>-</MORE>\n<RECORD>-</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";

}
if ($code eq "RefineYears"){
print "<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>-</SEARCHTERM>\n<FIELD>-</FIELD>\n<FACET>-</FACET>\n<REFINE>$refine</REFINE>\n<EXPAND>-</EXPAND>\n<MORE>-</MORE>\n<RECORD>-</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";
}
if (($code eq "OpenFacet")||($code eq "CloseFacet")){
 print "<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>-</SEARCHTERM>\n<FIELD>-</FIELD>\n<FACET>-</FACET>\n<REFINE>-</REFINE>\n<EXPAND>$expand</EXPAND>\n<MORE>-</MORE>\n<RECORD>-</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";

}
if ($code eq "ShowMoreFacet"){
 print "<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>-</SEARCHTERM>\n<FIELD>-</FIELD>\n<FACET>-</FACET>\n<REFINE>-</REFINE>\n<EXPAND>-</EXPAND>\n<MORE>$more</MORE>\n<RECORD>-</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";

}

if ($code eq "NextPage"){
print "<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>-</SEARCHTERM>\n<FIELD>-</FIELD>\n<FACET>-</FACET>\n<REFINE>-</REFINE>\n<EXPAND>-</EXPAND>\n<MORE>-</MORE>\n<RECORD>-</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";


}

if ($code eq "ViewRecord"){
	print "<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>-</SEARCHTERM>\n<FIELD>-</FIELD>\n<FACET>-</FACET>\n<REFINE>-</REFINE>\n<EXPAND>-</EXPAND>\n<MORE>-</MORE>\n<RECORD>$record</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";


}

if ($code eq "RSS"){
print "<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>-</SEARCHTERM>\n<FIELD>-</FIELD>\n<FACET>-</FACET>\n<REFINE>-</REFINE>\n<EXPAND>-</EXPAND>\n<MORE>-</MORE>\n<RECORD>-</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";



}

if ($code eq "Refresh"){
print "<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>-</SEARCHTERM>\n<FIELD>-</FIELD>\n<FACET>-</FACET>\n<REFINE>-</REFINE>\n<EXPAND>-</EXPAND>\n<MORE>-</MORE>\n<RECORD>-</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";



}
if ($code eq "FollowupAction"){
print "<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>-</SEARCHTERM>\n<FIELD>-</FIELD>\n<FACET>-</FACET>\n<REFINE>-</REFINE>\n<EXPAND>-</EXPAND>\n<MORE>-</MORE>\n<RECORD>-</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";



}
if ($code eq "SortResult"){
print "<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>-</SEARCHTERM>\n<FIELD>-</FIELD>\n<FACET>-</FACET>\n<REFINE>-</REFINE>\n<EXPAND>-</EXPAND>\n<MORE>-</MORE>\n<RECORD>-</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";



}
if ($code eq "ExportService"){
print "<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>-</SEARCHTERM>\n<FIELD>-</FIELD>\n<FACET>-</FACET>\n<REFINE>-</REFINE>\n<EXPAND>-</EXPAND>\n<MORE>-</MORE>\n<RECORD>-</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";



}
if ($code eq "SelectNewTitles"){
print "<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>-</SEARCHTERM>\n<FIELD>$facet</FIELD>\n<FACET>-</FACET>\n<REFINE>-</REFINE>\n<EXPAND>-</EXPAND>\n<MORE>-</MORE>\n<RECORD>-</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";



}
if ($code eq "SelectCallNumberRange"){
print "<TRANSACTION>\n<ACTION>$code</ACTION>\n<SEARCHTERM>-</SEARCHTERM>\n<FIELD>-</FIELD>\n<FACET>$facet</FACET>\n<REFINE>-</REFINE>\n<EXPAND>-</EXPAND>\n<MORE>-</MORE>\n<RECORD>-</RECORD>\n<TIME>$elapsed</TIME>\n<VISIT_NUM>$visit_num</VISIT_NUM>\n<VISIT_STEP>$visit_step</VISIT_STEP>\n</TRANSACTION>\n";



}


}

print "</LOG>\n";

