validation of XML-instances consisting of elements from different namespaces
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 11
- Joined: Tue Oct 30, 2012 10:56 pm
validation of XML-instances consisting of elements from different namespaces
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
-
- Posts: 9515
- Joined: Fri Jul 09, 2004 5:18 pm
Re: validation of XML-instances consisting of elements from different namespaces
Hi Theun,
Oxygen does not invoke the Xerces library from the command line, it works with the library directly in the Java code and we have lots of code which deals with validation, changes made to the Xerces parser.
I would suggest you take a look at the Xerces features list:
https://xerces.apache.org/xerces2-j/features.html
There is a feature named "http://apache.org/xml/features/honour-a ... aLocations", maybe this is the feature which needs to be enabled. But I'm not sure, this needs to be tested.
Regards,
Radu
Oxygen does not invoke the Xerces library from the command line, it works with the library directly in the Java code and we have lots of code which deals with validation, changes made to the Xerces parser.
I would suggest you take a look at the Xerces features list:
https://xerces.apache.org/xerces2-j/features.html
There is a feature named "http://apache.org/xml/features/honour-a ... aLocations", maybe this is the feature which needs to be enabled. But I'm not sure, this needs to be tested.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 11
- Joined: Tue Oct 30, 2012 10:56 pm
Re: validation of XML-instances consisting of elements from different namespaces
hi Radu,
Thanks for your quick reply (as always). I will need to try and test the Xerxes features. Not sure I can mimic oXygen though
keep up the good work
Theun
Thanks for your quick reply (as always). I will need to try and test the Xerxes features. Not sure I can mimic oXygen though

keep up the good work
Theun
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service