- How to configure Quark XML Author to use external methods?
- How to implement the support for a new language?
- How to configure shortcut keys?
- How to configure single and multiple ribbons?
- How to configure Word Backstage view?
- How to configure Ribbon Nodes?
- How to hide third-party software ribbon tabs?
- How to configure XML Author actions through internal classes attributes?
- What is Extensibility Interface?
- How to configure Quark XML Author to use external methods for Extensibility Interface?
- How to program external methods for Quark XML Author?
- List of enumerated values that can be used as Extensibility Interface argument types.
- List of available delegates for Extensibility Interface.
- List of available document events for Extensibility Interface.
- How to resolve content and document references?
List of available delegates for Extensibility Interface.
List of Available Delegates
The available delegates and their signatures are defined below.
AssignDocVariable
public delegate void AssignDocVariable(string docVariableName, string docVarValue)
For the given document variable, supplies the string variable specified.
Configuration Example
<!-- This method looks for doc variables called "header" and "footer" in the Word document and sets them to a specific value-->
<Method id="AssignDocVariableEI" assembly="UIManipulation" class="UIManipulation.UIDelegates" method="AssignDocVariableTest">
<Argument type="Tokens">
<!-- the header and footer are doc variables defined in the dot file of the document. -->
<!-- In this simple example, the docVariables are set to a hardcoded value. -->
<Token>header=This is the Header</Token>
<Token>footer=This is the footer</Token>
</Argument>
<Argument type="Delegates">
<Delegate>AssignDocVariable</Delegate>
<Delegate>RefreshDocVariables</Delegate>
</Argument>
</Method>
AssignPostText
public delegate void AssignPostText(XmlNode visibleNode, string postTextString)
Assigns PostText portionmark values for a given visible node.
Configuration Example
<!-- PreText delegates test method definition -->
<!-- This method assigns a randomly generated string to the PreText area of a visible node-->
<Method id="PreTextEI" assembly="UIManipulation" class="UIManipulation.UIDelegates" method="PreTextPostTextTest">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate>GetNodeProperties</Delegate>
<Delegate>GetPreText</Delegate>
<Delegate>AssignPreText</Delegate>
<Delegate>GetPostText</Delegate>
<Delegate>AssignPostText</Delegate>
<Delegate>RefreshDocVariable</Delegate>
</Argument>
</Method>
AssignPreText
public delegate void AssignPreText(XmlNode visibleNode, string preTextString)
Assigns PreText portionmark values for a given visible node.
Configuration Example
<!-- PreText delegates test method definition -->
<!-- This method assigns a randomly generated string to the PreText area of a visible node-->
<Method id="PreTextEI" assembly="UIManipulation" class="UIManipulation.UIDelegates" method="PreTextPostTextTest">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate>GetNodeProperties</Delegate>
<Delegate>GetPreText</Delegate>
<Delegate>AssignPreText</Delegate>
<Delegate>GetPostText</Delegate>
<Delegate>AssignPostText</Delegate>
<Delegate>RefreshDocVariable</Delegate>
</Argument>
</Method>
AssignTextNode
public delegate void AssignTextNode(XmlNode visibleParaNode, string fragment, TriValue enableTrackChanges)
Replaces the content of the visibleParaNode with the contents of the fragment. Only
the text portion of the node (and any emphasis applied to that text) is replaced.
Any other child elements of the visibleParaNode are left intact. The value of enableTrackChanges
indicates whether to record TrackChanges for the change. The possible values are Quark.XA.ExtensibilityDelegates.TriValue.False
(do not record TrackChanges), Quark.XA.ExtensibilityDelegates.TriValue.True (record
TrackChanges), and Quark.XA.ExtensibilityDelegates.TriValue.NoValue (the current value
of TrackChanges for the document is used).
Configuration Example
<!-- AssignTextNode delegate test method definition -->
<!-- This method replaces the text in the XomCurrentNode with text from the location specified in the token-->
<Method id="AssignTextEI" assembly="XomManipulation" class="XomManipulation.XomDelegates" method="AssignTextNodeTest">
<Argument type="XomCurrentNode"/>
<Argument type="Tokens">
<!-- location of the text chunk which is being inserted -->
<Token>c:\temp\AssignTextNodeTest.txt</Token>
</Argument>
<Argument type="Delegates">
<Delegate>AssignTextNode</Delegate>
</Argument>
</Method>
Configuration Example
<Method id="UndoRecordingTest" assembly="UndoRecording" class="ExtensibilityInterface.Delegates.UndoRecording" method="UndoRecordingTest">
<Argument type="XomCurrentNode" />
<Argument type="Delegates">
<Delegate>AssignTextNode</Delegate>
<Delegate>BeginUndoRecording</Delegate>
<Delegate>EndUndoRecording</Delegate>
</Argument>
</Method>
BeginUndoRecording
public delegate void BeginUndoRecording()
Begins recording undo objects.
Configuration Example
<Method id="UndoRecordingTest" assembly="UndoRecording" class="ExtensibilityInterface.Delegates.UndoRecording" method="UndoRecordingTest">
<Argument type="XomCurrentNode" />
<Argument type="Delegates">
<Delegate>AssignTextNode</Delegate>
<Delegate>BeginUndoRecording</Delegate>
<Delegate>EndUndoRecording</Delegate>
</Argument>
</Method>
CreateContextMenu
public delegate void CreateContextMenu(XmlNode node, ContextMenuItem[] items);
Supplies the list of items to be placed in a context menu. Used typically for custom
context menus in post-text and pre-text portionmark areas.
Configuration Example
<!-- EI Method tests CreateContextMenu - the EI will use the current xom node and build the context menu. For this to work - assign a shortcut key to the ribbon button-->
<Method id="CreateContextMenuTest" assembly="CreateContextMenu" class="ExtensibilityInterface.Delegates.CreateContextMenuTest" method="TestCreateContextMenu">
<Argument type="XomCurrentNode"/>
<Argument type="Tokens">
<Token>Corporate Governance</Token>
<Token>Environment, Safety & Health</Token>
<Token>Facilities</Token>
<Token>Finance</Token>
<Token>Human Resources</Token>
<Token>Information Management</Token>
<Token>Integrated Safeguards & Security</Token>
<Token>Mission Execution</Token>
<Token>Supply Chain Management</Token>
</Argument>
<Argument type="Delegates">
<Delegate>CreateContextMenu</Delegate>
</Argument>
</Method>
DeleteNode
public delegate void DeleteNode(XmlNode nodeToBeDeleted, bool displayWarning = false);
Delete the node specified. This operation will also delete any schema-dependent nodes.
For instance, if the node to be deleted is a required child of a parent as defined
in the schema, the parent and all its other siblings will be deleted. Thus, the operation
will fail if the final delete root happens to be the root of the document.
DeleteNode Parameters
Parameter | Required | Definition |
nodeToBeDeleted | yes | XmlNode. The XOM Node to be Deleted. |
displayWarning | no | Boolean. Displays a warning before the node is deleted. Defaults to false. |
Configuration Example
<!-- DeleteNode delegate test method definition -->
<!-- This method tries to delete the incoming node -->
<Method id="DeleteEI" assembly="XomManipulation" class="XomManipulation.XomDelegates" method="DeleteNodeTest">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate>DeleteNode</Delegate>
</Argument>
</Method>
EmphasisAction
public delegate void EmphasisAction(XmlNode node, string emphasisName, string subStyleKey, string subStyleValue)
Used to apply emphasis.
For more information, see InternalClass”EmphasisAction”.
The delegate is available for use in XML Author documents and embedded Word documents.
Configuration Example
<Method id="TestEmphasisAction" assembly="XOMCurrentTest" class="XOMCurrentTest.XOMTest" method="TestEmphasisAction">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate>EmphasisAction</Delegate>
</Argument>
<Argument type="Tokens">
<Token>emphasisName=example</Token>
<!-- provide the name of an EmphasisDef that exists as child to the OLEWordDocument/ParaType/Emphasis -->
</Argument>
</Method>
EndUndoRecording
public delegate void EndUndoRecording()
Ends registering undo objects and also registers a compound Undo for all operations
that took place so that they can be undone with one Undo call.
Configuration Example
<Method id="UndoRecordingTest" assembly="UndoRecording" class="ExtensibilityInterface.Delegates.UndoRecording" method="UndoRecordingTest">
<Argument type="XomCurrentNode" />
<Argument type="Delegates">
<Delegate>AssignTextNode</Delegate>
<Delegate>BeginUndoRecording</Delegate>
<Delegate>EndUndoRecording</Delegate>
</Argument>
</Method>
FormattingAction
public delegate bool FormattingAction(string formattingName, string colorValue)
Used to apply/remove character formatting, font color and highlight color on current
selection.
For more information, see InternalClass”FormattingAction”.
The delegate is available for use in XML Author documents.
GetExportedNode
public delegate XmlNode GetExportedNode(XmlNode xomNode)
Returns the exported node for the specified XOM node.
Configuration Example
<!-- EI Method tests GetExportedNode, and GetExtensibldUserInterface - should display xml of current xom node in Word taskpane -->
<Method id="GetExtensibleUserInterfaceTest" assembly="ExtensibleUserInterface" class="ExtensibilityInterface.Delegates.ExtensibleUserInterface" method="GetExtensibleUserInterfaceTest">
<Argument type="XomCurrentNode" />
<Argument type="Delegates">
<Delegate>GetExportedNode</Delegate>
<Delegate>GetExtensibleUserInterface</Delegate>
</Argument>
</Method>
GetExtensibleUserInterface
public delegate IExtensibleUserInterface GetExtensibleUserInterface(ExtensibleUserInterfaceType type, UserControl control, string title, Guid guid = null, DockPosition dockPosition = DockPosition.dockPositionRight, bool createIfNotFound = true);
For a given custom UserControl, returns an object implementing the ITaskpane interface
which provides the incoming control with a parent form. Available parameters provide
support to show multiple custom task panes simultaneously, set default dock position
and to get an Extensible User Interface (EUI) object that has already been created.
GetExtensibleUserInterface Parameters
Parameter | Required | Definition |
type | yes | ExtensibleUserInterfaceType. Permissible values are Taskpane and Dialog. |
control | yes | UserControl. The control to be added to the task pane. |
title | yes | String. The title of ExtensibleUserInterfaceType. |
guid | no | GUID. An EI can now specify a GUID to create a separate task pane. If no GUID is specified, |
DockPosition | no | String. the default dock position can be specified when creating the task pane. Defaults |
createIfNotFound | no | Boolean. If true, it will create a new EUI if not already created. If false, it will |
Example :
GetExtensibleUserInterface(ExtensibleUserInterfaceType.Taskpane, taskPane, "Navigation Pane", guid, DockPosition.dockPositionLeft, true);
GetNextNode
public delegate XmlNode GetNextNode(XmlNode node)
Returns the next visible node in the document as an XML node. If provided node is
null, returns the first visible node in the document.
Configuration Example
<!-- GetNextNode delegate test method definition -->
<Method id="GetNextNodeEI" assembly="Doc_Navigation_Selection" class="Doc_Navigation_Selection.Selection_Navigation" method="GetNextNodeTest">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate>GetNextNode</Delegate>
<Delegate>SelectNode</Delegate>
</Argument>
</Method>
GetNodeProperties
public delegate void GetNodeProperties(XmlNode node, Hashtable ht)
Gets all properties defined for an attribute, element, or emphasis in the schema.
Currently the following properties are supported: NodeType (NodeType identifies the
type of incoming element-Element, Attribute or Emphasis), namespace, prefix, xmlname,
friendly, style, defaultHyperlink, displayAttribute, displayElement, insertAfter,
increaseIndent, decreaseIndent, excludeFromContextMenu, keyCode (only for NodeType=Element,
contains keyCode – the actual value if it is visible or -1 if it is not),submenu,
contextId, Unmanaged, UniqueIdentifier, externalMethodId, default, numbering, visible,
readonly , datatype, format, attrGroupName, required, fixed, and contextFriendly.
The contextFriendly property is the friendly name that is displayed in the context
menu/style list.
Configuration Example
<!-- PreText delegates test method definition -->
<!-- This method assigns a randomly generated string to the PreText area of a visible node-->
<Method id="PreTextEI" assembly="UIManipulation" class="UIManipulation.UIDelegates" method="PreTextPostTextTest">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate>GetNodeProperties</Delegate>
<Delegate>GetPreText</Delegate>
<Delegate>AssignPreText</Delegate>
<Delegate>GetPostText</Delegate>
<Delegate>AssignPostText</Delegate>
<Delegate>RefreshDocVariable</Delegate>
</Argument>
</Method>
GetPageNumber
public delegate string GetPageNumber(XmlNode node)
Returns the page number for the start of the given XML node.
Configuration Example
<!-- EI Method tests GetPageNumber - should display pagenumber of current xom node in a MessageBox -->
<Method id="GetPageNumberTest" assembly="GetPageNumber" class="ExtensibilityInterface.Delegates.PageNumberTest" method="GetPageNumberTest">
<Argument type="XomCurrentNode" />
<Argument type="Delegates">
<Delegate>GetPageNumber</Delegate>
</Argument>
</Method>
GetPostText
public delegate void GetPostText(XmlNode node, ref string prevPostTextValue)
Retrieves the value of a PostText portionmark for a given node and stores it in the
incoming prevPostTextValue parameter.
Configuration Example
<!-- PreText delegates test method definition -->
<!-- This method assigns a randomly generated string to the PreText area of a visible node-->
<Method id="PreTextEI" assembly="UIManipulation" class="UIManipulation.UIDelegates" method="PreTextPostTextTest">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate>GetNodeProperties</Delegate>
<Delegate>GetPreText</Delegate>
<Delegate>AssignPreText</Delegate>
<Delegate>GetPostText</Delegate>
<Delegate>AssignPostText</Delegate>
<Delegate>RefreshDocVariable</Delegate>
</Argument>
</Method>
GetPreText
public delegate void GetPreText(XmlNode node, ref string prevPreTextValue)
Retrieves the value of a PreText portionmark for a given node and stores it in the
incoming prevPreTextValue parameter.
Configuration Example
<!-- PreText delegates test method definition -->
<!-- This method assigns a randomly generated string to the PreText area of a visible node-->
<Method id="PreTextEI" assembly="UIManipulation" class="UIManipulation.UIDelegates" method="PreTextPostTextTest">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate>GetNodeProperties</Delegate>
<Delegate>GetPreText</Delegate>
<Delegate>AssignPreText</Delegate>
<Delegate>GetPostText</Delegate>
<Delegate>AssignPostText</Delegate>
<Delegate>RefreshDocVariable</Delegate>
</Argument>
</Method>
GetPreviousNode
public delegate XmlNode GetPreviousNode(XmlNode node)
Returns the previous visible node in the document as an XML node. If provided node
is null, the last visible node is returned.
Configuration Example
<!-- GetPreviousNode delegate test method definition -->
<Method id="GetPreviousNodeEI" assembly="Doc_Navigation_Selection" class="Doc_Navigation_Selection.Selection_Navigation" method="GetPreviousNodeTest">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate>GetPreviousNode</Delegate>
<Delegate>SelectNode</Delegate>
</Argument>
</Method>
GetSectionMetadata
public delegate XmlElement GetSectionMetadata(XmlNode visibleNode, bool getWordML)
Returns the metadata for the Word Section to which the provided visible node belongs.
The visibleNode has to be a visible XOM node. The getWordML boolean flag indicates
whether WordML for the header/footer node must also be returned.
The format of the node that is returned is shown below:
<WordSection orientation="portrait" breakType="sectionBreakNextPage">
<!-- orientation = portrait|landscape breakType=sectionBreakNextPage| sectionBreakContinuous -->
<Headers>
<!-- max of 3 Header nodes one each of type primaryPageHeader, firstPageHeader and evenPageHeader are possible-->
<Header type="primaryPageHeader">
<Fields>
<!-- Each field corresponds to Word's field - type is the field type, name is the field name, value is the value held by this feild -->
<Field type="wdFieldPage" name="PAGE \* MERGEFORMAT" value="2"/>
<Field type="wdFieldNumPages" name="NUMPAGES \* MERGEFORMAT" value="1"/>
<Field type="wdFieldDocVariable" name="DOCVARIABLE pf \* MERGEFORMAT" value="pf Number"/>
</Fields>
<!-- This is the text in the header/footer range-->
<Text>Range text content</Text>
<!-- This is a WordML representation of header/footer content-->
<WordML>WordML content</WordML>
</Header>
</Headers>
<Footers>
<!-- max of 3 Footer nodes one each of type primaryPageFooter, firstPageFooter and evenPageFooter are possible-->
<Footer type="primaryPageFooter">
<Fields>
<Field type="wdFieldDocVariable" name="xxx" value="yyy"/>
</Fields>
<Text> Range text content</Text>
<WordML>WordML Content</WordML>
</Footer>
</Footers>
</WordSection>
If the getWordML flag is false, the WordML nodes in bold above are absent. This is done because retrieving WordML
from headers and footers is a potentially expensive operation and should only be done
when it is required to parse any header/footer content that is not in the <Text> node
or the <Fields> node.
GetToggleButtonState
public delegate bool GetToggleButtonState(string externalMethodId)
Returns the state (true or false) of the toggle button specified by the given external
method ID.
Configuration Example
<Method id="GetToggleButtonState" assembly="GetToggleButtonState" class="ExtensibilityInterface.Delegates.ToggleButtonStateTest" method="GetToggleButtonStateTest">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate>SelectNode</Delegate>
<Delegate>GetToggleButtonState</Delegate>
</Argument>
</Method>
GetXmlResolver
public delegate IXmlResolverProvider GetXmlResolver();
GetXmlResolver is used to return the current instance of the IXmlResolverProvider
class used by Quark XML Author – it could be the default one used by Quark XML Author
or an external one provided by the SetXmlResolver delegate.
Information about creating and using custom resolvers can be found in Section 0.
Configuration Example
<!-- EI Method tests GetXmlResolver - if provider is successfully obtained message box will indicate that -->
<Method id="GetXmlResolverTest" assembly="GetXmlResolver" class="ExtensibilityInterface.Delegates.TestXmlResolver" method="GetXmlResolverTest">
<Argument type="Delegates">
<Delegate>GetXmlResolver</Delegate>
</Argument>
</Method>
GetXomNode
public delegate XmlNode GetXomNode(XmlNode exportedNode)
Returns the XOM node for the specified exported node.
An external process manipulates a document by modifying the XOM. This delegate is
used to create the XOM that represents the exportedNode.
Do not use the document’s CurrentExportedNode as the input parameter. Instead, you
must use a node within the document’s ExportedRoot.
A use case of GetXOMNode is to calculate the CRC for the exportedNode , GetXOMNode
of the exportedNode and then store that CRC in the XOM.
Configuration Example
<!-- EI Method tests GetXomNode - should display xml of xom node that corresponds to the first 'p' element of the exported root node in a MessageBox -->
<Method id="GetXomNodeTest" assembly="GetXomNode" class="ExtensibilityInterface.Delegates.XomNodeTest" method="GetXomNodeTest">
<Argument type="ExportedRoot" />
<Argument type="Delegates">
<Delegate>GetXomNode</Delegate>
</Argument>
</Method>
InsertEmphasis
public delegate void InsertEmphasis(XmlNode emphasisFragmentNode, bool overwriteSelectedContent
= false);
Inserts an emphasized text node into the specified XML node at the cursor position.
The selected content may or may not be replaced based on the value of overwriteSelectedContent.
An optional parameter with the default value false has been introduced in the InsertEmphasis delegate. If the value of this parameter
is set to true, it will replace the selected content on canvas.
For more information, see InternalClass”Insert Emphasis”.
The delegate is available for use in XML Author documents and embedded Word documents.
InsertEmphasis Parameters
Parameter | Required | Definition |
emphasisFragmentNode | yes | XmlNode. The fragment node of emphasis that needs to inserted at current selection. |
overwriteSelectedContent | no | Boolean. If true, it will insert an emphasis over the selection and will overwrite the selected content. |
Configuration Example
<!-- InsertEmphasis delegate test method definition -->
<!-- This method tries to insert the emphasis XML fragment at the current selection -->
<Method id="InsertEmphasisEI" assembly="XomManipulation" class="XomManipulation.XomDelegates" method="InsertEmphasisTest">
<Argument type="Tokens">
<!--location of the XML emphasis chunk which is being inserted-->
<Token>c:\temp\AssignTextNodeTest.txt</Token>
</Argument>
<Argument type="Delegates">
<Delegate>InsertEmphasis</Delegate>
</Argument>
</Method>
Configuration Example
<Method id="TestInsertEmphasis" assembly="XOMCurrentTest" class="XOMCurrentTest.XOMTest" method="TestInsertEmphasis">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate>InsertEmphasis</Delegate>
</Argument>
<Argument type="Tokens">
<Token>emphasisName=cite</Token>
<!-- provide the name of an EmphasisDef that exists as child to the OLEWordDocument/ParaType/Emphasis -->
</Argument>
</Method>
InsertNode
public delegate bool InsertNode(XmlNode visibleXomNode, XmlNode fragmentNode, string
elementDisplayName, bool preserveID = false, bool showErrorMsg = true);
Insert a new node immediately underneath the visibleXomNode specified. The new node
and the entire subtree underneath must be schema compliant and insertable immediately
under the visibleXomNode.
The third parameter, the element display name, needs to be populated only when there
are multiple contexts for the node being inserted. The elementDisplayName helps to
identify the element which the EI method intends to insert from a list of possible
insertables. In all other cases it can be null. If this property is null and there
are multiple insertables possible at the insertable point, the first one in the list
will be inserted.
InsertNode Parameters
Parameter | Required | Definition |
visibleXomNode | yes | XmlNode. The node under which the fragmentNode will be inserted. |
fragmentNode | Yes | XmlNode. The fragment node to be inserted. |
elementDisplayName | Yes | String. The friendly name of the element to be inserted. |
preserveID | Yes | Boolean. Preserves the ID of the inserted fragment node. Defaults to false. |
showErrorMsg | no | Boolean. Executes InsertNode in silent mode so that no message or warning is displayed |
Configuration Example
<!-- InsertNode delegate test method definition -->
<!-- This method tries to insert an XML fragment pointed to by the Token argument just below the location specified by the XomCurrentNode-->
<Method id="InsertEI" assembly="XomManipulation" class="XomManipulation.XomDelegates" method="InsertNodeTest">
<Argument type="XomCurrentNode"/>
<Argument type="Tokens">
<!-- location of the xml chunk which is being inserted -->
<Token>c:\temp\InsertNodeTest.txt</Token>
</Argument>
<Argument type="Delegates">
<Delegate>InsertNode</Delegate>
</Argument>
</Method>
InvokeInternalClass
public delegate void InvokeInternalClass(string internalClassName, Hashtable parameters)
Invokes an InternalClass from an extensibility method. This delegate is similar to
the InvokeMethodId delegate except that an InternalClass method is being invoked instead
of an extensibility method. Parameters required by the InternalClass must be specified
in the parameters argument as a Hash table of name-value pairs.
Configuration Example
<!-- EI Method tests InvokeInternalClass - the EI will use the delegate to invoke "DocumentClose"-->
<Method id="InvokeInternalClassTest" assembly="InvokeInternalClass" class="ExtensibilityInterface.Delegates.TestInvokeInternalClass" method="InvokeInternalClassTest">
<Argument type="Delegates">
<Delegate>InvokeInternalClass</Delegate>
</Argument>
</Method>
InvokeMethodId
public delegate object InvokeMethodId(string eiMethodName, XmlNode node = null);
Invokes an Extensibility Interfaces method in the DocConfig file that matches the
Extensibility Interface method name passed on specified XOM Node else if unspecified,
on XomCurrentNode. Hence by default this passes the same XomCurrentNode and ExportedCurrentNode
values that were passed to its parent method (the one calling InvokeMethodId) and
if not, then the corresponding values of specified XOM node. This passes the return
value of the invoked method (if any) back to the caller.
ToggleVisibleElement Parameters
Parameter | Required | Definition |
node | no | Node. This is an optional Xom Node parameter that can be specified by calling the |
eiMethodName | yes | String. |
Configuration Example
<!-- InvokeMethodId delegate test definition -->
<!-- This method invokes another EI method called JustAnotherEI -->
<Method id="InvokeAnotherEI" assembly="MiscellaneousDelegates" class="MiscellaneousDelegates.Misc" method="InvokeMethodIdTest">
<Argument type="Tokens">
<Token>JustAnotherEI</Token>
</Argument>
<Argument type="Delegates">
<Delegate>InvokeMethodId</Delegate>
</Argument>
</Method>
IsEditableElement
public delegate bool IsEditableElement(XmlNode node)
Returns true if the specified node is editable, otherwise it returns false. The node is not editable and IsEditableElement returns false if:
inv:access is not present
or inv:access = read-only
or inv:access = external
or qxa:read-only = true
Determination is based on values associated to a proprietary attribute called inv:access
where xmlns:inv=”urn:xpressauthor:xpressdocument”. The inv:access attribute has two
possible values: “read-only” and “external”. The external is set (by Quark XML Author)
for externally referenced elements such as referenced images or DITA conrefs. The
read-only is not set by Quark XML Author but Quark XML Author will look at any read-only
value set (say by an external method) to disable any UI changes to it.
Similar to inv:access, is the proprietary attribute qxa:read-only where xmlns:qxa=”urn:schemas-quark-com:xmlauthor”.
The difference between the two is that qxa:read-only is persisted with the document
when it is saved. The qxa:read-only attribute has two possible values: “true” and
“false”.
At the element-level, these read-only attributes are used to prevent the editing of
an element.
Referenced or embedded images are still resizable, regardless of the reference implementation
being used unless qxa:read-only is set to true.
Configuration Example
<!-- IsEditableElement delegate test method definition -->
<!-- This method returns whether the incoming node is editable or not. In this example the EI method is returning an boolean back to Xpress.
A boolean false returned by any EI method implies a failure which is interpreted by Xpress to signify halting of any further activities scheduled to
be executed under the same command(menu item/toolbar click or a document event trigger). For ex: for the DocumentSave event we might have a
Ei method which checks for certain problems with the document. If this EI method returns a false, the save operation is halted and the user is notified of the failure.-->
<Method id="IsEditableEI" assembly="MiscellaneousDelegates" class="MiscellaneousDelegates.Misc" method="IsEditableElement">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate>IsEditableElement</Delegate>
</Argument>
</Method>
RefreshDocVariable
public delegate void RefreshDocVariable(XmlNode nodeToBeUpdated);
Method which will update the portion mark for a given node.
Configuration Example
<!-- PreText delegates test method definition -->
<!-- This method assigns a randomly generated string to the PreText area of a visible node-->
<Method id="PreTextEI" assembly="UIManipulation" class="UIManipulation.UIDelegates" method="PreTextPostTextTest">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate>GetNodeProperties</Delegate>
<Delegate>GetPreText</Delegate>
<Delegate>AssignPreText</Delegate>
<Delegate>GetPostText</Delegate>
<Delegate>AssignPostText</Delegate>
<Delegate>RefreshDocVariable</Delegate>
</Argument>
</Method>
RefreshDocVariables
public delegate void RefreshDocVariables();
Method which will update the portion marks on screen.
Configuration Example
<!-- This method looks for doc variables called "header" and "footer" in the Word document and sets them to a specific value-->
<Method id="AssignDocVariableEI" assembly="UIManipulation" class="UIManipulation.UIDelegates" method="AssignDocVariableTest">
<Argument type="Tokens">
<!-- the header and footer are doc variables defined in the dot file of the document. -->
<!-- In this simple example, the docVariables are set to a hardcoded value. -->
<Token>header=This is the Header</Token>
<Token>footer=This is the footer</Token>
</Argument>
<Argument type="Delegates">
<Delegate>AssignDocVariable</Delegate>
<Delegate>RefreshDocVariables</Delegate>
</Argument>
</Method>
RemoveContentItem
public delegate void RemoveContentItem(XmlNode node)
This delegate applies to embedded Word documents only. Used to delete the specified
XML node in the Pseudo XOM and its associated Word Content Control in an embedded
Word document
Configuration Example
<Method id="TestRemoveContentItem" assembly="XOMCurrentTest" class="XOMCurrentTest.XOMTest" method="TestRemoveContentItem">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate>RemoveContentItem</Delegate>
</Argument>
</Method>
AllowToggleTrackChange
public delegate void AllowToggleTrackChange(bool allowToggleTrackChange)
This delegate sets whether the Track Changes Toggle is enabled or disabled.
Configuration Example
<Method id="SetReviewOptionsEI" assembly="MiscellaneousDelegates" class="MiscellaneousDelegates.Misc" method="SetReviewOptions">
<Argument type="Delegates">
<Delegate> AllowToggleTrackChange </Delegate>
</Argument>
</Method>
AllowAcceptRejectChange
public delegate void AllowAcceptRejectChange (XmlNode node)
This delegate sets Sets whether the Accept/Reject Changes option is enabled or disabled
according to configuration.
Configuration Example
<Method id="SetReviewOptionsEI" assembly="MiscellaneousDelegates" class="MiscellaneousDelegates.Misc" method="SetReviewOptions">
<Argument type="Delegates">
<Delegate> AllowAcceptRejectChange </Delegate>
</Argument>
</Method>
SetWordUserName
public delegate void SetWordUserName (string userName, string userInitials)
This delegate is used to set the Username and Initials for the current Word session.
LockActiveDocument
public delegate LockOperationResult LockActiveDocument()
This delegate specifies locking the current XML Author document as the Active document of Word. The locked document will be considered as the active document for XA processing even if other documents are in focus.This delegate returns the LockOperationResult back to caller
Configuration Example
<Method id="LockingTest" assembly="LockUnlock" class="ExtensibilityInterface.Delegates.LockUnlock " method="LockingTest">
<Argument type="Delegates">
<Delegate>LockActiveDocument </Delegate>
</Argument>
</Method>
UnlockActiveDocument
public delegate UnlockOperationResult UnlockActiveDocument()
This delegate specifies the unlocking of the locked XML Author document as the active
word document and this unlocked document will no longer be considered as an active
document when not in focus.This delegate returns the UnlockOperationResult back to
caller .
Configuration Example
<Method id="Unlocking rest" assembly="LockUnlock" class="ExtensibilityInterface.Delegates.LockUnlock " method="UnlockingTest">
<Argument type="Delegates">
<Delegate>UnlockActiveDocument </Delegate>
</Argument>
</Method>
GetComponentReferenceLink
public delegate XmlNode GetComponentReferenceLink (XmlNode xmlNode, bool AllowComponentTargets
= false)
This delegate returns the link emphasis node for a component.
ResolveReference
public delegate ITarget ResolveReference (XmlNode xmlNode)
This delegate returns the component being referred to by the link emphasis node
GetCurrentNode
public delegate XmlNode GetCurrentNode()
This delegate returns the current visible node in the document as an XML node.
Configuration Example
<Method id="TestEI" assembly="XOMManipulation" class="ExtensibilityInterface.Delegates.XOM" method="CurrentNode">
<Argument type="Delegates">
<Delegate>GetCurrentNode</Delegate>
</Argument>
</Method>
ReplaceNode
public delegate bool ReplaceNode(ReplaceMap[] replacePairs)
Used to replace one document node with another. (Does not support replacing emphasis
nodes.) ReplaceMap is a class in the Invision.XpressExtensibilityDelegates namespace
containing three properties. These properties indicate the nodes to be replaced, the
node to use as the replacement, and the replacement strategy to use. Each property
is explained below.
public System.Xml.XmlNode OriginalXomNode;
The XomNode to be replaced.
public System.Xml.XmlNode ReplaceNode;
The new node to replace OriginalXomNode with.
public ReplaceStrategy StrategyToUse = ReplaceStrategy.Dynamic|ReplaceStrategy.Redraw;
Specifies the replace strategy to use. ReplaceStrategy.Dynamic allows Quark XML Author to make the decision whether to restyle or use delete-insert.
ReplaceStrategy.Redraw specifically uses the delete and insert strategy.
This delegate was created to support changing list styles. Each list type/style has
a different XAS element definition, therefore, changing the list style requires altering
the document’s element structure. In this scenario, there is no change in the number
of visible elements. When the number of visible elements being replaced is the same
as those replacing them AND the corresponding textnodes and emphasis are unchanged,
the ReplaceStrategy flag allows the XOM fragment to be replaced while on the Word
canvas, the narrative content is merely re-styled. This avoids the unpleasant, and
unnecessary deleting and re-inserting of content on-screen.
Configuration Example
<!-- EI Method tests ReplaceNode - the EI will use the current xom node to replace the previous xom node-->
<Method id="ReplaceNodeTest" assembly="ReplaceNode" class="ExtensibilityInterface.Delegates.ReplaceNodeTest" method="TestReplaceNode">
<Argument type="XomCurrentNode" />
<Argument type="Delegates">
<Delegate>ReplaceNode</Delegate>
<Delegate>GetPreviousNode</Delegate>
</Argument>
</Method>
SelectNode
public delegate void SelectNode(XmlNode visibleNode)
Passing null value as argument to SelectNode will collapse selection to end of currently
selected node.
Configuration Example
<!-- This EI method is called by the InvokeAnotherEI EI method through the InvokeMethodId delegate-->
<Method id="JustAnotherEI" assembly="MiscellaneousDelegates" class="MiscellaneousDelegates.Misc" method="InvokeeTest">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate>SelectNode</Delegate>
</Argument>
</Method>
SelectNodes
public delegate void SelectNodes(XmlNode startVisibleNode, XmlNode endVisibleNode);
Selects all content between and including the two endpoint nodes.
Configuration Example
<!-- EI Method tests SelectNode should select current XML Author node and previous XML Author node -->
<Method id="SelectNodesTest" assembly="SelectNodes" class="ExtensibilityInterface.Delegates.TestSelectNodes" method="SelectNodesTest">
<Argument type="XomCurrentNode" />
<Argument type="Delegates">
<Delegate>GetPreviousNode</Delegate>
<Delegate>SelectNodes</Delegate>
</Argument>
</Method>
SetSavedState
public delegate void SetSavedState(bool bSaved);
Called by an EI method to set the saved state of the document. Quark adapters use
EI methods to manage document persistence. This delegate is used to ensure that the
state of the document is accurate. This state is evaluated at various times such as
when the user attempts to close the document. In this case, if the document state
is “not saved” then the user should be prompted to save.
Configuration Example
<Method id="SetDocumentSaved" assembly=" assemblyName" class="Class" method="SetDocumentSaved">
<Argument type="Delegates">
<Delegate>SetSavedState</Delegate>
</Argument>
</Method>
SetXmlResolver
public delegate void SetXmlResolver(IXmlResolverProvider provider);
Called by an EI method to set a custom XmlResolver instance. Typically, this EI method
is called from within the Connect event in AppConfig.xml.
By default, if SetXmlResolver is not used and the document contains a URL declaration
(DTD or Schema), Quark XML Author attempts to connect to the resource. If the resource
is reachable, the XmlResolver property is set to XmlUrlResolver, the native XmlResolver for Quark XML Author. If the resource cannot be reached,
the XmlResolver property is set to null.
SetXmlResolver is used when a custom resolver is needed. The custom resolver must
implement the IXmlResolverProvider interface. Information about creating and using
custom resolvers can be found in Section 0.
Configuration Example
<!-- EI Method tests SetXmlResolver - if resolver is successfully set message box will indicate that, and you can open DITA files that contain doctype definitions -->
<Method id="SetXmlResolverTest" assembly="SetXmlResolver" class="ExtensibilityInterface.Delegates.TestXmlResolver" method="SetXmlResolverTest">
<Argument type="Delegates">
<Delegate>SetXmlResolver</Delegate>
</Argument>
</Method>
ShadeRegion
public delegate void ShadeRegion(XmlNode[] nodes, System.Drawing.Color backColor,
bool recurse)
Shades an array of nodes with the supplied background shading. The shading will be
performed for all visible nodes in the collection. This includes block elements, inline
images and equations, but does not include emphasis. The recurse parameter specifies
whether the procedure should recursively perform this operation on all descendants
of the node collection.
Configuration Example
<!-- EI Method tests ShadeRegion - should select current XML Author node and children depending on token -->
<Method id="ShadeRegionTest" assembly="ShadeRegion" class="ExtensibilityInterface.Delegates.TestShadeRegion" method="ShadeRegionTest">
<Argument type="XomCurrentNode" />
<Argument type="Tokens">
<Token>true</Token>
</Argument>
<Argument type="Delegates">
<Delegate>ShadeRegion</Delegate>
</Argument>
</Method>
ToggleEditableRegion
public delegate void ToggleEditableRegion(XmlNode[] nodes, bool booleanValueToBeSet,
bool recurse)
Toggles the editable status of the specified XML node or nodes.
Configuration Example
<!-- ToggleEditableRegion test delegate definition -->
<!-- This particular method will take the current selection and make it non-editable. -->
<Method id="NonEditableRegionEI" assembly="UIManipulation" class="UIManipulation.UIDelegates" method="ToggleRegionEditablePropertyTest">
<!-- The XomSelectedNodes provides an array of VISIBLE nodes selected by user -->
<Argument type="XomSelectedNodes"/>
<Argument type="Delegates">
<Delegate>ToggleEditableRegion</Delegate>
</Argument>
</Method>
UpdateAttributes
public delegate void UpdateAttributes()
Calls the Update Attributes event handler for an external attribute panel.
Configuration Example
<!-- UpdateAttributes delegate test method definition -->
<Method id="AttributePanelEI" assembly="MiscellaneousDelegates" class="MiscellaneousDelegates.Misc" method="ShowElementAttributes">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate>UpdateAttributes</Delegate>
</Argument>
</Method>
AssignRefVariable
public delegate void AssignRefVariable(string docVariableName, string docVariableValue,
string fileName = null);
Assigns the named Reference Variable. Reference Variables can help resolve indirect
references. See Variable Reference Support.
AssignRefVariable Parameters
Parameter | Required | Definition |
docVariableName | yes | String. Name of the document variable. |
docVariableValue | yes | String. Value of the document variable. This value should be direct reference value. |
fileName | no | String. The document’s full name, including path. Defaults to null for the current |
GetRefVariable
public delegate string GetRefVariable(string docVariableName, string fileName = null);
Returns the named Reference Variable for the Quark XML Author document. See Variable Reference Support.
GetRefVariable Parameters
Parameter | Required | Definition |
docVariableName | yes | String. Name of the document variable. |
fileName | no | String. The document’s full name, including path. Defaults to null for the current |
GetAllRefVariables
public delegate int GetAllRefVariables(string[,] refVars, string fileName = null);
Gets all the References Variables or their count for the Quark XML Author document.
See Variable Reference Support.
GetAllRefVariables Parameters
Parameter | Required | Definition |
refVars | yes | Array. An array to get all the reference variables and their values. Can be null to |
fileName | no | String. The document’s full name, including path. Defaults to null for the current |
GetExportedXMLForRefVariables
public delegate string GetExportedXMLForRefVariables(string fileName = null);
Returns the serialized xml for the reference variables. The serialized xml can bepersisted
by a custom component in BeforeSave Event.
Reference Variables can help resolve indirect references. See Variable Reference Support.
GetExportedXMLForRefVariables Parameters
Parameter | Required | Definition |
filename | No | String. The document’s full name, including path. Defaults to null for the current |
ResolveReference
public delegate ITarget ResolveReference(XmlNode xmlNode);
Resolves references for the LinkEmphasis node. Returns the resolved target.
ResolveReference Parameters
Parameter | Required | Definition |
xmlNode | yes | String. Returns the XmlNode of type LinkEmphasis for example “Xref”. |
Configuration Example
<!-- ResolveReference delegate test method definition -->
<Method id="ResolveReferenceTest" assembly=" ResolveReferenceTest " class=" ResolveReferenceTest.Example"
method="TestResolveNode">
<Argument type="Delegates">
<Argument type="XomCurrentNode"/>
<Delegate> ResolveReference </Delegate>
</Argument>
</Method>
EI method Example
This method will resolve link emphasis and the messageBox will display both the URL
path and the element xpath if the current selected node is of type link emphasis.
Public void TestResolveNode(XmlNode currentXomNode, Delegates[] delegates)
{
ResolveReference resolveRefdelegate = delegates[0] as ResolveReference;
ITarget target = resolveRefdelegate(currentXomNode);
MessageBox.Show( target.TargetLocation +" "+ target. TargetElementXPath );
}
GetInsertableElements
ArrayList GetInsertableElements(XmlNode visibleXomNode);
A Delegate that returns a list of Insertables (captionName) for the provided visibleXomNode.
GetInsertableElements Parameters
Parameter | Required | Definition |
visibleXomNode | yes | XmlNode. Returns the visible XomNode whose Insertables are required. |
Configuration Example
<!-- GetInsertableElements delegate test method definition -->
<Method id=" GetInsertableElementsTest" assembly=" GetInsertableElementsTest " class=" GetInsertableElementsTest.Example"
method="TestGetInsertableElements">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate> GetInsertableElements</Delegate>
</Argument>
</Method>
EI method Example
This method will return a list of insertables and the messageBox will display all
insertables allowed at the current selection location.
Public void TestGetInsertableElements (XmlNode currentXomNode, Delegates[] delegates)
{
GetInsertableElements getInsertableElementsDelegate = delegates[0] as GetInsertableElements;
ArrayList insertables = getInsertableElementsDelegate (currentXomNode);
stringBuilder sb = new StringBuilder();
foreach(string insertable in insertables)
{
Sb.Append(insertables + " ");
}
MessageBox.Show( sb.ToString() );
}
GetNodeDefProperties
public delegate void GetNodeDefProperties(string XomName, string parentXomName, Hashtable
ht);
This method is used to get all the properties defined for an element in the schema.
Currently the following properties are supported:
Xmlname
Friendly
Style
defaultHyperlink
displayAttribute
insertAfter
increaseIndent
decreaseIndent
externalMethodId
default
numbering
visible
readonly
For getting the properties of the EmphasisNode, the parentXomName is not required.
GetNodeDefProperties Parameters
Parameter | Required | Definition |
XomName | yes | String. The XomName whose properties are required. |
parentXomName | Yes | String. The possible parent Xom Name for which the node properties are required. |
ht | Yes | Hashtable. A hashtable to fill the required properties. |
Configuration Example
<!-- GetNodeDefProperties delegate test method definition -->
<Method id=" GetNodeDefPropertiesTest" assembly=" GetNodeDefPropertiesTest " class=" GetNodeDefPropertiesTest.Example"
method="TestGetNodeDefProperties">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate>GetNodeDefProperties </Delegate>
</Argument>
</Method>
EI method Example
This method will populate hashtable with node def properties of current selected Node,
the message box will show the total number of properties retrieved.
Public void TestGetNodeDefProperties (XmlNode currentXomNode, Delegates[] delegates)
{
GetNodeDefProperties getNodeDefPropertiesDelegate = delegates[0] as GetNodeDefProperties;
Hashtable ht = new Hashtable();
getNodeDefPropertiesDelegate (currentXomNode.LocalName , currentXomNode.ParentNode.LocalName,ht);
MessageBox.Show("Total Number of properties retrieve is : " ht.Count);
}
GetNodeDirtyType
Public delegate DirtyType GetNodeDirtyType (xmlNode xomNode, List<string> xmlAttribList)
This delegate returns the dirty type of xomNode. This delegate can be used to identify
which of the nodes in the document are actually dirty and the level of dirtiness.
If a node is dirty due to kAttribute, then xmlAttribList will contain the list of
xml attribute names due to which nodes becomes dirty.
Level of dirtiness (highest to lowest):
kNew, kRemove
kModified
kAttribute
Public enum DirtyType
{
kNone,
kModified,
kNew,
kRemoved,
kAttribute
}
Configuration example:
<!-- GetNodeDirtyType delegate test method definition -->
<Method id="GetNodeDirtyTypeEI" assembly="XXXXX " class="XXXXX"
method="GetNodeDirtyTypeTest">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate> GetNodeDirtyType </Delegate>
</Argument>
</Method>
SetReferenceAttributes
Public delegate bool SetReferenceAttributes (xmlNode xomNode, Hashtable referenceAttributes);
This delegate is used to add passed direct and indirect reference attribute value
in XOMNode, where allowed. It also handles shading for the same.
Returns true if added, false otherwise.
SetReferenceAttributes Parameters
Parameter | Required | Definition |
xomNode | yes | XmlNode. The XOMNode to set the reference attribute to. |
referenceAttributes | yes | Hashtable. A Hashtable with reference keys and corresponding values. The only valid |
Configuration example:
<Method id=”setReferenceAttributesTest”
assembly=”MiscellaneousDelegates”
class=”MiscellaneousDelegates.Misc” method=”SetReferenceAttributesTest”>
<Argument type=”XomCurrentNode”/>
Argument type=”Delegates”>
<Delegate>SetReferenceAttributes</Delegate>
</Argument>
</Method>
El method example:
public bool SetReferenceAttributesTest(XmlNode node, Delegate[] delegates)
{
try
{
SetReferenceAttributes setReferenceAttributesDelegate = delegates[0] as SetReferenceAttributes;
if (setReferenceAttributesDelegate != null && node != null && node is XmlElement)
{
// Using SetReferenceAttributes Delegate to set the conkeyref and conref attr
Hashtable ht = new Hashtable();
ht.Add("DirectReference", "c:/Dummy.xml");
ht.Add("IndirectReference", "c:/Dummy1.xml");
return setReferenceAttributesDelegate(node, ht);
}
}
catch (Exception e)
{
System.Diagnostics.Debug.WriteLine("SetReferenceAttributes Exception :" + e.Message + "\nStackTrace:" + e.StackTrace);
}
return false;
}
RemoveReferenceAttributes
Public delegate bool RemoveReferenceAttributes (xmlNode xomNode)
This delegate is used to remove all the direct and indirect reference attribute values
from the passed XOMNode. It also handles shading for the same.
Returns true if removed, false otherwise.
RemoveReferenceAttributes Parameters
Parameter | Required | Definition |
xomNode | yes | XmlNode. The XOMNode to set the reference attribute to. |
Configuration example:
<Method id="RemoveReferenceAttributesTest" assembly="MiscellaneousDelegates" class="MiscellaneousDelegates.Misc" method="RemoveReferenceAttributesTest">
<Argument type="XomCurrentNode"/>
<Argument type="Delegates">
<Delegate>RemoveReferenceAttributes</Delegate>
</Argument>
</Method>
El method example:
public bool RemoveReferenceAttributesTest(XmlNode node, Delegate[] delegates)
{
try
{
RemoveReferenceAttributes removeReferenceAttributesDelegate = delegates[0] as RemoveReferenceAttributes;
if (removeReferenceAttributesDelegate != null && node != null && node is XmlElement)
{
return removeReferenceAttributesDelegate(node);
}
}
catch (Exception e)
{
System.Diagnostics.Debug.WriteLine(RemoveReferenceAttributesException : "+ e.Message + "\nStackTrace:" + e.StackTrace);
}
return false;
}
SetListRestartContinueNumbering
Public delegate void SetListartRestartContinueNumbering (xmlNode xomNode, bool restart)
This delegate is used to restart/continue the list item.returns the dirty type of
xomNode.
SetListRestartContinueNumbering Parameters
Parameter | Required | Definition |
xomNode | yes | XmlNode. The XOMNode to set the reference attribute to. |
restart | yes | If set to true, restart the list item, else continue. |
Configuration example:
<Method id="SetListRestartNumberingTest" assembly="MiscellaneousDelegates" class="MiscellaneousDelegates.Misc" method="SetListRestartContinueNumberingTest">
<Argument type="XomCurrentNode"/>
<Argument type="Tokens">
<Token>True</Token>
</Argument>
<Argument type="Delegates">
<Delegate>SetListRestartContinueNumbering</Delegate>
</Argument>
</Method>
<Method id="SetListContinueNumberingTest" assembly="MiscellaneousDelegates" class="MiscellaneousDelegates.Misc" method="SetListRestartContinueNumberingTest">
<Argument type="XomCurrentNode"/>
<Argument type="Tokens">
<Token>False</Token>
</Argument>
<Argument type="Delegates">
<Delegate>SetListRestartContinueNumbering</Delegate>
</Argument>
</Method>
EI method example:
public void SetListRestartContinueNumberingTest(XmlNode curXomNode, string []restart, Delegate[] delegates)
{
try
{
SetListRestartContinueNumbering setListRestartContinueNumbering = delegates[0] as SetListRestartContinueNumbering;
if (setListRestartContinueNumbering != null && curXomNode != null && curXomNode is XmlElement)
{
// Set restart numbereing for New Numbered list inserted and not new List item added
XmlNode listItemNode = curXomNode.SelectSingleNode("self::*[starts-with(local-name(),'oli')]");
if (listItemNode != null)
{
setListRestartContinueNumbering(listItemNode, restart[0] == "True");
}
}
}
catch (Exception e)
{
System.Diagnostics.Debug.WriteLine("SetListRestartContinueNumbering Exception :" + e.Message + "\nStackTrace:" + e.StackTrace);
}
}
RemoveRefVariable
Public delegate void RemoveRefVariable (string docVariableName, string filename =
null)
This delegate is used to remove the named reference variable from the Quark XML Author
document. See Variable Reference Support.
RemoveRefVariable Parameters
Parameter | Required | Definition |
docVariableName | yes | String. Name of the document variable to be removed. |
filename | yes | The document;s full name, including the path. Defaults to null for the current document. |