- small xslt improvements for oai interface
- allo cors for OAI interface for all ip addresses inside RequestController.php
This commit is contained in:
parent
a53a996f85
commit
c4d74ca631
|
@ -106,7 +106,9 @@ class RequestController extends Controller
|
||||||
//$xml = $this->doc->asXML();
|
//$xml = $this->doc->asXML();
|
||||||
return response($xml) //->view('rss', array('rss'=>$this->rss))
|
return response($xml) //->view('rss', array('rss'=>$this->rss))
|
||||||
->header('Content-Type', 'application/xml')
|
->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)
|
private function __handleRequest(array $oaiRequest)
|
||||||
|
|
|
@ -304,7 +304,7 @@ trait DatasetExtension
|
||||||
} else {
|
} else {
|
||||||
$rows = $select->whereHas('dataset', function ($q) use ($datasetId) {
|
$rows = $select->whereHas('dataset', function ($q) use ($datasetId) {
|
||||||
$q->where('id', $datasetId);
|
$q->where('id', $datasetId);
|
||||||
})->get();
|
})->orderBy('id')->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($rows as $row) {
|
foreach ($rows as $row) {
|
||||||
|
|
|
@ -398,10 +398,10 @@
|
||||||
<xsl:template match="Coverage" mode="oai_dc">
|
<xsl:template match="Coverage" mode="oai_dc">
|
||||||
<dc:coverage>
|
<dc:coverage>
|
||||||
<xsl:variable name="geolocation" select="concat(
|
<xsl:variable name="geolocation" select="concat(
|
||||||
'SOUTH-BOUND LATITUDE: ', @XMin,
|
'SOUTH-BOUND LATITUDE: ', @YMin,
|
||||||
' * WEST-BOUND LONGITUDE: ', @YMin,
|
' * WEST-BOUND LONGITUDE: ', @XMin,
|
||||||
' * NORTH-BOUND LATITUDE: ', @XMax,
|
' * NORTH-BOUND LATITUDE: ', @YMax,
|
||||||
' * EAST-BOUND LONGITUDE: ', @YMax
|
' * EAST-BOUND LONGITUDE: ', @XMax
|
||||||
)" />
|
)" />
|
||||||
<xsl:value-of select="$geolocation" />
|
<xsl:value-of select="$geolocation" />
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user