validation of XML-instances consisting of elements from different namespaces
Posted: Mon Aug 04, 2025 6:07 pm
hi
Not a problem with oXygen itself, but just wondering how to replicate the handy validation functionality offered bij oXygen in another framework.
I have XML-instances such as:
Both the XSDs mentioned in @xsi:schemaLocation are resolvable by oXygen using OASIS catalogs. The sitemap.xsd allows xs:any at the end of <url>, as shown in my example: <my:Extension>. All works fine: non-conforming validation errors against both the sitemap.xsd and my-schema.xsd are reported.
BTW: I cannot change sitemap.xsd but have full control over my-schema.xsd.
But now I need to mimic this functionality using Xerxes in another framework, so not using oXygen. Now the validation reports include errors
Any help appreciated.
Theun
Not a problem with oXygen itself, but just wondering how to replicate the handy validation functionality offered bij oXygen in another framework.
I have XML-instances such as:
Code: Select all
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:my="https://example.com/my-ns"
xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd
https://example.com/my-ns https://example.com/my-ns/my-schema.xsd">
<url>
<loc>https://example.com/my-ns/my-sitemap</loc>
<lastmod>2022-09-02T00:00:00+02:00</lastmod>
<changefreq>weekly</changefreq>
<priority>1</priority>
<my:Extension>
<my:element>....</my:element>
</my:Extension>
</url>
</urlset>
BTW: I cannot change sitemap.xsd but have full control over my-schema.xsd.
But now I need to mimic this functionality using Xerxes in another framework, so not using oXygen. Now the validation reports include errors
- for elements from sitemap.xsd but not present in my-schema.xsd: Cannot find the declaration of element 'urlset'.
- from sitemap.xsd itself: The matching wildcard is strict, but no declaration can be found for element my:Extension
Any help appreciated.
Theun