|
@@ -124,6 +124,10 @@ class Zend_Dom_Query
|
|
|
}
|
|
}
|
|
|
// breaking XML declaration to make syntax highlighting work
|
|
// breaking XML declaration to make syntax highlighting work
|
|
|
if ('<' . '?xml' == substr(trim($document), 0, 5)) {
|
|
if ('<' . '?xml' == substr(trim($document), 0, 5)) {
|
|
|
|
|
+ if (preg_match('/\?'.'>\s+<html[^>]*xmlns="([^"]+)"[^>]*>/i', $document, $matches)) {
|
|
|
|
|
+ $this->_xpathNamespaces[] = $matches[1];
|
|
|
|
|
+ return $this->setDocumentXhtml($document, $encoding);
|
|
|
|
|
+ }
|
|
|
return $this->setDocumentXml($document, $encoding);
|
|
return $this->setDocumentXml($document, $encoding);
|
|
|
}
|
|
}
|
|
|
if (strstr($document, 'DTD XHTML')) {
|
|
if (strstr($document, 'DTD XHTML')) {
|