Does Oxygen Web support more than CSS for Author mode style?

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
kdolan09
Posts: 8
Joined: Mon Apr 28, 2025 7:11 pm

Does Oxygen Web support more than CSS for Author mode style?

Post by kdolan09 »

We completed a prototype with Oxygen and learned a few things on the way. One issue we ran into was the ability to style the XML content in the way we need to style it.

One example: CSS can only access an element's attributes, not sibling, child or parent attributes.
Very simplified XML looks something like this: <a y="2"> <b z="1" /> </a>
Our CSS selector matches <a>. Our CSS style requires a call to an Oxygen function that needs the values of both the y and z attributes. Not possible. CSS selector for <a> cannot see <b>'s attributes. If we match <b>, it cannot see <a>'s attributes.

Another example: CSS gets complicated when XML is not displayed top to bottom, but reordered and side-by-side.
No example XML to show. There may be a way to do this with CSS, but we're short on CSS expertise. If XML was structured a bit differently, which in some cases we may be able to make happen but in other cases not, CSS might be easier to figure out and/or simpler.

Does Oxygen Web support anything that would help us here? We were thinking something that goes between the XML and CSS (e.g., XML + ??? + CSS) like XSL or a custom hook. Or is XML + CSS the only option available?

Thanks!
Kelly
cosminef
Site Admin
Posts: 251
Joined: Wed Aug 30, 2023 2:33 pm

Re: Does Oxygen Web support more than CSS for Author mode style?

Post by cosminef »

Hello,

Regarding styling the <a> element based on the attributes of its child <b>, this cannot be done with standard CSS selectors in Oxygen Web Author. However, you can use Oxygen’s extension APIs like StylesFilter [1] and AuthorParentNode [2] to implement custom logic that applies styles to a parent element based on its child’s attributes.

For styling the child <b> based on the parent <a> attributes, you can use the CSS child combinator selector (>) [3], for example a[y="2"] > b. This is supported and straightforward. If needed, this can also be extended using the same extension APIs for more complex scenarios.

For other CSS limitations in Web Author you can follow this topic: https://www.oxygenxml.com/doc/versions/ ... tions.html
Another example: CSS gets complicated when XML is not displayed top to bottom, but reordered and side-by-side.
No example XML to show. There may be a way to do this with CSS, but we're short on CSS expertise. If XML was structured a bit differently, which in some cases we may be able to make happen but in other cases not, CSS might be easier to figure out and/or simpler.
For this example, could you please still provide us with a clear example or at least explain in more detail what you mean?

Best,
Cosmin

[1] https://www.oxygenxml.com/InstData/Edit ... ilter.html
[2] https://www.oxygenxml.com/InstData/Edit ... tNode.html
[3] https://developer.mozilla.org/en-US/doc ... combinator
Cosmin Eftenie
www.oxygenxml.com
Post Reply