Index: trunk/extensions/SemanticMediaWiki/includes/sparql/SMW_SparqlResultParser.php |
— | — | @@ -87,7 +87,7 @@ |
88 | 88 | } elseif ( ( $tagName == 'result' ) && ( $prevTag == 'results' ) ) { |
89 | 89 | $row = array(); |
90 | 90 | for ( $i = 0; $i < count( $this->m_header ); ++$i ) { |
91 | | - $row[] = null; |
| 91 | + $row[$i] = null; |
92 | 92 | } |
93 | 93 | $this->m_data[] = $row; |
94 | 94 | } elseif ( ( $tagName == 'literal' ) && ( $prevTag == 'binding' ) ) { |
— | — | @@ -120,11 +120,11 @@ |
121 | 121 | $prevTag = end( $this->m_xml_opentags ); |
122 | 122 | $rowcount = count( $this->m_data ); |
123 | 123 | if ( $prevTag == 'uri' ) { |
124 | | - $this->m_data[$rowcount][$this->m_xml_bindidx] = new SMWExpResource( $dataString ); |
| 124 | + $this->m_data[$rowcount-1][$this->m_xml_bindidx] = new SMWExpResource( $dataString ); |
125 | 125 | } elseif ( $prevTag == 'literal' ) { |
126 | | - $this->m_data[$rowcount][$this->m_xml_bindidx] = new SMWExpLiteral( $dataString, $this->m_xml_datatype ); |
| 126 | + $this->m_data[$rowcount-1][$this->m_xml_bindidx] = new SMWExpLiteral( $dataString, $this->m_xml_datatype ); |
127 | 127 | } elseif ( $prevTag == 'bnode' ) { |
128 | | - $this->m_data[$rowcount][$this->m_xml_bindidx] = new SMWExpResource( '_' . $dataString ); |
| 128 | + $this->m_data[$rowcount-1][$this->m_xml_bindidx] = new SMWExpResource( '_' . $dataString ); |
129 | 129 | } elseif ( $prevTag == 'boolean' ) { // no "results" in this case |
130 | 130 | $literal = new SMWExpLiteral( $dataString, 'http://www.w3.org/2001/XMLSchema#boolean' ); |
131 | 131 | $this->m_data = array( array( $literal ) ); |