Skip to content

Commit 8edf704

Browse files
committed
ExL reverted the Analytics namespace removal
1 parent 1e9a0d1 commit 8edf704

File tree

8 files changed

+18
-11
lines changed

8 files changed

+18
-11
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
88

99
(Nothing yet)
1010

11+
## [0.8.2] - 2019-10-29
12+
13+
### Fixed
14+
15+
- Fix for revertion of namespace removal in Alma Analytics API response
16+
(seems like the removal was just a mistake from Ex Libris)
17+
1118
## [0.8.1] - 2019-10-01
1219

1320
### Changed
@@ -19,7 +26,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1926
- URL encode user IDs in URLs (since Alma user IDs can contain any Unicode character).
2027
- Added extra type check in error response handling
2128
- Docs: Fix "Item by barcode" anchor (#14)
22-
- Fix for breaking change in Alma Analytics API response
29+
- Fix for sudden namespace removal in Alma Analytics API response
2330

2431
## [0.8.0] - 2019-04-08
2532

spec/Analytics/RowSpec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function let()
1313
// We need to be able to handle missing data, so let's assume we have
1414
// a report with three columns, but that we for this row only got data
1515
// for two of the columns (data missing for Column2).
16-
$xml = QuiteSimpleXMLElement::make('<Row>
16+
$xml = QuiteSimpleXMLElement::make('<Row xmlns="urn:schemas-microsoft-com:xml-analysis:rowset">
1717
<Column0>0</Column0>
1818
<Column1>col1 content</Column1>
1919
<Column3>col3 content</Column3>

spec/data/analytics_response.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><report><QueryResult>
22
<IsFinished>true</IsFinished>
33
<ResultXml>
4-
<rowset>
4+
<rowset xmlns="urn:schemas-microsoft-com:xml-analysis:rowset">
55
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:saw-sql="urn:saw-sql" targetNamespace="urn:schemas-microsoft-com:xml-analysis:rowset">
66
<xsd:complexType name="Row">
77
<xsd:sequence>

spec/data/analytics_response_part1.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<ResumptionToken>9672D715A8E2EAAA6F30DD22FC52BE4CCAE35E29D921E0AC8BE8C6734C9E1571B4E48EEFCA4046EFF8CD7D1662C2D0A7677D3AD05EDC3CA7F06182E34E9D7A2F</ResumptionToken>
33
<IsFinished>false</IsFinished>
44
<ResultXml>
5-
<rowset>
5+
<rowset xmlns="urn:schemas-microsoft-com:xml-analysis:rowset">
66
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:saw-sql="urn:saw-sql" targetNamespace="urn:schemas-microsoft-com:xml-analysis:rowset">
77
<xsd:complexType name="Row">
88
<xsd:sequence>
@@ -4967,4 +4967,4 @@
49674967
</Row>
49684968
</rowset>
49694969
</ResultXml>
4970-
</QueryResult></report>
4970+
</QueryResult></report>

spec/data/analytics_response_part2.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><report><QueryResult>
22
<IsFinished>false</IsFinished>
33
<ResultXml>
4-
<rowset>
4+
<rowset xmlns="urn:schemas-microsoft-com:xml-analysis:rowset">
55
<Row>
66
<Column0>0</Column0>
77
<Column1>Elkins, James</Column1>
@@ -4967,4 +4967,4 @@ Stockholm Chamber of Commerce</Column12>
49674967
</Row>
49684968
</rowset>
49694969
</ResultXml>
4970-
</QueryResult></report>
4970+
</QueryResult></report>

spec/data/analytics_response_part3.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><report><QueryResult>
22
<IsFinished>true</IsFinished>
33
<ResultXml>
4-
<rowset>
4+
<rowset xmlns="urn:schemas-microsoft-com:xml-analysis:rowset">
55
<Row>
66
<Column0>0</Column0>
77
<Column1>Parham, Peter 1950-</Column1>
@@ -2917,4 +2917,4 @@
29172917
</Row>
29182918
</rowset>
29192919
</ResultXml>
2920-
</QueryResult></report>
2920+
</QueryResult></report>

src/Analytics/Report.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ protected function fetchBatch($attempt = 1, $chunkSize = null)
122122

123123
$this->readColumnHeaders($results);
124124

125-
$rows = $results->all('//Row');
125+
$rows = $results->all('//rowset:Row');
126126

127127
foreach ($rows as $row) {
128128
$this->resources[] = $this->convertToResource($row);

src/Analytics/Row.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function __construct(QuiteSimpleXMLElement $data, $headers)
1717
{
1818
$this->headers = $headers;
1919
foreach ($headers as $idx => $header) {
20-
$value = $data->text('Column' . ($idx + 1)) ?: null;
20+
$value = $data->text('rowset:Column' . ($idx + 1)) ?: null;
2121
$this->byIndex[$idx] = $value;
2222
$this->byHeader[$header] = $value;
2323
}

0 commit comments

Comments
 (0)