Page 1 of 1

Granular Control Over Which Elements Have Profile Attributes Shown in DITA Framework

Posted: Wed Mar 20, 2024 4:10 am
by dreifsnider
Hi,

I'm wondering if it's possible to have more granular control over which elements have profiling attributes displayed when the Show Profiling Attributes option is selected.

For example, in some DITA topics we're using the platform profiling attribute on the root topic element to enable some custom Schematron validation. This platform attribute is not being used for any profiling whatsoever. However, the same topic might contain other elements that we do want to profile according to the platform attribute.

In this case, when the Show Profiling Attributes option is selected, we'd prefer for only the elements descended from the topic element to have profiling attributes displayed for them, and to have the root topic element to not have any profiling attributes displayed.

Here's a screenshot to better visualize what we're hoping to achieve:
image.png
I've attempted to use CSS to achieve this, but I'm not having any luck:

Code: Select all

*[class~='topic/topic'][platform]:after(1) {
    display:none;
}

*:not([class~='topic/topic'])[platform]:after(1){
    display:inherit;
}
Is there any way to have more granular control over which elements have the profiling attribute shown?

Thanks!

Daniel

Re: Granular Control Over Which Elements Have Profile Attributes Shown in DITA Framework

Posted: Wed Mar 20, 2024 8:55 am
by Radu
Hi Daniel,
In the Oxygen desktop application the profiling attributes are not shown by defining rules in a CSS file and they also cannot be hidden using CSS rules.
I would suggest you use another attribute on the root element like "outputclass" to mark such topics with special Schematron processing instead of using profiling attributes.
Regards,
Radu

Re: Granular Control Over Which Elements Have Profile Attributes Shown in DITA Framework

Posted: Wed Mar 20, 2024 9:52 pm
by dreifsnider
Hi Radu.

Thanks for your reply. That's unfortunate that the profiling attributes are not shown through CSS. We will investigate using a different, non-profiling attribute on the root element. I'm not optimistic that we will be able to simply because of the investment we've already made in adding this attribute to our topics and developing our current Schematron rules, but I will still discuss this with my team.

After looking at the the the profiling.css located at [OXYGEN_INSTALL_DIR]/frameworks/dita/css/webauthor, it looks like Web Author however does use CSS to display the profiling attributes. Is this correct?

We'd also like to make this change in Web Author and Content Fusion as well, so maybe we'd be able to accomplish this via CSS in these web apps but just not in Oxygen Desktop?

Thanks again!

Daniel

Re: Granular Control Over Which Elements Have Profile Attributes Shown in DITA Framework

Posted: Thu Mar 21, 2024 8:09 am
by Radu
Hi Daniel,
I'm not optimistic that we will be able to simply because of the investment we've already made in adding this attribute to our topics and developing our current Schematron rules, but I will still discuss this with my team.
The Oxygen main menu Tools->"XML Refactoring" dialog has a "Rename attribute" action which can be applied on multiple files. Or you can use plain "Find/Replace in Files" to rename an attribute with a certain value.
After looking at the the the profiling.css located at [OXYGEN_INSTALL_DIR]/frameworks/dita/css/webauthor, it looks like Web Author however does use CSS to display the profiling attributes. Is this correct?
Yes, WebAuthor does use plain CSS to control the appearance of profiling attributes.
We'd also like to make this change in Web Author and Content Fusion as well, so maybe we'd be able to accomplish this via CSS in these web apps but just not in Oxygen Desktop?
Yes, exactly! There is a difference in how this show profiling attributes feature is implemented in the Oxygen desktop/webauthor distributions.

Regards,
Radu