Problem with XML Catalog
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 12
- Joined: Tue Nov 01, 2011 12:24 pm
Problem with XML Catalog
Hi,
I am having problem with using an XML catalog. Hope someone can help.
I am validating a set of XML files using a Schematron schema. The schema references some external XML files for the assert tests, and loads these using expressions like "document('subdir/data.xml')". I have then an XML Catalog file, which I have added to the list of catalog files in the Preferences (at both Global and Project scope), and which contains mappings like this <uri name="subdir/data.xml" uri="localpath-to-xml-file"/>.
No matter how much I play around with the settings, the Catalogs log panel shows:
Description: Resolved URI: file:/C:/Program%20Files/Oxygen%20XML%20Editor%2014/subdir/data.xml file:/C:/Program%20Files/Oxygen%20XML%20Editor%2014/subdir/data.xml
That is, the catalog mapping seems to have no effect!
I am on v14.1. Thanks for help!
Regards,
Mats
I am having problem with using an XML catalog. Hope someone can help.
I am validating a set of XML files using a Schematron schema. The schema references some external XML files for the assert tests, and loads these using expressions like "document('subdir/data.xml')". I have then an XML Catalog file, which I have added to the list of catalog files in the Preferences (at both Global and Project scope), and which contains mappings like this <uri name="subdir/data.xml" uri="localpath-to-xml-file"/>.
No matter how much I play around with the settings, the Catalogs log panel shows:
Description: Resolved URI: file:/C:/Program%20Files/Oxygen%20XML%20Editor%2014/subdir/data.xml file:/C:/Program%20Files/Oxygen%20XML%20Editor%2014/subdir/data.xml
That is, the catalog mapping seems to have no effect!
I am on v14.1. Thanks for help!
Regards,
Mats
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Problem with XML Catalog
Hi,
This is not going to work: The problem is that @name has to be an absolute URI, and you're using a relative one. The reason this doesn't work is that the URI from document('subdir/data.xml') gets expanded to an absolute URI prior to being resolved by the XML catalog resolver. So the absolute URI ends up being: file:/C:/Program%20Files/Oxygen%20XML%20Editor%2014/subdir/data.xml
So, since you don't have an absolute URI, you should use uriSuffix instead: Note that I've added a '/' before 'subdir' to make sure it won't match partial paths (e.g. thissubdir, thatsubdir).
Regards,
Adrian
This is not going to work:
Code: Select all
<uri name="subdir/data.xml" uri="localpath-to-xml-file"/>
So, since you don't have an absolute URI, you should use uriSuffix instead:
Code: Select all
<uriSuffix uriSuffix="/subdir/data.xml" uri="localpath-to-xml-file"/>
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
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