- small xslt improvements for oai interface

- allo cors for OAI interface for all ip addresses inside RequestController.php
This commit is contained in:
Arno Kaimbacher 2022-08-05 10:34:49 +02:00
parent a53a996f85
commit c4d74ca631
3 changed files with 8 additions and 6 deletions

View File

@ -106,7 +106,9 @@ class RequestController extends Controller
//$xml = $this->doc->asXML();
return response($xml) //->view('rss', array('rss'=>$this->rss))
->header('Content-Type', 'application/xml')
->header('charset', 'utf-8');
->header('charset', 'utf-8')
->header('Access-Control-Allow-Origin', '*')
->header('Access-Control-Allow-Methods', 'GET');
}
private function __handleRequest(array $oaiRequest)

View File

@ -304,7 +304,7 @@ trait DatasetExtension
} else {
$rows = $select->whereHas('dataset', function ($q) use ($datasetId) {
$q->where('id', $datasetId);
})->get();
})->orderBy('id')->get();
}
foreach ($rows as $row) {

View File

@ -398,10 +398,10 @@
<xsl:template match="Coverage" mode="oai_dc">
<dc:coverage>
<xsl:variable name="geolocation" select="concat(
'SOUTH-BOUND LATITUDE: ', @XMin,
' * WEST-BOUND LONGITUDE: ', @YMin,
' * NORTH-BOUND LATITUDE: ', @XMax,
' * EAST-BOUND LONGITUDE: ', @YMax
'SOUTH-BOUND LATITUDE: ', @YMin,
' * WEST-BOUND LONGITUDE: ', @XMin,
' * NORTH-BOUND LATITUDE: ', @YMax,
' * EAST-BOUND LONGITUDE: ', @XMax
)" />
<xsl:value-of select="$geolocation" />