Page 1 of 1

How to retain default outputclass for element while applying speciific attribute a certain elements in OxygenXML Author

Posted: Fri May 19, 2023 8:58 am
by roopesh79
Hi Team,

I have defined generic output class in cc_config.xml for all elements. Now I am trying to add a different output class only for codeblock element , but all the default attributes are getting removed when I open Oxygenxml Author. how to retain all the generic attribute in codeblock?

Code: Select all

<match elementName="codeblock" attributeName="outputclass" editable="true">
		<items action="append"> 
			<item value="language-java"
				annotation=""/>
		</items>
</match>
Generic output class for all element

Code: Select all

<match attributeName="outputclass" editable="true">
			<items action="append"> 
			<item value="text-foreground-blue"/>
			<item value="text-foreground-brown"/>
			<item value="text-foreground-dark-green"/>
			<item value="text-foreground-light-green"/>
</items>
</match>

Re: How to retain default outputclass for element while applying speciific attribute a certain elements in OxygenXML Aut

Posted: Fri May 19, 2023 1:19 pm
by chrispitude
Hi Roopesh,

I don't think multiple content completion specifications can apply to the same element. If you want <codeblock> to be different than the default, it will need to include all aspects that you want.

Also, according to the documentation at

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

the <match> element is deprecated in favor of <elementProposals>, so it might be worthwhile moving to that method.

Re: How to retain default outputclass for element while applying speciific attribute a certain elements in OxygenXML Aut

Posted: Wed May 24, 2023 2:43 pm
by alex_jitianu
Hi Roopesh,

Chris is correct, currently only one rule is applied, the one with the higher specificity. We have an issue recorded to enable a behavior in which we combine multiple rules and I have added your vote for it. For now you will have to include all values that you want in the more-specific rule.

Best regards,
Alex