oxygenxml / userguide

The oXygen XML userguide
42 stars 76 forks source link

Describe more element replacement details In the "Content Completion" dialog documentation #212

Closed chrispy-snps closed 3 years ago

chrispy-snps commented 3 years ago

In step 2 of the the "Customizing the Content Completion Assistant for Author Mode Only", it would be helpful to explicitly mention the following:

raducoravu commented 3 years ago

I added more details about the "Replacement for" field, @StevenHiggs when you have the time maybe you can check my modifications. About this remark:

 If you set the "Display item only when element is allowed at cursor" checkbox, you do not need to define a "oxy:allows-child-element" activation XPath in the "Author Action" dialog.

from what I checked the activation XPath is no longer checked when you invoke the content completion window but it is still checked when you press enter to invoke the action in the content completion window. @chrispy-snps my changes in the user's guide look something like this.

Use this section to replace an existing element with the configured action:
 Element name, Namespace fields - Define the name (and namespace, if needed) of the replaced element. The original element no longer needs to be excluded using the Filter - Remove content completion items table.
 Display item only when element is allowed at cursor - The configured action is contributed in the UI components selected in the Contribute to section only if the associated schema allows the original element at the current location in the document. This is equivalent to defining activation XPaths in the Author Action dialog box using the oxy:allows-child-element() XPath extension function. Activation XPaths for the action are still checked when the action is invoked.