- 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();
|
||||
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)
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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" />
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user