# else if .h-x>abbr:only-child[title]:not([title=""]):not[.h-*] then use that abbr title for name
# else if .h-x>abbr:only-child[title]:not([title=""]):not[.h-*] then use that abbr title for name
$name = $set->item(0)->getAttribute("title");
$name = $set->item(0)->getAttribute("title");
} elseif (
} elseif (
($set = $this->xpath->query("./*[not(template) and count(../*) = 1]", $root))->length
($set = $this->xpath->query("./*[local-name() != 'template' and count(../*) = 1]", $root))->length
&& !$this->hasRoots($set->item(0))
&& !$this->hasRoots($set->item(0))
&& ($set = $this->xpath->query("./img[@alt and @alt != '' and count(../*) = 1]", $set->item(0)))->length
&& ($set = $this->xpath->query("./img[@alt and @alt != '' and count(../*) = 1]", $set->item(0)))->length
&& !$this->hasRoots($set->item(0))
&& !$this->hasRoots($set->item(0))
@ -719,7 +718,7 @@ class Parser {
# else if .h-x>:only-child:not[.h-*]>img:only-child[alt]:not([alt=""]):not[.h-*] then use that img’s alt for name
# else if .h-x>:only-child:not[.h-*]>img:only-child[alt]:not([alt=""]):not[.h-*] then use that img’s alt for name
$name = $set->item(0)->getAttribute("alt");
$name = $set->item(0)->getAttribute("alt");
} elseif (
} elseif (
($set = $this->xpath->query("./*[not(template) and count(../*) = 1]", $root))->length
($set = $this->xpath->query("./*[local-name() != 'template' and count(../*) = 1]", $root))->length
&& !$this->hasRoots($set->item(0))
&& !$this->hasRoots($set->item(0))
&& ($set = $this->xpath->query("./area[@alt and @alt != '' and count(../*) = 1]", $set->item(0)))->length
&& ($set = $this->xpath->query("./area[@alt and @alt != '' and count(../*) = 1]", $set->item(0)))->length
&& !$this->hasRoots($set->item(0))
&& !$this->hasRoots($set->item(0))
@ -727,7 +726,7 @@ class Parser {
# else if .h-x>:only-child:not[.h-*]>area:only-child[alt]:not([alt=""]):not[.h-*] then use that area’s alt for name
# else if .h-x>:only-child:not[.h-*]>area:only-child[alt]:not([alt=""]):not[.h-*] then use that area’s alt for name
$name = $set->item(0)->getAttribute("alt");
$name = $set->item(0)->getAttribute("alt");
} elseif (
} elseif (
($set = $this->xpath->query("./*[not(template) and count(../*) = 1]", $root))->length
($set = $this->xpath->query("./*[local-name() != 'template' and count(../*) = 1]", $root))->length
&& !$this->hasRoots($set->item(0))
&& !$this->hasRoots($set->item(0))
&& ($set = $this->xpath->query("./abbr[@title and @title != '' and count(../*) = 1]", $set->item(0)))->length
&& ($set = $this->xpath->query("./abbr[@title and @title != '' and count(../*) = 1]", $set->item(0)))->length
&& !$this->hasRoots($set->item(0))
&& !$this->hasRoots($set->item(0))
@ -758,7 +757,7 @@ class Parser {
# else if .h-x>object[data]:only-of-type:not[.h-*] then use that object’s data for photo
# else if .h-x>object[data]:only-of-type:not[.h-*] then use that object’s data for photo
$photo = $set->item(0)->getAttribute("data");
$photo = $set->item(0)->getAttribute("data");
} elseif (
} elseif (
($set = $this->xpath->query("./*[not(template) and count(../*) = 1]", $root))->length
($set = $this->xpath->query("./*[local-name() != 'template' and count(../*) = 1]", $root))->length
&& !$this->hasRoots($set->item(0))
&& !$this->hasRoots($set->item(0))
&& ($set = $this->xpath->query("./img[@src and count(../img) = 1]", $set->item(0)))->length
&& ($set = $this->xpath->query("./img[@src and count(../img) = 1]", $set->item(0)))->length
&& !$this->hasRoots($set->item(0))
&& !$this->hasRoots($set->item(0))
@ -766,7 +765,7 @@ class Parser {
# else if .h-x>:only-child:not[.h-*]>img[src]:only-of-type:not[.h-*], then use the result of "parse an img element for src and alt" (see Sec.1.5) for photo
# else if .h-x>:only-child:not[.h-*]>img[src]:only-of-type:not[.h-*], then use the result of "parse an img element for src and alt" (see Sec.1.5) for photo