It is actually possible to check an option called "Use node source instead of node access as filter" but it looks like no filter are effective in the code. The result in the sitemap.xml still display contents from other domain source.
If you know that this feature works correctly, please provide the how to make it works?
Otherwise I suggest to add a condition in docroot/modules/contrib/domain_simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator/DomainEntityUrlGenerator.php:81 that will check for the config value of the checked option.
Here is the suggesstion of code to include:
$config = \Drupal::config('domain_simple_sitemap.settings');
\Drupal::logger('debug')->debug($config->get('domain_simple_sitemap_filter'));
if ($config->get('domain_simple_sitemap_filter')) {
$query->condition(DomainSourceElementManagerInterface::DOMAIN_SOURCE_FIELD, $sitemap_domain_id);
}
Create a patch.
None, the option checkbox already exist on the following admin page /admin/config/domain/domain_simple_sitemap/config
Needs review
3.0
Code