Forum


Replies: 6   Views: 156
Indexer: check or exclude externals resources

Posted by Bouillou  · 28-11-2024 - 12:33

Using your code, I can see that external link is removed :

Before removeWordContent

array:3 [â–¼
  "elements" => DOMNodeList {#2377 â–¶}
  "length" => 1
  "query" => "//w:drawing[.//@r:link]"
]

After removeWordContent

array:3 [â–¼
  "elements" => DOMNodeList {#2535 â–¶}
  "length" => 0
  "query" => "//w:drawing[.//@r:link]"
]

but after saving, the final document has no longer the image as expected, but it still containing the external link in "word\_rels\document.xml.rels" and the Indexer is throwing a warning.

<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId8" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="file:///\\SVFHVA\Commun\.......