Page 1 of 1

Catalog not getting parsed for certain elements

Posted: Thu May 26, 2016 3:24 am
by strohma
I'm trying to use rewriteSystem and rewriteURI entries to my DocBook catalog and am running into some issues. I added the following entries to the catalog:

Code: Select all

  <rewriteSystem systemIdStartString="file://SharedCode/" rewritePrefix="file:///C:/shared-code/"/>
<rewriteURI uriStartString="file://SharedCode/" rewritePrefix="file:///C:/shared-code/"/>
I added the following to one of my source files:

Code: Select all

  <programlisting><xi:include href="file://SharedCode/ruby-example.rb" parse="text"/></programlisting>

<programlisting><xi:include href="file:///C:/shared-code/ruby-example.rb" parse="text"/></programlisting>

<xi:include href="file://SharedCode/section.xml" parse="xml"/>
When I view the source file in Author mode, the contents of section.xml and the programlisting with the hard-coded file path are displayed correctly, but I get a Target file not found error that says that \\SharedCode\ruby-example.rb could not be found for the SharedCode entry.

Code: Select all

Severity: warning
Description: [Document]:\\SharedCode\ruby-example.rb (The network path was not found)
It appears that the catalog is not being parsed when the xi:include is inside of a text element.

Is there a way to tell the parser to use the catalog for other parent element types?

Re: Catalog not getting parsed for certain elements

Posted: Thu May 26, 2016 6:37 pm
by adrian
Hi,

What version and build of Oxygen are you using (Help > About)?

From what I tested, there appears to be an inconsistency (bug) in the way network share URIs are currently (v18) resolved. While the validation prefers the original form file://server/share (2 slashes), the Author mode prefers the alternate form file:////server/share (4 slashes).
So, right now, due to this inconsistency between Oxygen mechanisms, you have to resolve both forms in the XML catalog.
For your example, you have to duplicate the entries in the catalog and also resolve the alternate form "file:////SharedCode/" (4 slashes).

For most XML Catalog problems, you should set In Options > Preferences, XML > XML Catalog, Verbosity to "All messages" and check in the Catalogs view the attempts that the catalog resolver makes. Note that not all attempts must succeed.

Regards,
Adrian

Re: Catalog not getting parsed for certain elements

Posted: Thu May 26, 2016 7:27 pm
by strohma
Adrian,

Apologies for the lack of version information. I am using 17.1.

I implemented your workaround and it works. Thank you so much for the assistance!

Strohm