Jump to content

Grouping relational DB data to remove duplicates


michaelloveusa

Recommended Posts

Hi there - I am struggling with a translation associated with data that I am getting back from a relational database. Basically, I have some outer joins that are creating "extra" rows with the same data. It is hearing-related data that can have 0 to many owners (Owner Index, Name and Title) and 0 to many LICENSETYPE elements. Each of the AccelaHearingDataOutput elements represents a row from a database query. I have created some combined keys to allow grouping. Look at the business name and that will be the base hearing data. And yes, this is from Colorado! :-) Here is the source data and look below for the expected result:

 

<AccelaHearingDataOutputCollection>

<AccelaHearingDataOutput><BUSINESSNAME>Retail Marijuana Test</BUSINESSNAME><B1_FULL_ADDRESS>2443 S High St</B1_FULL_ADDRESS><B1_SITUS_CITY>Denver</B1_SITUS_CITY><B1_SITUS_STATE>CO</B1_SITUS_STATE><HEARINGDATE>05/20/2014</HEARINGDATE><HEARINGTIME>15:00</HEARINGTIME><STATUS>Pending</STATUS><TRADE_NAME>Merry Marijuana Store</TRADE_NAME><B1_PER_GROUP>Licenses</B1_PER_GROUP><B1_PER_TYPE>Business</B1_PER_TYPE><B1_PER_SUB_TYPE>Retail Marijuana Store</B1_PER_SUB_TYPE><B1_PER_CATEGORY>NA</B1_PER_CATEGORY><APPLICATION_DATE>2014-04-23T00:00:00.000-06:00</APPLICATION_DATE><OwnerIndex>1</OwnerIndex><OWNERNAME>Test Owner 1</OWNERNAME><OWNERTITLE>Owner 1</OWNERTITLE><LICENSETYPE/><OWNERCOMBINEDKEY>Retail Marijuana Test05/20/201415:001Test Owner 1Owner 1</OWNERCOMBINEDKEY><COMBINEDKEY>Retail Marijuana Test05/20/201415:00</COMBINEDKEY></AccelaHearingDataOutput><AccelaHearingDataOutput><BUSINESSNAME>Retail Marijuana Test</BUSINESSNAME><B1_FULL_ADDRESS>2443 S High St</B1_FULL_ADDRESS><B1_SITUS_CITY>Denver</B1_SITUS_CITY><B1_SITUS_STATE>CO</B1_SITUS_STATE><HEARINGDATE>05/20/2014</HEARINGDATE><HEARINGTIME>15:00</HEARINGTIME><STATUS>Pending</STATUS><TRADE_NAME>Merry Marijuana Store</TRADE_NAME><B1_PER_GROUP>Licenses</B1_PER_GROUP><B1_PER_TYPE>Business</B1_PER_TYPE><B1_PER_SUB_TYPE>Retail Marijuana Store</B1_PER_SUB_TYPE><B1_PER_CATEGORY>NA</B1_PER_CATEGORY><APPLICATION_DATE>2014-04-23T00:00:00.000-06:00</APPLICATION_DATE><OwnerIndex>3</OwnerIndex><OWNERNAME>Test Owner 3</OWNERNAME><OWNERTITLE>Owner 3</OWNERTITLE><LICENSETYPE/><OWNERCOMBINEDKEY>Retail Marijuana Test05/20/201415:003Test Owner 3Owner 3</OWNERCOMBINEDKEY><COMBINEDKEY>Retail Marijuana Test05/20/201415:00</COMBINEDKEY></AccelaHearingDataOutput><AccelaHearingDataOutput><BUSINESSNAME>test combined license for Mike</BUSINESSNAME><B1_FULL_ADDRESS>201 E Colfax Ave</B1_FULL_ADDRESS><B1_SITUS_CITY>Denver</B1_SITUS_CITY><B1_SITUS_STATE>CO</B1_SITUS_STATE><HEARINGDATE>05/08/2014</HEARINGDATE><HEARINGTIME>10:00</HEARINGTIME><STATUS>Pending</STATUS><TRADE_NAME/><B1_PER_GROUP>Licenses</B1_PER_GROUP><B1_PER_TYPE>Business</B1_PER_TYPE><B1_PER_SUB_TYPE>Combined License</B1_PER_SUB_TYPE><B1_PER_CATEGORY>NA</B1_PER_CATEGORY><APPLICATION_DATE>2014-05-07T00:00:00.000-06:00</APPLICATION_DATE><OwnerIndex>2</OwnerIndex><OWNERNAME>Sally Hoiberg</OWNERNAME><OWNERTITLE>Minority Owner</OWNERTITLE><LICENSETYPE>Liquor - Special Facility</LICENSETYPE><OWNERCOMBINEDKEY>test combined license for Mike05/08/201410:002Sally HoibergMinority Owner</OWNERCOMBINEDKEY><COMBINEDKEY>test combined license for Mike05/08/201410:00</COMBINEDKEY></AccelaHearingDataOutput><AccelaHearingDataOutput><BUSINESSNAME>test combined license for Mike</BUSINESSNAME><B1_FULL_ADDRESS>201 E Colfax Ave</B1_FULL_ADDRESS><B1_SITUS_CITY>Denver</B1_SITUS_CITY><B1_SITUS_STATE>CO</B1_SITUS_STATE><HEARINGDATE>05/08/2014</HEARINGDATE><HEARINGTIME>10:00</HEARINGTIME><STATUS>Pending</STATUS><TRADE_NAME/><B1_PER_GROUP>Licenses</B1_PER_GROUP><B1_PER_TYPE>Business</B1_PER_TYPE><B1_PER_SUB_TYPE>Combined License</B1_PER_SUB_TYPE><B1_PER_CATEGORY>NA</B1_PER_CATEGORY><APPLICATION_DATE>2014-05-07T00:00:00.000-06:00</APPLICATION_DATE><OwnerIndex>1</OwnerIndex><OWNERNAME>Fred Hoiberg</OWNERNAME><OWNERTITLE>Majority Owner</OWNERTITLE><LICENSETYPE>Liquor - Special Facility</LICENSETYPE><OWNERCOMBINEDKEY>test combined license for Mike05/08/201410:001Fred HoibergMajority Owner</OWNERCOMBINEDKEY><COMBINEDKEY>test combined license for Mike05/08/201410:00</COMBINEDKEY></AccelaHearingDataOutput><AccelaHearingDataOutput><BUSINESSNAME>test combined license for Mike</BUSINESSNAME><B1_FULL_ADDRESS>201 E Colfax Ave</B1_FULL_ADDRESS><B1_SITUS_CITY>Denver</B1_SITUS_CITY><B1_SITUS_STATE>CO</B1_SITUS_STATE><HEARINGDATE>05/08/2014</HEARINGDATE><HEARINGTIME>10:00</HEARINGTIME><STATUS>Pending</STATUS><TRADE_NAME/><B1_PER_GROUP>Licenses</B1_PER_GROUP><B1_PER_TYPE>Business</B1_PER_TYPE><B1_PER_SUB_TYPE>Combined License</B1_PER_SUB_TYPE><B1_PER_CATEGORY>NA</B1_PER_CATEGORY><APPLICATION_DATE>2014-05-07T00:00:00.000-06:00</APPLICATION_DATE><OwnerIndex>2</OwnerIndex><OWNERNAME>Sally Hoiberg</OWNERNAME><OWNERTITLE>Minority Owner</OWNERTITLE><LICENSETYPE>Amusement Facility - Permanent</LICENSETYPE><OWNERCOMBINEDKEY>test combined license for Mike05/08/201410:002Sally HoibergMinority Owner</OWNERCOMBINEDKEY><COMBINEDKEY>test combined license for Mike05/08/201410:00</COMBINEDKEY></AccelaHearingDataOutput><AccelaHearingDataOutput><BUSINESSNAME>test combined license for Mike</BUSINESSNAME><B1_FULL_ADDRESS>201 E Colfax Ave</B1_FULL_ADDRESS><B1_SITUS_CITY>Denver</B1_SITUS_CITY><B1_SITUS_STATE>CO</B1_SITUS_STATE><HEARINGDATE>05/08/2014</HEARINGDATE><HEARINGTIME>10:00</HEARINGTIME><STATUS>Pending</STATUS><TRADE_NAME/><B1_PER_GROUP>Licenses</B1_PER_GROUP><B1_PER_TYPE>Business</B1_PER_TYPE><B1_PER_SUB_TYPE>Combined License</B1_PER_SUB_TYPE><B1_PER_CATEGORY>NA</B1_PER_CATEGORY><APPLICATION_DATE>2014-05-07T00:00:00.000-06:00</APPLICATION_DATE><OwnerIndex>1</OwnerIndex><OWNERNAME>Fred Hoiberg</OWNERNAME><OWNERTITLE>Majority Owner</OWNERTITLE><LICENSETYPE>Amusement Facility - Permanent</LICENSETYPE><OWNERCOMBINEDKEY>test combined license for Mike05/08/201410:001Fred HoibergMajority Owner</OWNERCOMBINEDKEY><COMBINEDKEY>test combined license for Mike05/08/201410:00</COMBINEDKEY></AccelaHearingDataOutput></AccelaHearingDataOutputCollection>

 

 

