Hello,
UPDATE: Indexer class returns information from a DOCX document, including styles.
There's no method in the current version to query if a style ID exists or not. We move the request to the dev team to add a new method.
Using the current version you could change the CreateDocx.inc file and add a new method that returns the _wordStylesT variable:
/**
* Returns the wordStyles content.
*
* @return DOMDocument
*/
public function getWordStylesT()
{
return $this->_wordStylesT;
}
It returns a DOMDocument that can be queried using DOM methods such as DOMXPath. If you save the return of the method in the $stylesDOCX var, you can query a styleID using these lines:
$xpathStyles = new DOMXPath($stylesDOCX);
$xpathStyles->registerNamespace('w', 'http://schemas.openxmlformats.org/wordprocessingml/2006/main');
$stylesID = $xpathStyles->query('//w:style[@w:styleId="' . $styleId . '"]');
If the length of $stylesID if 0 then the style ID doesn't exist.
Regards.