Page 1 of 1

XML-Catalog and Format and Indent for RELAX NG

Posted: Tue Mar 04, 2014 4:26 pm
by fsteimke
Hi,

we have written a grammar which extends docbook 5. It starts like this:

Code: Select all

default namespace db = "http://docbook.org/ns/docbook" 
include "http://docbook.org/xml/5.0/rng/docbookxi.rnc" {
...
}

Since we are behind a proxy in our enterprise network, i use a catalog file to redirect access to the included docbook schema file to my local file system.

Code: Select all

<rewriteURI uriStartString="http://docbook.org/xml/5.0/"
        rewritePrefix="file:///C:/Program%20Files/Oxygen%20XML%20Editor%2015/frameworks/docbook/5.0/"/>

This work fine for validating, i. e. validating the schema file works as well as validating xml-documents conforming to this schema.

However, the format and indent applied to the schema file ends with a timeout: Connect to docbook.org:80 timed out (http://docbook.org/xml/5.0/rng/docbookxi.rnc).

Question is: how to configure catalog files so that format and indent will work correct?

Sincerely,
Frank Steimke

Re: XML-Catalog and Format and Indent for RELAX NG

Posted: Tue Mar 04, 2014 5:43 pm
by adrian
Hi,

The Format and Indent is probably trying to resolve the URL as a system ID.
Try adding to your XML catalog an entry that resolves the systemID:

Code: Select all

<rewriteSystem systemIdStartString="http://docbook.org/xml/5.0/"
    rewritePrefix="file:///C:/Program%20Files/Oxygen%20XML%20Editor%2015/frameworks/docbook/5.0/"/>

Regards,
Adrian

Re: XML-Catalog and Format and Indent for RELAX NG

Posted: Wed Mar 05, 2014 10:48 am
by fsteimke
Many Thanks Adrian,

it works. The many different options in catalog files and their use for different purposes always puzzels me.

Sincerely,
Frank