Expected response (2 Hearing's - 1 with 2 owners and no Combined License details and 1 with 2 different owners and 2 license details):

<GetHearingDataResponse xmlns:ns0="http://www.denvergov.org/HearingDataService" xmlns="http://www.denvergov.org/HearingDataService"> <ns0:HearingResponseDetail> <ns0:BusinessName>Retail Marijuana Test</ns0:BusinessName> <ns0:TradeName>Merry Marijuana Store</ns0:TradeName> <ns0:BusinessAdddress>2443 S High St</ns0:BusinessAdddress> <ns0:City>Denver</ns0:City> <ns0:State>CO</ns0:State> <ns0:HearingDate>05/20/2014</ns0:HearingDate> <ns0:HearingTime>15:00</ns0:HearingTime> <ns0:Outcome>Pending</ns0:Outcome> <ns0:B1_Per_Group>Licenses</ns0:B1_Per_Group> <ns0:B1_Per_Type>Business</ns0:B1_Per_Type> <ns0:B1_Per_Sub_Type>Retail Marijuana Store</ns0:B1_Per_Sub_Type> <ns0:B1_Per_Category>NA</ns0:B1_Per_Category> <ns0:ApplicationDate>2014-04-23T00:00:00.000-06:00</ns0:ApplicationDate> <ns0:Owners> <ns0:Owner> <ns0:Name>Test Owner 1</ns0:Name> <ns0:Name>Owner 1</ns0:Name> </ns0:Owner> <ns0:Owner> <ns0:Name>Test Owner 3</ns0:Name> <ns0:Name>Owner 3</ns0:Name> </ns0:Owner> </ns0:Owners> <ns0:CombinedLicenseDetails> <ns0:LicenseType/> <ns0:LicenseType/> </ns0:CombinedLicenseDetails> </ns0:HearingResponseDetail> <ns0:HearingResponseDetail> <ns0:BusinessName>test combined license for Mike</ns0:BusinessName> <ns0:TradeName/> <ns0:BusinessAdddress>201 E Colfax Ave</ns0:BusinessAdddress> <ns0:City>Denver</ns0:City> <ns0:State>CO</ns0:State> <ns0:HearingDate>05/08/2014</ns0:HearingDate> <ns0:HearingTime>10:00</ns0:HearingTime> <ns0:Outcome>Pending</ns0:Outcome> <ns0:B1_Per_Group>Licenses</ns0:B1_Per_Group> <ns0:B1_Per_Type>Business</ns0:B1_Per_Type> <ns0:B1_Per_Sub_Type>Combined License</ns0:B1_Per_Sub_Type> <ns0:B1_Per_Category>NA</ns0:B1_Per_Category> <ns0:ApplicationDate>2014-05-07T00:00:00.000-06:00</ns0:ApplicationDate> <ns0:Owners> <ns0:Owner> <ns0:Name>Fred Hoiberg</ns0:Name> <ns0:Name>Majority Owner</ns0:Name> </ns0:Owner> <ns0:Owner> <ns0:Name>Sally Hoiberg</ns0:Name> <ns0:Name>Minority Owner</ns0:Name> </ns0:Owner> </ns0:Owners> <ns0:CombinedLicenseDetails> <ns0:LicenseType>Liquor - Special Facility</ns0:LicenseType> <ns0:LicenseType>Amusement Facility - Permanent</ns0:LicenseType> </ns0:CombinedLicenseDetails> </ns0:HearingResponseDetail> </GetHearingDataResponse>

 

Here is my current attempt that obviously isn't working, but should help get you started.

 

<?xml version="1.0" encoding="UTF-8" ?><?oracle-xsl-mapper <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. --> <mapSources> <source type="WSDL"> <schema location="../AccelaHearingData.wsdl"/> <rootElement name="AccelaHearingDataOutputCollection" namespace="http://xmlns.oracle.com/pcbpel/adapter/db/AccelaHearingData"/> </source> </mapSources> <mapTargets> <target type="WSDL"> <schema location="../HearingDataService.wsdl"/> <rootElement name="GetHearingDataResponse" namespace="http://www.denvergov.org/HearingDataService"/> </target> </mapTargets> <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.7.0(build 130301.0647.0008) AT [THU MAY 08 21:32:46 MDT 2014]. -->?><xsl:stylesheet version="2.0" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction" xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue" xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath" xmlns:ns0="http://www.denvergov.org/HearingDataService" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:med="http://schemas.oracle.com/mediator/xpath" xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath" xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/db/AccelaIntegration/GetHearingData/AccelaHearingData" xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions" xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk" xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions" xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/AccelaHearingData" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" exclude-result-prefixes="xsi xsl tns plt db xsd wsdl ns0 bpws xp20 mhdr bpel oraext dvm hwf med ids bpm xdk xref ora socket ldap"> <xsl:template match="/"> <ns0:GetHearingDataResponse> <xsl:for-each-group select="/db:AccelaHearingDataOutputCollection/db:AccelaHearingDataOutput" group-by="./db:COMBINEDKEY"> <xsl:variable name="currentRow" select="current()"/> <ns0:HearingResponseDetail> <ns0:BusinessName> <xsl:value-of select="$currentRow/db:BUSINESSNAME"/> </ns0:BusinessName> <ns0:TradeName> <xsl:value-of select="$currentRow/db:TRADE_NAME"/> </ns0:TradeName> <ns0:BusinessAdddress> <xsl:value-of select="$currentRow/db:B1_FULL_ADDRESS"/> </ns0:BusinessAdddress> <ns0:City> <xsl:value-of select="$currentRow/db:B1_SITUS_CITY"/> </ns0:City> <ns0:State> <xsl:value-of select="$currentRow/db:B1_SITUS_STATE"/> </ns0:State> <ns0:HearingDate> <xsl:value-of select="$currentRow/db:HEARINGDATE"/> </ns0:HearingDate> <ns0:HearingTime> <xsl:value-of select="$currentRow/db:HEARINGTIME"/> </ns0:HearingTime> <ns0:Outcome> <xsl:value-of select="$currentRow/db:STATUS"/> </ns0:Outcome> <ns0:B1_Per_Group> <xsl:value-of select="$currentRow/db:B1_PER_GROUP"/> </ns0:B1_Per_Group> <ns0:B1_Per_Type> <xsl:value-of select="$currentRow/db:B1_PER_TYPE"/> </ns0:B1_Per_Type> <ns0:B1_Per_Sub_Type> <xsl:value-of select="$currentRow/db:B1_PER_SUB_TYPE"/> </ns0:B1_Per_Sub_Type> <ns0:B1_Per_Category> <xsl:value-of select="$currentRow/db:B1_PER_CATEGORY"/> </ns0:B1_Per_Category> <ns0:ApplicationDate> <xsl:value-of select="$currentRow/db:APPLICATION_DATE"/> </ns0:ApplicationDate> <ns0:Owners> <xsl:for-each-group select="/db:AccelaHearingDataOutputCollection/db:AccelaHearingDataOutput" group-by="current-group()/db:OWNERCOMBINEDKEY"> <xsl:variable name="ownerRow" select="current()"/> <xsl:variable name="currentGroup" select="current-group()"/> <ns0:Owner> <ns0:Name> <xsl:value-of select="$ownerRow/db:OWNERNAME"/> </ns0:Name> <ns0:OwnerRowCombinedKey> <xsl:value-of select="$ownerRow/db:COMBINEDKEY"/> </ns0:OwnerRowCombinedKey> <ns0:CurrentRowCombinedKey> <xsl:value-of select="$currentRow/db:COMBINEDKEY"/> </ns0:CurrentRowCombinedKey> <ns0:OwnerCombinedKey> <xsl:value-of select="$ownerRow/db:OWNERCOMBINEDKEY"/> </ns0:OwnerCombinedKey> <ns0:CurrentGroupName> <xsl:value-of select="$currentGroup/db:OWNERNAME"/> </ns0:CurrentGroupName> <ns0:CurrentGroupCombinedKey> <xsl:value-of select="$currentGroup/db:COMBINEDKEY"/> </ns0:CurrentGroupCombinedKey> <ns0:CurrentGroupOwnerCombinedKey> <xsl:value-of select="$currentGroup/db:OWNERCOMBINEDKEY"/> </ns0:CurrentGroupOwnerCombinedKey> </ns0:Owner> </xsl:for-each-group> </ns0:Owners> <ns0:CombinedLicenseDetails> <xsl:for-each select="/db:AccelaHearingDataOutputCollection/db:AccelaHearingDataOutput[./db:COMBINEDKEY=$currentRow/db:COMBINEDKEY]"> <xsl:variable name="licenseRow" select="current()"/> <ns0:LicenseType> <xsl:value-of select="$licenseRow/db:LICENSETYPE"/> </ns0:LicenseType> </xsl:for-each> </ns0:CombinedLicenseDetails> </ns0:HearingResponseDetail> </xsl:for-each-group> </ns0:GetHearingDataResponse> </xsl:template></xsl:stylesheet>

 

Any help would be greatly appreciated!

 

Thanks, Mike

Link to comment
Share on other sites

I figured it out. The key is to create a nested for-each-group and select the current-group() and group by whatever makes your next desired elements unique. Here is my xsl:

 

<?xml version="1.0" encoding="UTF-8" ?><?oracle-xsl-mapper <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. --> <mapSources> <source type="WSDL"> <schema location="../AccelaHearingData.wsdl"/> <rootElement name="AccelaHearingDataOutputCollection" namespace="http://xmlns.oracle.com/pcbpel/adapter/db/AccelaHearingData"/> </source> </mapSources> <mapTargets> <target type="WSDL"> <schema location="../HearingDataService.wsdl"/> <rootElement name="GetHearingDataResponse" namespace="http://www.denvergov.org/HearingDataService"/> </target> </mapTargets> <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.7.0(build 130301.0647.0008) AT [THU MAY 08 21:32:46 MDT 2014]. -->?><xsl:stylesheet version="2.0" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction" xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue" xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath" xmlns:ns0="http://www.denvergov.org/HearingDataService" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:med="http://schemas.oracle.com/mediator/xpath" xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath" xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/db/AccelaIntegration/GetHearingData/AccelaHearingData" xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions" xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk" xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions" xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/AccelaHearingData" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" exclude-result-prefixes="xsi xsl tns plt db xsd wsdl ns0 bpws xp20 mhdr bpel oraext dvm hwf med ids bpm xdk xref ora socket ldap"> <xsl:template match="/"> <ns0:GetHearingDataResponse> <xsl:for-each-group select="/db:AccelaHearingDataOutputCollection/db:AccelaHearingDataOutput" group-by="./db:COMBINEDKEY"> <xsl:variable name="currentRow" select="current()"/> <ns0:HearingResponseDetail> <ns0:BusinessName> <xsl:value-of select="$currentRow/db:BUSINESSNAME"/> </ns0:BusinessName> <ns0:TradeName> <xsl:value-of select="$currentRow/db:TRADE_NAME"/> </ns0:TradeName> <ns0:BusinessAdddress> <xsl:value-of select="$currentRow/db:B1_FULL_ADDRESS"/> </ns0:BusinessAdddress> <ns0:City> <xsl:value-of select="$currentRow/db:B1_SITUS_CITY"/> </ns0:City> <ns0:State> <xsl:value-of select="$currentRow/db:B1_SITUS_STATE"/> </ns0:State> <ns0:HearingDate> <xsl:value-of select="$currentRow/db:HEARINGDATE"/> </ns0:HearingDate> <ns0:HearingTime> <xsl:value-of select="$currentRow/db:HEARINGTIME"/> </ns0:HearingTime> <ns0:Outcome> <xsl:value-of select="$currentRow/db:STATUS"/> </ns0:Outcome> <ns0:B1_Per_Group> <xsl:value-of select="$currentRow/db:B1_PER_GROUP"/> </ns0:B1_Per_Group> <ns0:B1_Per_Type> <xsl:value-of select="$currentRow/db:B1_PER_TYPE"/> </ns0:B1_Per_Type> <ns0:B1_Per_Sub_Type> <xsl:value-of select="$currentRow/db:B1_PER_SUB_TYPE"/> </ns0:B1_Per_Sub_Type> <ns0:B1_Per_Category> <xsl:value-of select="$currentRow/db:B1_PER_CATEGORY"/> </ns0:B1_Per_Category> <ns0:ApplicationDate> <xsl:value-of select="$currentRow/db:APPLICATION_DATE"/> </ns0:ApplicationDate> <ns0:Owners> <xsl:for-each-group select="current-group()" group-by="./db:OwnerIndex"> <xsl:variable name="ownerRow" select="current()"/> <ns0:Owner> <ns0:Name> <xsl:value-of select="$ownerRow/db:OWNERNAME"/> </ns0:Name> <ns0:Title> <xsl:value-of select="$ownerRow/db:OWNERTITLE"/> </ns0:Title> </ns0:Owner> </xsl:for-each-group> </ns0:Owners> <ns0:CombinedLicenseDetails> <xsl:for-each-group select="current-group()" group-by="./db:LICENSETYPE"> <xsl:variable name="licenseRow" select="current()"/> <ns0:LicenseType> <xsl:value-of select="$licenseRow/db:LICENSETYPE"/> </ns0:LicenseType> </xsl:for-each-group> </ns0:CombinedLicenseDetails> </ns0:HearingResponseDetail> </xsl:for-each-group> </ns0:GetHearingDataResponse> </xsl:template></xsl:stylesheet>

Link to comment
Share on other sites

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...