/** * Parse from DOM node. * * @param DOMElement $node */ public function parse(DOMElement $node) { parent::parse($node); $justification = $node->hasAttribute(IdmlAttributes::Justification) ? $node->getAttribute(IdmlAttributes::Justification) : 'left'; if (isset($this->story->page)) { $pagePosition = $this->story->page->pagePosition; } else { $pagePosition = 'left'; } $this->textAlign = IdmlParserHelper::convertJustification($justification, $pagePosition); // Change the TabList property cluster into an array for easier handling IdmlDeclarationParser::arrayifyDupes($this->contextualStyle->idmlContextualElement, $this->contextualStyle); // Check for nested styles; if any exist, set up the helper class object $this->parseNestedStyle(); $this->parseChildren($node); }