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

Having trouble installing Oxygen? Got a bug to report? Post it all here.
roopesh79
Posts: 27
Joined: Fri Jul 29, 2022 9:55 am

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

Post 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>
chrispitude
Posts: 922
Joined: Thu May 02, 2019 2:32 pm

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

Post 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.
alex_jitianu
Posts: 1016
Joined: Wed Nov 16, 2005 11:11 am

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

Post 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
Post Reply