Format Document changes the include Path

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
fsteimke
Posts: 46
Joined: Tue Jan 01, 2013 3:19 pm

Format Document changes the include Path

Post by fsteimke » Sat Apr 04, 2015 7:07 am

Hi all,

i hava a DocBook Customization Layer written in Relax NG (compact syntax). It starts with an include of the Original DocBook Grammar. I am working with Catalog Files. My customization layer starts like this:

Code: Select all

include "http://docbook.org/5.0/rng/docbookxi.rnc" {
My Catalog File maps the virtual URI given above to a real one in my Filesystem. Trial and Error shows that two Entries are neccessary (without the rewriteSystem, validation of the Relax NG File does work, but Format Document does not).

Code: Select all


<rewriteURI 
uriStartString="http://docbook.org/"
rewritePrefix="file:///C:/Program%20Files%20(x86)/Oxygen%20XML%20Editor%2016/frameworks/docbook/"/>
<rewriteSystem
systemIdStartString="http://docbook.org/"
rewritePrefix="file:///C:/Program%20Files%20(x86)/Oxygen%20XML%20Editor%2016/frameworks/docbook/"/>
The only problem is, that Format Document will change the value of the included URI. The URI will be replaced by an relative Path to the File in my Filesystem. The include will look like this after Format Document:

Code: Select all

include "../../../../../../Program%20Files%20(x86)/Oxygen%20XML%20Editor%2016/frameworks/docbook/5.0/rng/docbookxi.rnc"
I think that this is not intended.

Sincerely,
Frank

adrian
Posts: 2548
Joined: Tue May 17, 2005 4:01 pm

Re: Format Document changes the include Path

Post by adrian » Mon Apr 06, 2015 12:22 pm

Hello,

Thank you for reporting this "Format and Indent" bug. I was able to reproduce the problem and have logged it on our issue tracking tool to be resolved in a future version. Note that this problem is only triggered when you resolve the systemID of the RNC, which is actually not necessary for RNC (only the URI must be resolved).

On another note, I'm not sure if it's intentional, but the URI you're using in the include seems incorrect:
http://docbook.org/5.0/rng/docbookxi.rnc
The correct URI is:
http://docbook.org/xml/5.0/rng/docbookxi.rnc
If you use the correct URI, you will notice that it is already resolved by Oxygen's default XML catalogs (from the DocBook framework), so you won't need your custom XML catalog in the first place.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Radu
Posts: 6450
Joined: Fri Jul 09, 2004 5:18 pm

Re: Format Document changes the include Path

Post by Radu » Mon Oct 02, 2017 3:50 pm

Hi,

Just to update this thread, the Oxygen 19.1 we made a couple of days ago should have a fix for this reported issue.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply