CSS import with editor variables: possible bug under Linux
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 87
- Joined: Tue Jan 01, 2013 3:19 pm
CSS import with editor variables: possible bug under Linux
Oxygen User Manual says in the section about Handling CSS Import: "You can use various editor variables in CSS imports. When editing an XML document with an associated CSS in Author mode, the editor variables will be expanded and resolved."
However, when i try this feature with the example given in the manual
i get an error like about No such File or Directory for this Path:
/home/frank/kosit/dsmeld/DocBook-DSMeld/css/${framework(DITA)}/custom.css
As you can see, it does not recognize and expand the editor Variable. Instead, the expression is treated like a regular file path relative to the location of the importing CSS file.
It's Oxygen XML Editor 23.1 on Linux Mint 20.2 Cinnamon.
Sincerely, Frank
However, when i try this feature with the example given in the manual
Code: Select all
@import "${framework(DITA)}/custom.css";
/home/frank/kosit/dsmeld/DocBook-DSMeld/css/${framework(DITA)}/custom.css
As you can see, it does not recognize and expand the editor Variable. Instead, the expression is treated like a regular file path relative to the location of the importing CSS file.
It's Oxygen XML Editor 23.1 on Linux Mint 20.2 Cinnamon.
Sincerely, Frank
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: CSS import with editor variables: possible bug under Linux
Hi Frank,
The validation of the CSS is done with the W3C CSS validator which cannot interpret such Oxygen-specific editor variables. So indeed validation shows errors.
But when the CSS is interpreted by Oxygen when computing styles for the Author visual editing mode, Oxygen should properly expand the editor variables in imports.
Regards,
Radu
The validation of the CSS is done with the W3C CSS validator which cannot interpret such Oxygen-specific editor variables. So indeed validation shows errors.
But when the CSS is interpreted by Oxygen when computing styles for the Author visual editing mode, Oxygen should properly expand the editor variables in imports.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 87
- Joined: Tue Jan 01, 2013 3:19 pm
Re: CSS import with editor variables: possible bug under Linux
Hi Radu,
i am not convinced. It's not a CSS Error (validating against CSS Spec).
It's a "File not found" Error. Oxygen tries to import a file with a wrong URL.
Frank
i am not convinced. It's not a CSS Error (validating against CSS Spec).
It's a "File not found" Error. Oxygen tries to import a file with a wrong URL.
- The wrong URL contains the Editor variable literally (not expanded);
- It starts with the Directory-Path of the importing CSS File (the URL seems to be relative to the importing CSS file)
Frank
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: CSS import with editor variables: possible bug under Linux
Hi Frank,
Do you obtain this error when you validate the CSS (manual or automatic validation) or when the CSS is actually used in the Author visual editing mode to render the XML content?
Regards,
Radu
Do you obtain this error when you validate the CSS (manual or automatic validation) or when the CSS is actually used in the Author visual editing mode to render the XML content?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 87
- Joined: Tue Jan 01, 2013 3:19 pm
Re: CSS import with editor variables: possible bug under Linux
To be precise: i edit the css file and write down the @import statement. I get immediatly the error Message "File not found". You can find the exact error message in my first post. I do not active validate the CSS file.
I am not sure what really happens, sorry - maybe it is "validating CSS in the background"?
Since i am not at my linux system right now, i can't answer what happens without the @import statement.
Frank
I am not sure what really happens, sorry - maybe it is "validating CSS in the background"?
Since i am not at my linux system right now, i can't answer what happens without the @import statement.
Frank
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: CSS import with editor variables: possible bug under Linux
HI Frank,
The "${framework(DITA)}" gets translated to a location path like "OXYGEN_INSTALL_DIR/frameworks/dita", do you actually have a "custom.css" saved there?
Can you give me step by step details to reproduce the problem? Did you create for example an extension of the DITA framework? How are you using your custom CSS stylesheet?
Here's what I did on my side to quickly test things:
1) Created a "custom.css" somewhere on disk with the content:
2) Opened a DITA topic and added before the root element a reference to the custom.css like for example:
3) Switched the topic to the Author visual editing mode, I received no error and the text has red foreground.
Regards,
Radu
The "${framework(DITA)}" gets translated to a location path like "OXYGEN_INSTALL_DIR/frameworks/dita", do you actually have a "custom.css" saved there?
Can you give me step by step details to reproduce the problem? Did you create for example an extension of the DITA framework? How are you using your custom CSS stylesheet?
Here's what I did on my side to quickly test things:
1) Created a "custom.css" somewhere on disk with the content:
Code: Select all
@import "${framework(DITA)}/css/core/-dita.css";
* {
color:red;
}
Code: Select all
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<?xml-stylesheet type="text/css" href="../../../../../../Desktop/custom/custom.css"?>
<topic id="introduction">
....
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 87
- Joined: Tue Jan 01, 2013 3:19 pm
Re: CSS import with editor variables: possible bug under Linux
Hi Radu,
i am back at my Linux system and can confirm, that there is no bug. Sorry for false alarm.
I have checked with a fresh file, which is not part of the framework i have created.
Thanks,
Frank
i am back at my Linux system and can confirm, that there is no bug. Sorry for false alarm.
I have checked with a fresh file, which is not part of the framework i have created.
- with import statement, i still get the error message "File not found", but CSS rendering shows that import happens (looks fine);
- without import statement, rendering looks ugly
Thanks,
Frank
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: CSS import with editor variables: possible bug under Linux
Hi Frank,
Thanks for testing this, we have some plans for enhancing the validation to also expand editor variables, once we'll do this there will be consistency. I'll update this forum thread when we do.
Regards,
Radu
Thanks for testing this, we have some plans for enhancing the validation to also expand editor variables, once we'll do this there will be consistency. I'll update this forum thread when we do.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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