Page 1 of 1

cc_value_config.xml manipulation and setting

Posted: Thu Jun 30, 2016 5:50 pm
by Vangelis
Dear Support,

Is an API available to set the content of cc_value_config.xml better than leaving the component always load this file from classpath.

To clarify we will need to provide the content completion configuration file dynamically to this API.

Best regards.

Re: cc_value_config.xml manipulation and setting

Posted: Thu Jun 30, 2016 6:06 pm
by Radu
Hi,

If you edit the document type association for your type of document in the Document Type Association preferences page, in the Extensions tab you can set a content completion handler which extends the Java API ro.sync.contentcompletion.xml.SchemaManagerFilter.

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

Regards,
Radu

Re: cc_value_config.xml manipulation and setting

Posted: Thu Jun 30, 2016 6:25 pm
by Vangelis
Hello Radu,

We know the possibility you are talking about, but the goal was to reuse what you are proposing via the configuration completion parameter file.

Is there a way to tell to the completion Api to load/refresh the xml configuration file based on the structure/schema we have setup).

Or use case :
- we have another external xml rules from wich we have to extract restriction (element, attribute value) each time we open a document in Author component.
- then we have to provide this restriction to the content completion in Author component.
- ou idea was to generate dynamically the cc_value_config.xml content in order to be able to update the rules dynamically.
- another idea was to have default cc_value_config.xml (as today) and be able to overide/complete it if external xml rules are detected.

We would like to keep the cc_value_config file mecanism, if possible.

Best regards

Re: cc_value_config.xml manipulation and setting

Posted: Fri Jul 01, 2016 9:30 am
by Radu
Hi,

Sorry but the XML configuration file is a static way to filter out content completion elements/attributes and the same configuration is cached and reused between multiple XML documents which belong to the same document type configuration.
So you will have to create your own SchemaManagerFilter Java implementation.

Regards,
Radu