Getting the currently applied profiling configuration programatically for use in Author Actions
Posted: Fri Dec 14, 2018 11:19 am
Hi,
when executing some Dita custom Author actions on a currently opened dita topic, is there a way to retrieve programmatically the profiling scheme that is currently applied on the opened Dita topic?
The rationale:
When selecting a pool of elements with an xpath to perform a custom operation, it seems that all the selected elements are affected by the operation, even the ones that are excluded under the currently applied profiling scheme.
For instance lets assume I am selecting with an Xpath all the rows in a table in order to apply a custom action. In the example below, 3 rows are selected, 2 of them with profiling attribute "GENERIC_A" and 1 with profiling attribute "GENERIC_B":
Now lets assume I am applying a profiling scheme on this topic with the following ditaval:
It results in having the first 2 rows rendered and the 3rd row hidden.
Now if I execute a custom operation on all selected rows, the action affects all 3 rows even if the 3rd row is hidden under the current profiling scheme.
If I would like to only affect the visible rows, I could statically select only the rows with otherprops="GENERIC_A">.
But what if I would like my custom operation to automatically detect the currently applied profiling scheme?
when executing some Dita custom Author actions on a currently opened dita topic, is there a way to retrieve programmatically the profiling scheme that is currently applied on the opened Dita topic?
The rationale:
When selecting a pool of elements with an xpath to perform a custom operation, it seems that all the selected elements are affected by the operation, even the ones that are excluded under the currently applied profiling scheme.
For instance lets assume I am selecting with an Xpath all the rows in a table in order to apply a custom action. In the example below, 3 rows are selected, 2 of them with profiling attribute "GENERIC_A" and 1 with profiling attribute "GENERIC_B":
Code: Select all
<row otherprops="GENERIC_A">
<entry >cell_content</entry>
<entry >cell_content</entry>
</row>
<row otherprops="GENERIC_A">
<entry >cell_content</entry>
<entry >cell_content</entry>
</row>
<row otherprops="GENERIC_B">
<entry >cell_content</entry>
<entry >cell_content</entry>
</row>
Code: Select all
<prop att="otherprops" val="GENERIC_A" action="include"/>
<prop att="otherprops" val="GENERIC_B" action="exclude""/>
Now if I execute a custom operation on all selected rows, the action affects all 3 rows even if the 3rd row is hidden under the current profiling scheme.
If I would like to only affect the visible rows, I could statically select only the rows with otherprops="GENERIC_A">.
But what if I would like my custom operation to automatically detect the currently applied profiling scheme?
- Is there a way to retrieve programmatically the "include" or "exclude" profiling configuration applied on an otherprops attribute for the currently opened topic?
- If not, is there a way to programmatically retrieve the profiling from the ditaval if both the ditaval and the topic are associated in the same map?