Catalog rewriteSystem not working for UNIX paths
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 2
- Joined: Wed Feb 19, 2020 11:36 am
Catalog rewriteSystem not working for UNIX paths
Hi all,
I have an entity declaration file which referes a UNIX file (because the generator runs on Linux subsystem). For example:
To help Oxygen find this file I have an XML catalog using rewriteSystem but whatever I declare there is not recognized by Oxygen.
Doesn't help if I omit file:// or also add it somewhere else.
Interestingly, if the path to the entity file is Windows-like, it works. In this example, Doc_Path is a variable containing a Windows path and it is correctly replaced and found by Oxygen:
Any idea what I'm doing wrong?
Heiko
I have an entity declaration file which referes a UNIX file (because the generator runs on Linux subsystem). For example:
Code: Select all
<!ENTITY % mydoc SYSTEM "/mnt/c/Projects/Doc/fragments/Common/mydoc.ent"> %mydoc;
Code: Select all
<rewriteSystem systemIdStartString="/mnt/c/Projects/Doc/" rewritePrefix="file:///C:/Projects/Doc/"/>
Interestingly, if the path to the entity file is Windows-like, it works. In this example, Doc_Path is a variable containing a Windows path and it is correctly replaced and found by Oxygen:
Code: Select all
<rewriteSystem systemIdStartString="file://Doc_Path" rewritePrefix="file:///C:/Projects//Doc/"/>
Heiko
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Catalog rewriteSystem not working for UNIX paths
Hi Heiko,
The path ""/mnt/c/Projects/Doc/fragments/Common/mydoc.ent"" is a file path. The code which calls the catalog resolvers first tries to convert it to an URL-like path and on Windows the converted path will look like this:
file:/D:/mnt/c/Projects/Doc/fragments/Common/mydoc.ent
depending on the drive where the Oxygen application is installed.
So your XML catalog will need to use something like file:/D:/mnt/c/Projects/Doc/ in the "systemIdStartString" value.
Or you can use multiple "systemIdSuffix" mappings.
Or instead of using in the XML document a local system ID value you could use an URL-like path:
which would need to be resolved through the XML catalogs (but the resolution would be consistent on all platforms).
Regards,
Radu
The path ""/mnt/c/Projects/Doc/fragments/Common/mydoc.ent"" is a file path. The code which calls the catalog resolvers first tries to convert it to an URL-like path and on Windows the converted path will look like this:
file:/D:/mnt/c/Projects/Doc/fragments/Common/mydoc.ent
depending on the drive where the Oxygen application is installed.
So your XML catalog will need to use something like file:/D:/mnt/c/Projects/Doc/ in the "systemIdStartString" value.
Or you can use multiple "systemIdSuffix" mappings.
Or instead of using in the XML document a local system ID value you could use an URL-like path:
Code: Select all
<!ENTITY % mydoc SYSTEM "http://sample.com/Projects/Doc/fragments/Common/mydoc.ent"> %mydoc;
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 2
- Joined: Wed Feb 19, 2020 11:36 am
Re: Catalog rewriteSystem not working for UNIX paths
Thank you, Radu! I tried your solution but I still get FileNotFound exceptions.
It appears that these are now related to nested inclusions. The file "/mnt/c/Projects/Doc/fragments/Common/mydoc.ent" again contains declarations like <!ENTITY % keys SYSTEM "/mnt/c/Projects/Doc/fragments/Common/keys.ent"> %keys;.
Should the rewrite also work for such hierarchical inclusions?
It appears that these are now related to nested inclusions. The file "/mnt/c/Projects/Doc/fragments/Common/mydoc.ent" again contains declarations like <!ENTITY % keys SYSTEM "/mnt/c/Projects/Doc/fragments/Common/keys.ent"> %keys;.
Should the rewrite also work for such hierarchical inclusions?
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Catalog rewriteSystem not working for UNIX paths
Hi,
I proposed to you multiple solutions and I do not know which one you tried.
If you used the "systemIdSuffix" solution then indeed you would need to map all suffixes, included the ones for modules.
Regards,
Radu
I proposed to you multiple solutions and I do not know which one you tried.
If you used the "systemIdSuffix" solution then indeed you would need to map all suffixes, included the ones for modules.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ 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