/** * Append the nodes necessary DOMNodes to represent the pim attribute to the * given EbayEnterprise_Dom_Element. * @param EbayEnterprise_Dom_Element $itemNode container node * @param EbayEnterprise_Catalog_Model_Pim_Attribute $pimAttribute attribute value model * @return self */ protected function _appendAttributeValue(EbayEnterprise_Dom_Element $itemNode, EbayEnterprise_Catalog_Model_Pim_Attribute $pimAttribute) { if ($pimAttribute->value instanceof DOMAttr) { $itemNode->setAttribute($pimAttribute->value->name, $pimAttribute->value->value); } elseif ($pimAttribute->value instanceof DOMNode) { $attributeNode = $itemNode->setNode($pimAttribute->destinationXpath); $attributeNode->appendChild($this->_doc->importNode($pimAttribute->value, true)); if ($pimAttribute->language) { $attributeNode->addAttributes(array('xml:lang' => $pimAttribute->language)); } $this->_clumpWithSimilar($attributeNode); } return $this; }