2026-05-29 14:52:16 -04:00
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl= "http://www.w3.org/1999/XSL/Transform" version= "1.0" >
<xsl:output method= "html" encoding= "utf-8" indent= "yes" />
<!-- Parameters -->
<xsl:param name= "VERSION" > 2.0</xsl:param>
<xsl:param name= "PAGE-TITLE" > Search Permit Facts</xsl:param>
<xsl:param name= "PAGE-NAME" > searchPermitFacts</xsl:param>
<!-- Variables -->
<xsl:variable name= "PAGINATION_COUNT" select= "//permitfacts/@count" />
<xsl:variable name= "PAGINATION_START" select= "//permitfacts/@start" />
<xsl:variable name= "PAGINATION_END" select= "//permitfacts/@end" />
<xsl:variable name= "PAGINATION_PAGE" select= "//permitfacts/@page" />
<xsl:template match= "/" >
<script src= "js/{$PAGE-NAME}.js?version={$VERSION}" />
<div class= "{$PAGE-NAME}" >
<div class= "card" >
<div class= "card-header bg-primary text-white p-1 ps-3 d-flex align-items-center" >
<i class= "bi bi-search me-2" />
<xsl:value-of select= "$PAGE-TITLE" />
|
<xsl:value-of select= "//subscriptions/record/subscription_full_title" />
<span class= "ms-auto" >
Available Records: <xsl:value-of select= "format-number(//userstotalavailablerecords/record/count, '#,##0')" />
</span>
</div>
<div class= "card-body" >
<form action= "" name= "{$PAGE-NAME}" method= "post" id= "{$PAGE-NAME}" >
<input type= "hidden" name= "action" value= "PermitFacts.searchPermitFacts" />
<input type= "hidden" name= "subscription_serial" value= "{//subscriptions/record/subscription_serial}" />
<div class= "row" >
<div class= "col-lg-4 mb-3" >
<label class= "form-label" for= "permitfact_company" > Permit Holder</label>
<input type= "text" class= "form-control form-control-sm" name= "permitfact_company" id= "permitfact_company" maxlength= "100" autocomplete= "off" autofocus= "autofocus"
value= "{//searchhistory/record/searchhistory_parameters/permitfact_company}" />
</div>
<div class= "col-lg-4 mb-3" >
<label class= "form-label" for= "permitfact_project_name" > Project Name</label>
<input type= "text" class= "form-control form-control-sm" name= "permitfact_project_name" id= "permitfact_project_name" maxlength= "100" autocomplete= "off"
value= "{//searchhistory/record/searchhistory_parameters/permitfact_project_name}" />
</div>
<div class= "col-lg-4 mb-3" >
<label class= "form-label" for= "permitfact_project_zip" > Zip Code</label>
<input type= "text" class= "form-control form-control-sm zip-mask" name= "permitfact_project_zip" id= "permitfact_project_zip" maxlength= "20"
value= "{//searchhistory/record/searchhistory_parameters/permitfact_project_zip}" />
</div>
</div>
<div class= "row" >
<div class= "col-lg-2 mb-3" >
<label class= "form-label" for= "permitfact_project_city" > City</label>
<select class= "form-control form-control-sm multiple-dropdown" multiple= "multiple" name= "permitfact_project_city[]" id= "permitfact_project_city" size= "1" >
<xsl:apply-templates select= "//subscriptioncities" />
</select>
</div>
<div class= "col-lg-2 mb-3" >
<label class= "form-label" for= "permitfact_county" > County</label>
<select class= "form-control form-control-sm multiple-dropdown" multiple= "multiple" name= "permitfact_county[]" id= "permitfact_county" size= "1" >
<xsl:apply-templates select= "//subscriptioncounties" />
</select>
</div>
<div class= "col-lg-2 mb-3" >
<label class= "form-label" for= "permitfact_project_type" > Project Type</label>
<select class= "form-control form-control-sm multiple-dropdown" multiple= "multiple" name= "permitfact_project_type[]" id= "permitfact_project_type" size= "1" >
<xsl:call-template name= "dropdowns" >
<xsl:with-param name= "dropdown-name" select= "'project_types'" />
<xsl:with-param name= "selected-path" select= "'permitfact_project_type'" />
</xsl:call-template>
</select>
</div>
<div class= "col-lg-2 mb-3" >
<label class= "form-label" for= "permitfact_work_type" > Work Type</label>
<select class= "form-control form-control-sm multiple-dropdown" multiple= "multiple" name= "permitfact_work_type[]" id= "permitfact_work_type" size= "1" >
<xsl:call-template name= "dropdowns" >
<xsl:with-param name= "dropdown-name" select= "'work_types'" />
<xsl:with-param name= "selected-path" select= "'permitfact_work_type'" />
</xsl:call-template>
</select>
</div>
<div class= "col-lg-3 mb-3" >
<label class= "form-label" for= "permitfact_building_type" > Building Type</label>
<select class= "form-control form-control-sm multiple-dropdown" multiple= "multiple" name= "permitfact_building_type[]" id= "permitfact_building_type" size= "1" >
<xsl:call-template name= "dropdowns" >
<xsl:with-param name= "dropdown-name" select= "'building_type'" />
<xsl:with-param name= "selected-path" select= "'permitfact_building_type'" />
</xsl:call-template>
</select>
</div>
</div>
<div class= "row" >
<div class= "col-md-6 mb-3" >
<label class= "form-label" > Square Footage</label>
<div class= "input-group input-group-sm" >
<span class= "input-group-text" > From: </span>
<input type= "text" class= "form-control form-control-sm me-2 sqft-mask" name= "permitfact_size_from" id= "permitfact_size_from" maxlength= "7" value= "{//searchhistory/record/searchhistory_parameters/permitfact_size_from}" />
<span class= "input-group-text" > To: </span>
<input type= "text" class= "form-control form-control-sm sqft-mask" name= "permitfact_size_to" id= "permitfact_size_to" maxlength= "7" value= "{//searchhistory/record/searchhistory_parameters/permitfact_size_to}" />
</div>
</div>
<div class= "col-md-6 mb-3" >
<label class= "form-label" > Value Range</label>
<div class= "input-group input-group-sm" >
<span class= "input-group-text" > From: </span>
<input type= "text" class= "form-control form-control-sm me-2 money-mask" name= "permitfact_value_from" id= "permitfact_value_from" maxlength= "18" value= "{//searchhistory/record/searchhistory_parameters/permitfact_value_from}" />
<span class= "input-group-text" > To: </span>
<input type= "text" class= "form-control form-control-sm money-mask" name= "permitfact_value_to" id= "permitfact_value_to" maxlength= "18" value= "{//searchhistory/record/searchhistory_parameters/permitfact_value_to}" />
</div>
</div>
</div>
<div class= "row" >
<div class= "col-md-6 mb-3" >
<label class= "form-label" > Permit Issue Date Range</label>
<div class= "input-group input-group-sm permit_date" >
<span class= "input-group-text" > From:</span>
<input type= "text" class= "form-control form-control-sm date-mask" name= "permitfact_permit_date_from" id= "permitfact_permit_date_from" autocomplete= "off" maxlength= "10"
value= "{//searchhistory/record/searchhistory_parameters/permitfact_permit_date_from}" data-bs-toggle= "tooltip" data-bs-title= "You may only use a Permit or Issue Date, not both." data-bs-custom-class= "custom-tooltip" />
<button class= "btn btn-outline-primary btnPermitDateFromCalendar" type= "button" data-target= "#permitfact_permit_date_from" data-bs-toggle= "tooltip" data-bs-title= "Calendar" tabindex= "-1" >
<i class= "bi bi-calendar3" ></i>
</button>
<span class= "input-group-text ms-2" > To:</span>
<input type= "text" class= "form-control form-control-sm date-mask" name= "permitfact_permit_date_to" id= "permitfact_permit_date_to" autocomplete= "off" maxlength= "10"
2026-06-13 11:13:36 -04:00
value= "{//searchhistory/record/searchhistory_parameters/permitfact_permit_date_to}" data-bs-toggle= "tooltip" data-bs-title= "You may only use a Permit or Entry Date, not both." data-bs-custom-class= "custom-tooltip" />
2026-05-29 14:52:16 -04:00
<button class= "btn btn-outline-primary btnPermitDateToCalendar" type= "button" data-target= "#permitfact_permit_date_to" data-bs-toggle= "tooltip" data-bs-title= "Calendar" tabindex= "-1" >
<i class= "bi bi-calendar3" ></i>
</button>
</div>
</div>
<div class= "col-md-6 mb-3" >
<label class= "form-label" > Entry Date Range</label>
<div class= "input-group input-group-sm entry_date" >
<span class= "input-group-text" > From:</span>
<input type= "text" class= "form-control form-control-sm date-mask" name= "permitfact_entry_date_from" id= "permitfact_entry_date_from" autocomplete= "off" maxlength= "10"
value= "{//searchhistory/record/searchhistory_parameters/permitfact_entry_date_from}" data-bs-toggle= "tooltip" data-bs-title= "You may only use a Permit or Issue Date, not both." data-bs-custom-class= "custom-tooltip" />
<button class= "btn btn-outline-primary btnEntryDateFromCalendar" type= "button" data-target= "#permitfact_entry_date_from" data-bs-toggle= "tooltip" data-bs-title= "Calendar" tabindex= "-1" >
<i class= "bi bi-calendar3" ></i>
</button>
<span class= "input-group-text ms-2" > To:</span>
<input type= "text" class= "form-control form-control-sm date-mask" name= "permitfact_entry_date_to" id= "permitfact_entry_date_to" autocomplete= "off" maxlength= "10"
2026-06-13 11:13:36 -04:00
value= "{//searchhistory/record/searchhistory_parameters/permitfact_entry_date_to}" data-bs-toggle= "tooltip" data-bs-title= "You may only use a Permit or Issue Date, not both." data-bs-custom-class= "custom-tooltip" />
2026-05-29 14:52:16 -04:00
<button class= "btn btn-outline-primary btnEntryDateToCalendar" type= "button" data-target= "#permitfact_entry_date_to" data-bs-toggle= "tooltip" data-bs-title= "Calendar" tabindex= "-1" >
<i class= "bi bi-calendar3" ></i>
</button>
</div>
</div>
</div>
</form>
<div class= "buttons mt-1 mb-2" >
<button type= "button" class= "btn btn-sm btn-primary me-2 btnHome" >
2026-06-13 11:13:36 -04:00
<i class= "bi bi-house me-2" /> Return to Subscriptions Page</button>
2026-05-29 14:52:16 -04:00
<button type= "button" class= "btn btn-sm btn-primary me-2 btnSearch" >
<i class= "bi bi-search me-2" /> Search</button>
<button type= "button" class= "btn btn-sm btn-primary me-2 btnReset" >
<i class= "bi bi-arrow-clockwise me-2" /> Reset Search</button>
</div>
</div>
</div> <!-- Search Card -->
<!-- Results Card -->
<div class= "card mt-4" >
<div class= "card-header bg-primary text-white p-1 ps-3 d-flex align-items-center" >
<i class= "bi bi-card-list me-2" />
Results
<span class= "ms-auto" >
<xsl:if test= "$PAGINATION_COUNT > 0" >
<xsl:text> Showing </xsl:text>
<xsl:value-of select= "format-number($PAGINATION_START, '###,##0')" />
<xsl:text> to </xsl:text>
<xsl:value-of select= "format-number($PAGINATION_END, '###,##0')" />
<xsl:text> of </xsl:text>
<xsl:value-of select= "format-number($PAGINATION_COUNT, '###,##0')" />
Records
</xsl:if>
</span>
</div>
<div class= "card-body" >
<xsl:if test= "number(/XML/permitfacts/@count) > 0" >
<div class= "row align-items-center mt-2 mb-3" >
<div class= "col-lg-4" >
<div class= "input-group input-group-sm" >
<input type= "text" class= "form-control autosave" name= "filter" id= "filter" maxlength= "100" autocomplete= "off" placeholder= "{//popovers/record[popover_name = 'filter_permitfacts']/popover_placeholder}" />
<button type= "button" class= "btn btn-primary fw-bold btnClearFilter" data-bs-toggle= "tooltip" data-bs-title= "Clear Filter" data-bs-custom-class= "custom-tooltip" >
<i class= "bi bi-arrow-clockwise" />
</button>
</div>
</div>
<div class= "col-auto" >
<div class= "input-group input-group-sm" data-bs-toggle= "tooltip" data-bs-title= "Show Per Page" data-bs-custom-class= "custom-tooltip" >
<div class= "input-group-text" >
<i class= "bi bi-list-ol" />
</div>
<select class= "form-select autosave" name= "permitfacts_per_page" id= "permitfacts_per_page" >
<option value= "20" > 20</option>
<option value= "40" > 40</option>
<option value= "60" > 60</option>
<option value= "80" > 80</option>
<option value= "100" > 100</option>
</select>
</div>
</div>
</div>
<div class= "buttons mt-1 mb-2 print_page_buttons" >
<div class= "btn-group" >
<button type= "button" class= "btn btn-sm btn-primary me-2 dropdown-toggle" data-bs-toggle= "dropdown" aria-expanded= "false" >
<i class= "bi bi-printer me-2" /> Print
</button>
<ul class= "dropdown-menu" >
<li>
<button class= "dropdown-item btnPrintSearchResultsPDF" data-bs-toggle= "tooltip" data-bs-title= "{//popovers/record[popover_name = 'print_search_results']/popover_text}"
data-bs-html= "true" data-bs-custom-class= "custom-tooltip" >
2026-06-13 11:13:36 -04:00
<xsl:if test= "$PAGINATION_COUNT > 4000" >
2026-05-29 14:52:16 -04:00
<xsl:attribute name= "disabled" > disabled</xsl:attribute>
</xsl:if>
<i class= "bi bi-filetype-pdf text-danger me-2" /> Search Results - PDF</button>
</li>
<li>
<button class= "dropdown-item" onclick= "window.print()" >
<i class= "bi bi-display me-2" /> Screen</button>
</li>
<div class= "dropdown-divider mt-1 mb-1" />
<button class= "dropdown-item btnPrintAllRecordsPDF" data-bs-toggle= "tooltip" data-bs-title= "{//popovers/record[popover_name = 'print_all_records_pdf']/popover_text}"
data-bs-html= "true" data-bs-custom-class= "custom-tooltip" >
<i class= "bi bi-filetype-pdf text-danger me-2" /> All Records - PDF</button>
</ul>
</div>
<div class= "btn-group" >
<button type= "button" class= "btn btn-sm btn-primary me-2 dropdown-toggle" data-bs-toggle= "dropdown" aria-expanded= "false" >
<i class= "bi bi-download me-2" /> Export
</button>
<ul class= "dropdown-menu" >
<li>
<button class= "dropdown-item btnExportCSV" data-bs-toggle= "tooltip" data-bs-title= "{//popovers/record[popover_name = 'export_search_results_csv']/popover_text}"
data-bs-html= "true" data-bs-custom-class= "custom-tooltip" >
2026-06-13 11:13:36 -04:00
<xsl:if test= "$PAGINATION_COUNT > 4000" >
2026-05-29 14:52:16 -04:00
<xsl:attribute name= "disabled" > disabled</xsl:attribute>
</xsl:if>
<i class= "bi bi-filetype-csv me-2 text-info" /> Searched Results - CSV</button>
</li>
<li>
<button class= "dropdown-item btnExportExcel" data-bs-toggle= "tooltip" data-bs-title= "{//popovers/record[popover_name = 'export_search_results_excel']/popover_text}"
data-bs-html= "true" data-bs-custom-class= "custom-tooltip" >
2026-06-13 11:13:36 -04:00
<xsl:if test= "$PAGINATION_COUNT > 4000" >
2026-05-29 14:52:16 -04:00
<xsl:attribute name= "disabled" > disabled</xsl:attribute>
</xsl:if>
<i class= "bi bi-filetype-xlsx me-2 text-success" /> Searched Results - Excel</button>
</li>
<div class= "dropdown-divider mt-1 mb-1" />
<button class= "dropdown-item btnExportAllRecordsCSV" data-bs-toggle= "tooltip" data-bs-title= "{//popovers/record[popover_name = 'export_all_records_csv']/popover_text}"
data-bs-html= "true" data-bs-custom-class= "custom-tooltip" >
<i class= "bi bi-filetype-csv me-2 text-info" /> All Records - CSV</button>
<button class= "dropdown-item btnExportAllRecordsExcel" data-bs-toggle= "tooltip" data-bs-title= "{//popovers/record[popover_name = 'export_all_records_excel']/popover_text}"
data-bs-html= "true" data-bs-custom-class= "custom-tooltip" >
<i class= "bi bi-filetype-xlsx me-2 text-success" /> All Records - Excel</button>
</ul>
</div>
<div class= "btn-group ms-2" role= "group" >
<xsl:if test= "$PAGINATION_PAGE > 1" >
<button type= "button" class= "btn btn-sm btn-primary btnPagination" data-pagination= "first" data-bs-toggle= "tooltip" data-bs-title= "First Page" data-bs-custom-class= "custom-tooltip" >
<i class= "bi bi-chevron-bar-left me-1" /> First</button>
<button type= "button" class= "btn btn-sm btn-primary btnPagination" data-pagination= "previous" data-bs-toggle= "tooltip" data-bs-title= "Previous Page" data-bs-custom-class= "custom-tooltip" >
<i class= "bi bi-chevron-left me-1" /> Previous</button>
</xsl:if>
<xsl:if test= "$PAGINATION_COUNT > $PAGINATION_END" >
<button type= "button" class= "btn btn-sm btn-primary btnPagination" data-pagination= "next" data-bs-toggle= "tooltip" data-bs-title= "Next Page" data-bs-custom-class= "custom-tooltip" >
<i class= "bi bi-chevron-right me-1" /> Next</button>
<button type= "button" class= "btn btn-sm btn-primary btnPagination" data-pagination= "last" data-bs-toggle= "tooltip" data-bs-title= "Last Page" data-bs-custom-class= "custom-tooltip" >
<i class= "bi bi-chevron-bar-right me-1" /> Last</button>
</xsl:if>
</div>
</div>
<hr class= "mt-3 mb-2" />
</xsl:if>
<xsl:choose>
<xsl:when test= "number(/XML/permitfacts/@count) = 0" >
<div class= "fs-5 text-danger fw-bold fst-italic mb-1" >
<xsl:text> There are no Permit Facts to view...</xsl:text>
</div>
</xsl:when>
<xsl:otherwise>
<div class= "scrollable-40" >
<div class= "fs-5 text-danger fw-bold fst-italic mt-2 mb-1 filter-error d-none" >
<xsl:text> There are no Permit Facts to view...</xsl:text>
</div>
<xsl:apply-templates select= "//permitfacts" />
</div>
</xsl:otherwise>
</xsl:choose>
</div>
</div>
</div>
</xsl:template>
<!-- Template for Dropdowns -->
<xsl:template name= "dropdowns" >
<xsl:param name= "dropdown-name" />
<!-- the node name inside searchhistory_parameters that holds <id> list -->
<xsl:param name= "selected-path" />
<!-- Grab the selected ids once -->
<xsl:variable name= "selectedIds" select= "/XML/searchhistory/record/searchhistory_parameters/*[name()=$selected-path]/id" />
<xsl:for-each select= "/XML/dropdowns/record[dropdowntype_name = $dropdown-name]" >
<option value= "{dropdown_serial}" data-tokens= "{dropdown_value}" >
<xsl:if test= "$selectedIds = dropdown_serial" >
<xsl:attribute name= "selected" > selected</xsl:attribute>
</xsl:if>
<xsl:value-of select= "dropdown_value" />
</option>
</xsl:for-each>
</xsl:template>
<!-- Template for Cities dropdown -->
<xsl:template match= "subscriptioncities" >
<xsl:for-each select= "record" >
<option value= "{subscriptioncity_city}" data-tokens= "{subscriptioncities_city_name_verbose}" >
<xsl:if test= "//searchhistory/record/searchhistory_parameters/permitfact_project_city/id = subscriptioncity_city" >
<xsl:attribute name= "selected" > selected</xsl:attribute>
</xsl:if>
<xsl:value-of select= "subscriptioncities_city_name_verbose" />
</option>
</xsl:for-each>
</xsl:template>
<!-- Template for Counties dropdown -->
<xsl:template match= "subscriptioncounties" >
<xsl:for-each select= "record" >
<option value= "{subscriptioncounty_county}" data-tokens= "{subscriptioncounty_county}" >
<xsl:if test= "//searchhistory/record/searchhistory_parameters/permitfact_county/id = subscriptioncounty_county" >
<xsl:attribute name= "selected" > selected</xsl:attribute>
</xsl:if>
<xsl:value-of select= "subscriptioncounties_county_name_verbose" />
</option>
</xsl:for-each>
</xsl:template>
<!-- Template for Permit Fact Cards -->
<xsl:template match= "//permitfacts/record" >
<div class= "card mt-3 permitfact-card filterable" >
<!-- Header -->
<div class= "card-header bg-primary text-white d-flex align-items-start justify-content-between" >
<div>
<div class= "fw-semibold" >
Project Name:
<xsl:value-of select= "permitfact_project_name" />
</div>
<div class= "small" >
<xsl:value-of select= "permitfact_project_address" />
<xsl:text> , </xsl:text>
<xsl:value-of select= "project_city_verbose" />
<xsl:text> , </xsl:text>
<xsl:value-of select= "permitfact_project_zip" />
<xsl:text> — </xsl:text>
<xsl:value-of select= "permitfact_county_name_verbose" />
</div>
</div>
<!-- far-right number -->
<div class= "text-end ms-3" >
<div class= "small" > Record #</div>
<div class= "fw-bold" >
<xsl:value-of select= "permitfact_legacy_id" />
</div>
</div>
</div>
<!-- Body -->
<div class= "card-body" >
<div class= "row g-3" >
<div class= "col-md-3" >
<div class= "text-muted small" > Permit Number</div>
<div class= "fw-semibold" >
<xsl:value-of select= "permitfact_permit_number" />
</div>
</div>
<div class= "col-md-3" >
<div class= "text-muted small" > Permit Date</div>
<div class= "fw-semibold" >
<xsl:value-of select= "permitfact_permit_date_verbose" />
</div>
</div>
<div class= "col-md-3" >
<div class= "text-muted small" > District</div>
<div class= "fw-semibold" >
<xsl:choose>
<xsl:when test= "normalize-space(permitfact_dist_ll) != ''" >
<xsl:value-of select= "permitfact_dist_ll" />
</xsl:when>
<xsl:otherwise> N/A</xsl:otherwise>
</xsl:choose>
</div>
</div>
<div class= "col-md-3" >
<div class= "text-muted small" > Lot / Block</div>
<div class= "fw-semibold" >
<xsl:choose>
<xsl:when test= "normalize-space(permitfact_lot_block) != ''" >
<xsl:value-of select= "permitfact_lot_block" />
</xsl:when>
<xsl:otherwise> N/A</xsl:otherwise>
</xsl:choose>
</div>
</div>
<div class= "col-md-3" >
<div class= "text-muted small" > Value</div>
<div class= "fw-semibold" >
<xsl:choose>
<xsl:when test= "string-length(normalize-space(permitfact_value)) > 0 and number(permitfact_value) = number(permitfact_value)" >
$<xsl:value-of select= "format-number(permitfact_value, '#,##0')" />
</xsl:when>
<xsl:otherwise>
N/A
</xsl:otherwise>
</xsl:choose>
</div>
</div>
<div class= "col-md-3" >
<div class= "text-muted small" > Size (sq ft)</div>
<div class= "fw-semibold" >
<xsl:value-of select= "format-number(permitfact_size, '#,##0')" />
</div>
</div>
<div class= "col-md-3" >
<div class= "text-muted small" > Work Type</div>
<div class= "fw-semibold" >
<xsl:value-of select= "permitfact_work_type_verbose" />
</div>
</div>
<div class= "col-md-3" >
<div class= "text-muted small" > Project Type</div>
<div class= "fw-semibold" >
<xsl:value-of select= "permitfact_project_type_verbose" />
</div>
</div>
<div class= "col-md-3" >
<div class= "text-muted small" > Building Type</div>
<div class= "fw-semibold" >
<xsl:value-of select= "permitfact_building_type_verbose" />
</div>
</div>
<div class= "col-md-9" >
<div class= "text-muted small" > Company</div>
<div class= "fw-semibold" >
<xsl:value-of select= "permitfact_company" />
</div>
</div>
<div class= "col-md-10" >
<div class= "text-muted small" > Company Address</div>
<div class= "fw-semibold" >
<xsl:value-of select= "permitfact_address" />
<xsl:text> </xsl:text>
<xsl:value-of select= "permitfact_city_verbose" />
<xsl:text> , </xsl:text>
<xsl:value-of select= "permitfact_state" />
<xsl:text> </xsl:text>
<xsl:value-of select= "permitfact_zip" />
</div>
</div>
<div class= "col-md-2" >
<div class= "text-muted small" > Phone</div>
<div class= "fw-semibold" >
<xsl:choose>
<xsl:when test= "string-length(permitfact_phone) = 10" >
<xsl:value-of
select= "concat('(', substring(permitfact_phone, 1, 3), ') ', substring(permitfact_phone, 4, 3), '-', substring(permitfact_phone, 7, 4))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select= "permitfact_phone" />
</xsl:otherwise>
</xsl:choose>
</div>
</div>
<div class= "col-md-4" >
<div class= "text-muted small" > Owner Name</div>
<div class= "fw-semibold" >
<xsl:value-of select= "permitfact_owner_name" />
</div>
</div>
<div class= "col-md-4" >
<div class= "text-muted small" > Owner Phone</div>
<div class= "fw-semibold" >
<xsl:choose>
<xsl:when test= "string-length(permitfact_owner_phone) = 10" >
<xsl:value-of
select= "concat('(', substring(permitfact_owner_phone, 1, 3), ') ', substring(permitfact_owner_phone, 4, 3), '-', substring(permitfact_owner_phone, 7, 4))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select= "permitfact_owner_phone" />
</xsl:otherwise>
</xsl:choose>
</div>
</div>
</div>
</div>
</div>
</xsl:template>
</xsl:stylesheet>