Page 1 of 1

XML Catalog does not work for CSS import

Posted: Wed Sep 09, 2020 7:09 am
by fsteimke
Hi,

the Oxygen Help System says that the XML Catalog will be used for CSS Imports.

However, i have this entry in my catalog file (XML Catalog 1.1):

Code: Select all

<uri name="http://docbook.org/docbook.css"
 uri="file:///c:/Program%20Files/Oxygen%20XML%20Editor%2022/frameworks/docbook/css/docbook.css"/>
And this import in my CSS File:

Code: Select all

@import "http://docbook.org/docbook.css";
I get an Error from the W3C CSS Validator (CSS3 Engine): Error in 301

I use the same catalog file for my XML Files, so it works in general. This happens with XML Editor 22.1, build 2020061102 on Windows 10.

Thanks,
Frank

Re: XML Catalog does not work for CSS import

Posted: Wed Sep 09, 2020 9:14 am
by Radu
Hi Frank,

I guess you are referring to this topic in the Oxygen user's manual:

https://www.oxygenxml.com/doc/versions/ ... ports.html

The topic states that Oxygen resolves the imports through the XML catalog support when rendering content in the Author visual editing mode.
Indeed if you validate the CSS the W3C CSS validator we are using will report an error for that specific import, that's because the CSS validator does not have XML catalog support. We have an internal issue to add XML catalog support to our CSS validator. This particular feature of resolving CSS imports through an XML catalog is specific to Oxygen and it's a flexibility when creating CSSs for visual editing inside Oxygen. But CSS validation needs to take into account also people editing CSS in Oxygen and deploying them to a web browser, web browser which does not use XML catalog.

But when using the CSS for an XML document switched to the Author visual editing mode the reference should be resolved through the XML catalog support, so you should ignore the validation error and see if the CSS is properly resolved when the XML document is opened in the Author visual editing mode.

Regards,
Radu

Re: XML Catalog does not work for CSS import

Posted: Wed Sep 09, 2020 7:37 pm
by fsteimke
Hi Radu,

thanks for the explanation. It works well, i will ignore the error message.

Thanks,
Frank