- 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?
How to configure XML Author actions through internal classes attributes?
Application Configuration: Internal Classes
Internal Classes are functions that are built into Quark XML Author. In many cases,
they replace similar native Word features, such as Insert Table.
The InternalClass element’s attributes contain the name of the application class that
will handle the operation when the user selects the menu item/clicks the button/invokes
the shortcut key associated with the command. The name attribute is required. Depending
on what class is used, there may be other required and optional attributes. This chapter
defines the internal classes supported by Quark XML Author and the additional parameters,
if any, that can be used with them. The example below shows how DocumentOpen can be
implemented.
<InternalClass name="DocumentOpen" filter="Word Documents (*.doc)|*.doc|Quark XML
Author Documents (*.xml)|*.xml"/>
As you can see, DocumentOpen requires an additional parameter, which is specified
as the InternalClass element’s filter attribute.
AcceptRevision
Accepts the currently selected document revision or, if the acceptAll parameter is present and set to true, accepts all document revisions. If neither parameter is present, any revision(s)
in the current selection will be accepted.
Table: AcceptRevision Parameters
Parameter | Required | Definition |
acceptAll | no | Boolean. Set to true to accept all revisions in the document. Defaults to false. |
keyCode | no | Integer. Specifies the keyCode for a specific document node. If keyCode is a valid |
AssignAttribute
Assigns a value to a document attribute or document element attribute. If the attribute
is not found on the current document, the nearest ancestor element which contains
this attribute is located and the attribute value is assigned to that element (if
found).
Table: AssignAttribute Parameters
Parameter | Required | Definition |
attributeName | yes | String. The document attribute or document element attribute, as specified in the |
attributeValue | no | String. Specifies the value that will be assigned to the attribute named by the attributeName |
generateUndo | no | Specifies whether or not an undo event should be generated for this attribute assignment. |
namespace | no | String. Specifies the namespace of the attribute named as the value of attributeName. |
toggleGroup | yes | String. Specifies the name of the toggle group to which the menu item containing the |
xpath | no | String. If an xpath for a particular element is provided, it is used as the starting |
ChangeToList
Changes the selected element to a list item. If the selection contains multiple elements,
changes all of them to list items. There are some restrictions depending on the selection
of elements in the user interface:
Top-level selection elements have to be at the same level and of same parent. In other
words, the user cannot select list items of different lists, nor can the user select
a para type element with depth=x and another non-descendant para with depth <> x.The top-level selection can ONLY include para or list type selections AND cannot include
both para type and list type selections.The selection for list type elements must include the first or the last list item,
or both.Top level selections must not be defined with minOccurs=1, maxOccurs=1/1+.
The presence of any required child elements (for list type elements, both required
children under list container as well as required children under the para type child)
disqualifies them from being changeType candidates.Both of these element types must appear as optional unbounded (minOccurs=0, maxOccurs=unbounded)
children under their parent definitions.There can be any optional descendant structure amongst the para/list types. In that case, if the current selection
does have a descendant structure for each of the top-level para/list type elements,
each of those instance structures would have to be “equivalent” to the schema descendant
structure of the corresponding para or list type for a target to be a valid change
type
Other specific behavior depends on the values of the parameters.
Table: ChangeToList Parameters
Parameter | Required | Definition |
merge | no | Boolean. Set to true to force new list items to merge with the adjacent list (if one exists) upon conversion |
target | yes | String. Comma-delimited list of list elements that may be used. Specifies the XML
Note that there is no space after each comma. Technically, a “list” type element is a specialized element identified by the following |
ChangeToPara
Changes the selected element (usually a list item) to a paragraph. If the selection
contains multiple list items, all are converted to separate paragraphs.
Table: ChangeToPara Parameters
Parameter | Required | Definition |
target | yes | String. Specifies the XML name of the paragraph element. In the example below, the
A paragraph type element is identified in the schema by the presence of the <para> |
ClearUndoStack
Clears the stack of undo actions used by the Quark XML Author’s Undo function. Does
not use parameters.
Copy
Copies the selection to the clipboard. Does not use parameters.
CreateRendition
Creates a document rendition according to the values specified by its parameters.
Table: CreateRendition Parameters
Parameter | Required | Definition |
destination | no | String. Specifies the path to which the exported file and embedded media should be |
expandRef | no | Boolean. Indicates whether or not the reference elements should be expanded into the |
filter | no | String. When specified, if destination is omitted, OR if {cd} is specified and one |
params | no | String. Used to supply parameter values to the stylesheet. Parameters are specifies
“name=value | name2=value2 | …” |
supportPath | no | String. When a document is rendered/previewed, all files under the folder specified |
xpath | no | String. Apply the transform to a fragment of the current active document pointed to |
xslt | no | String. Specifies the path and name of the transform stylesheet. The path may be a
|
filter
The Save As dialog is displayed only if the destination parameter has no value. The
optional filter attribute, if populated, determines what filters will be present in
the Save as Type drop-down box in the Save As dialog. The value of the filter attribute is a resource ID in the Resources file.
The resource ID identifies a string list of filter types. Each filter type comprises
two parts: the filter text and the filter definition, which are separated by the pipe
character (|).For example, to specify a filter to create a html rendition, you would use the pair
shown below as the value of the “HTML Rendition” resource ID:
HTML Rendition = HTML Document (*.html)|*.html
This would produce the filter shown in Figure 5‑1 .
Figure 5‑1: Save As dialog
Of course, the actual resource ID is arbitrary and can have any name you want. The
filter is specified in this way to aid in localization.
If neither destination nor filter are specified, the rendition is saved to the Quark
XML Author temp directory with a Quark XML Author-generated filename, e.g. preview_1.html.
StyleSheet Child Nodes
CreateRendition may have any number of StyleSheet child nodes. This provides the ability
to perform chained transformations with the output of one stylesheet provided to the
next. Any XSLT parameters that need to be supplied to the individual stylesheet can
be specified by the params attribute as shown in the example shown below.
<Stylesheet xslt="stylesheet name" params="name1=value1|name2=value2"/>
Using CreateRendition to Load External Objects
CreateRendition supports configurable stylesheet extensions that allow the execution
of .NET code from within the transform itself. When CreateRendition is invoked, Quark
XML Author inspects the top of the XSLT for <?XpressExtension?> processing instructions.
For each instruction that is found (multiple instructions are allowed), the .NET object
is loaded and made available to the transform. Additional parameters required by the
.NET object can be supported using the “params” attribute.
The format of the XSLT processing instruction is shown below:
<?XpressExtension namespace="ns" assembly="Assembly" object="Invision.objectname"
?>
Cut
Cuts the selection from the document and copies it to the clipboard. Does not use
parameters.
DeleteComment
Deletes the currently selected comment (or comment for the current selection).
Table: DeleteComment Parameters
Parameter | Required | Definition |
deleteAll | no | If a value is specified for the query attribute, then deleteAll is ignored. Set to |
query | no | Value is a regular expression that allows extracting selective comment nodes. For
The query attribute value is expressed as a series of property=value pairs, where |
DeleteTable
Deletes the currently selected table (or the table in which the cursor is presently
located). Does not use parameters.
DeleteTableCol
Deletes the table column in which the cursor is located. Does not use parameters.
DeleteTableRow
Deletes the table row in which the cursor is located. Does not use parameters.
DocumentAttributes
Opens the Attribute Panel for the root element of the Document. Does not use parameters.
DocumentClose
Closes the document.
Table: DocumentClose Parameters
Parameter | Required | Definition |
filename | no | String. Specifies the name of a file to be closed rather than the currently active |
ignoreChanges | no | Boolean. Set to true to allow the user to close the document without being prompted to save changes. Set |
DocumentNew
Creates a new document of the specified type.
Table: DocumentNew Parameters
Parameter | Required | Definition |
defaultName | no | String. Specifies a default name for the new document. The default name is created |
templateXml | yes | String. Specifies the path and filename of the template file from which the document |
DocumentOpen
Invokes the Open dialog.
Table: DocumentOpen Parameters
Parameter | Required | Definition |
filter | no | String. See below for more information. |
fullfilepath | no | String. Specifies the fully qualified path of the document to open or specifies the |
filter
If it is populated, the Open dialog box’s Files of type drop-down box will contain filters the attribute value specifies. The value of the
filter attribute is a resource ID in the Resources file.
The resource ID identifies a string list of filter types. Each filter type comprises
two parts: the filter text and the filter definition, which are separated by the pipe
character (|). For example, to specify a filter to display only Word documents, (.DOC and .DOCX)
you would use the pair shown below as the value of the “OpenWordDocs” resource ID:
OpenWordDocs = Word Document (*.doc)|*.doc
This would produce the filter shown in Figure 5‑2.
Figure 5‑2: Open Dialog
Each filter set is likewise separated by a pipe character. For example, if we wanted
to add Quark XML Author Documents (*.xml)|*.xml to the example already given above,
it would look like the example below.
OpenWordDocs = Word Document (*.doc)|*.doc|Quark XML Author Document (*.xml)|*.xml
It is always wise to include a filter that shows All Files (*.*). Adding this filter
to the example above produces the example below.
OpenWordDocs = Word Document (*.doc)|*.doc|Quark XML Author Document (*.xml)|*.xml|All
Files (*.*)|*.*
Of course, the actual resource ID is arbitrary and can have any name you want. The
filter is specified in this way to aid in localization.
DocumentOpenWord
Invokes the native Word FileOpen dialog for opening documents. The dialog uses default
Word filters and does not use any Quark XML Author document filters. Primarily used
for accessing a file on a remote web server via native Word’s native WebDAV capabilities.
For a remote file, the function attempts access using the Windows default credentials
to download the file and if unsuccessful, prompts for username/password. The login
prompt repeats if an Unauthorized status code is received on a WebDav open request.
Does not use parameters.
DocumentSave
Saves the current document.
Note that Quark XML Author leverages Word’s native AutoSave functionality so that
documents are automatically saved periodically according to the setting in the user’s
Word environment.
Using DocumentSave by itself simply saves the document. However, the following parameters
can be passed to modify the save function.
Table: DocumentSave Parameters
Parameter | Required | Definition |
defaultFilepath | no | String. If the document has never been saved, then the SaveAs feature is invoked and |
transform | no | String. Specifies the location and filename of the default stylesheet for the document |
filter | no | String. If the document has never been saved, then the SaveAs feature is invoked and |
Also these parameters overwrite any values specified in the DefaultSaveOptions node.
DocumentSaveAs
Invokes the Save File dialog box so that the user can select a location and filename
for the document. Supports WebDAV saves.
Table: DocumentSaveAs Parameters
Parameter | Required | Definition |
filter | no | String. If the document has never been saved, then the SaveAs feature is invoked and |
defaultFilepath | no | String. Specifies the folder that should be used as the Save In folder in the Save As dialog. The dialog uses this path as the current folder of the dialog. The user is |
transform | no | String. Specifies the location and filename of the default stylesheet for the document |
useWordDialog | no | Boolean. Specifies whether or not the Word Dialog should be displayed. Set to true to allow the user to save the Quark XML Author document as a Word document. |
fullfilepath | no | String. Specifies the fully qualified path of the document to open or specifies the |
filter
The optional filter attribute, if populated, determines what filters will be present
in the Save as Type drop-down box in the Save As dialog. The value of the filter attribute is a resource
ID in the Resources file.
The resource ID identifies a string list of filter types. Each filter type comprises
two parts: the filter text and the filter definition, which are separated by the pipe
character (|). For example, to specify a filter to save as a Word document, you would use the
pair shown below as the value of the “SaveWordDocs” resource ID:
SaveWordDocs = Word Document (*.doc)|*.doc
This would produce the filter shown in Figure 5‑3.
Figure 5‑3: Save As Filter
Of course, the actual resource ID is arbitrary and can have any name you want. The
filter is specified in this way to aid in localization.
EmailRendition
Creates a document rendition according to the values specified by its parameters and
invokes Send to Mail Recipient with the document rendition as an attachment.
All of EmailRendition’s parameters are optional. However, if the rendition parameter
is omitted, at least one of the other parameters must be used.
Table: EmailRendition Parameters
Parameter | Required | Definition |
destination | no | String. Specifies the path to which the exported file and embedded media should be |
expandRef | no | Boolean. Indicates whether or not the reference elements should be expanded into the |
filter | no | String. See below for more information. |
params | no | String. Used to supply parameter values to the stylesheet. Parameters are specifies
“name=value | name2=value2 | …” |
rendition | no | String. Specifies the file format value of the Mail Attachment. Valid values are nativeFormat or xpressFormat: nativeFormat, which sends as a .doc file; or xpressFormat, which attaches the Quark rendition=”xpressFormat” or rendition=”nativeFormat” Using rendition is preferred over omitting it. However, if it is omitted, at least |
xslt | no | String. Specifies the path of the transform stylesheet The path may be a URL, an absolute |
filter
The Save As dialog is displayed only if the destination parameter has no value. The
optional filter attribute, if populated, determines what filters will be present in
the Save as Type drop-down box in the Save As dialog. The value of the filter attribute is a resource
ID in the Resources file.
The resource ID identifies a string list of filter types. Each filter type comprises
two parts: the filter text and the filter definition, which are separated by the pipe
character (|). For example, to specify a filter to save as a Word document, you would use the
pair shown below as the value of the “SaveWordDocs” resource ID:
SaveWordDocs = Word Document (*.doc)|*.doc
This would produce the filter shown in “Filter Figure”.
Figure 5‑4: Save As Filter
Each filter set is likewise separated by a pipe character. For example, if we wanted
to add Quark XML Author Document (*.xml)|*.xml to the example already given above,
it would look like the example below.
SaveWordDocs = Word Document (*.doc)|*.doc|Quark XML Author Document (*.xml)|*.xml
It is always wise to include a filter that shows All Files (*.*). Adding this filter
to the example above produces the example below.
SaveWordDocs = Word Document (*.doc)|*.doc|Quark XML Author Document (*.xml)|*.xml|All
Files (*.*)|*.*
Of course, the actual resource ID is arbitrary and can have any name you want. The
filter is specified in this way to aid in localization.
If neither destination nor filter are specified, the rendition is saved to the Quark
XML Author temp directory with a Quark XML Author-generated filename, e.g. MyDoc.doc.
EmphasisAction
Used to apply emphasis.
Table: EmphasisAction Parameters
Parameter | Required | Definition |
emphasis | yes | String. Specifies the name of the emphasis that should be applied. Must be an emphasis
|
key | no | String. Specifies sub-style values for a particular emphasis. |
value | no | String. Specifies sub-style values for a particular emphasis. |
EmphasisHandler
Invokes the Quark XML Author emphasis handler for displaying a combo box of allowed
emphasis items at the current location. Does not use parameters.
FindAndReplace
Provides Find, Replace, and navigation functionality for Quark XML Author documents
similar to native Word functionality. There are some important differences in functionality:
The Replace button is disabled for find phrases which the schema makes illegal to
be replaced. A tooltip shows the reason for disabling the button.The Replace All button will only replace selections which are editable and ignore
all non-editable selections.The Goto list box is restricted to the following 6 types: Page, Section, Line, Comment,
Table, and Graphic.The Enter page number text box in the Goto tab has the following restrictions:
The text must be a numeric value.
The numeric value can be preceded with a + or a – to indicate a relative Goto.
This behavior is a subset of the features Word offers which supports a wider variety
of formats in the text box. For example, s2p5 is a valid value and takes the user to the page five in section two of the Word document.
The replace/Replace all will not work on read-only (i.e accessMode=Review) documents.
The gotoNext() and GotoPrevious() functionality still invokes the Word’s Goto/Find
Next. The browse object in the lower right corner of the documents on the vertical
scrollbar (the round icon and the two arrow buttons around it) still invoke Word functions.
Table: FindAndReplace Parameters
Parameter | Required | Definition |
tab | yes | String. The required tab parameter may have one of three values: Find, Replace, and Goto. These values refer to the three tabs available in the Find and Replace dialog. The |
FormattingAction
Used to apply/remove character formatting, font color or highlight color for the selected
word, phrase or text elements.
Typography such as bold and italic may be applied to a word, phrase or multiple text
elements. This formatting feature is similar to the formatting feature in Word.
From the ReadMe description: In Business Document solutions, the ability to apply
stylistic emphasis such as bold and italics has been replaced with new paragraph styling
in a new feature called Character Formatting. This applies to: Bold, Italic, Underline,
Strikethrough, Superscript, and Subscript. These styles are applied using the same
user controls as in previous versions of XML Author. For example, the Bold button
on the Home ribbon. Different from the previous inline elements version of these styles,
metadata may not be applied to these new styles. In Business Document solutions, text
foreground color may be applied to a word, phrase or multiple text elements. This
is done using the Font Color feature. In Business Document solutions, text background
color may be applied to a word, phrase or multiple text elements. This is done using
the Text Highlight Color feature.
Table: FormattingAction Parameters
Parameter | Required | Definition |
formattingName | yes | String. Specifies the name of the formatting that should be applied. Must be a name From the Business Documents XAS schema:
These definitions are available to all configurations and are enabled by default in Example calls:
|
colorValue | no | String. For formattingName equals color or highlight, this specifies the color name or RGB value of the color that should be applied to |
FormattingActionChangeCase
Used to change case for the selected word, phrase or text elements. This formatting
feature is similar to the formatting feature in Word.
Table: FormattingActionChangeCase Parameters
Parameter | Required | Definition |
changeCase | yes | String. Specifies the name of the formatting that should be applied. Example calls:
|
FormatTableCellShading
Invokes the Cell Shading dialog, which allows users to assign a background color to
the current selection of table cells. Does not use parameters.
This requires that cells of a table section are defined with an attribute of the datatype
tableCellBackgroundColor. See “Table 11‑8”. For this discussion, let’s refer to this
as simply the “color” attribute.
The user’s color selection is applied to the selected cells on the Word canvas and
is applied to the color attribute in the XML for each selected cell. However, if the
user selects “No Color”, then the default color is applied to the Word canvas and
the color attribute is removed in the XML.
In the user interface, the toolbar or ribbon button is enabled if the current cell
or selected cells are editable and are defined with a color attribute.
In the Cell Shading dialog, the colors available can be specified in the attribute
definition. This is typically used to limit the user to a specific set of colors.
For example, only three specific colors are available for header cells. If no colors
are specified in the attribute definition, then the colors available are Word’s stock
colors for cell shading.
Selections containing cells with different color attribute definitions
In this situation, the colors available in the Cell Shading dialog are the intersection
of the colors available for each different color attribute definition. The colors
that are found to be in common are displayed in the user interface. If the intersection
is zero colors, then no colors are available and the only action the user can take
is to select “No Color. The system removes the color attribute for all selected cells.
IndentElement
Triggers indent/decrease indent behavior for the current element, depending on the
value of the indent parameter.
Table: IndentElement Parameters
Parameter | Required | Definition |
indent | yes | String. Valid values are: IncreaseIndent and DecreaseIndent. When the value of indent is IncreaseIndent, IndentElement changes the selected element to the element type specified by the Consider the following element structure:
If a ListItem2 element is selected, invoking the first example below would change Example 1: Increase Indent
Example 2: Decrease Indent Note that multiple targets for Increase/Decrease Indent may be specified in the increaseIndentand decreaseIndent |
InlineAttributes
Toggles the display of portionmarks on or off.
Table: InlineAttributes Parameters
Parameter | Required | Definition |
Type | no | String. Valid values are PreText and PostText which specifies the type of portionmark to be affected. Defaults to PreText. See Section 9.1 for information about portionmarks. |
InsertXACrossref
This applies to embedded Word documents only.
Inserts a cross-reference link at the current cursor location in the embedded Word
document if a valid target is on the clipboard. The valid target is a destination
in an XML Author document. The destination may be in the document that is the parent
of the embedded Word document or it may be another XML Author document. Does not use
parameters.
Example:
<!-- Internal class to insert Cross-Reference when working in an embedded OLE document -->
<button id="InsertXACrossRef" imageMso="CrossReferenceInsert" size="large">
<InternalClass name="InsertXACrossRef"/>
</button>
InsertComment
Inserts a comment into the document. Does not use parameters.
InsertColumnBreak
Toggles the columnBreak attribute value on the next visible element following the cursor location between
true and false. See section 12.3 for information on the columnBreak attribute. Does not use parameters.
InsertCustomLink
Inserts a cross-reference link at the current cursor location if a valid target is
on the clipboard. Does not use parameters.
Example:
<!-- Internal class to insert Cross-Reference when working in an XML Author document -->
<button id="InsertCustomLink" imageMso="CrossReferenceInsert" size="large" getEnabled="GetEnabled">
<InternalClass name="InsertCustomLink"/>
</button>
InsertElement
The internal class InsertElement is used only within the DocConfig file to specify
elements to be inserted, and what child elements to automatically insert. For example,
a Section element might have a mandatory Title element, to be followed by one or more
Paragraph elements. When the user inserts a Section element, the syntax of the displayName
value will instruct Quark XML Author to insert the required child elements. You can
also specify optional elements to be automatically inserted.
displayName
Required. String. The displayName parameter value uses the following syntax:
<InternalClass name="InsertElement" displayName="Element[Child[Grandchild/Grandchild/Grandchild]]">
Brackets
The [] brackets signifies a parent-child relationship, and the slash indicates sibling
relationships. So the example cited above, of a Section with mandatory Title and one
or more paragraphs, would look like the following example:
<InternalClass name="InsertElement" displayName="Section[Title/Paragraph()]">
Parenthesis
Parenthesis can be used to indicate content objects:
Table type element
A tilde (~) indicates a table type element.
<InternalClass name="InsertElement" displayName="CALS Table(~)" externalMethodFriendly="true"/>
MediaContent object
An asterisk (*) indicates a MediaContent object, such as shown below.
<InternalClass name="InsertElement" displayName="Quark Extensions[Local Media[Media(*)/Media
Caption]"/>
Default text value
Parenthesis can also contain text that will indicate a default text value. This value
will override any default value specified in the XAS:
<InternalClass name="InsertElement" displayName="Quark Extensions[Local Media[Media(*)/Media
Caption(Cartoon here)"/>
Reserved Characters
When specifying displayName for either “InsertElement”or “Insert Emphasis” note that
there are several special characters reserved by the system. If these characters are
used as part of the displayName value, you must replace them with the corresponding
code shown in the table below.
Table: Control Codes for Reserved Characters
Character | Description | Code |
/ | Forward slash | %#fs%# |
[ | Left Square Bracket | %#ls%# |
] | Right Square Bracket | %#rs%# |
{ | Left Curly Bracket | %#lc%# |
} | Right Curly Bracket | %#rc%# |
* | Star | %#st%# |
~ | Tilde | %#ti%# |
> | Greater Than | %#gt%# |
< | Less Than | %#lt%# |
‘ | Apostrophe | %#apos%# |
“ | Quotation Mark | %#quot%# |
& | Ampersand | %#amp%# |
For example, the InsertEmphasis Internal class below would insert CH2(parens) into the document:
<InternalClass name="InsertEmphasis" displayName="Symbol(CH2%#lc%#parens%#rc%#)"/>
These codes can also be used in the schema when specifying default text for an ElementDef.
(See section 14).
Insert Emphasis
Inserts an emphasized text node into the specified XML node at the cursor position.
Table: InsertEmphasis Parameters
Parameter | Required | Definition |
displayName | yes | The friendly name of the emphasis as defined in the schema and any text to insert
The example above will insert [Company Name] at the cursor location where the Company emphasis is allowed. Can be used as a placeholder for XML data when transforming Quark XML Author document The value of displayName for InsertEmphasis has the same restrictions regarding special |
InsertEndNote
Inserts an end note emphasis named in the parameter. End notes can be inserted in
any element type. There must be a corresponding EndNote element definition and an
emphasis style defined for the notes themselves. See section 14.8 for a full discussion
about configuring end note capability.
Table: InsertEndNote Parameters
Parameter | Required | Definition |
emphasisName | yes | String. Specifies the name of the emphasis defined for the note. |
InsertEntityReference
Invokes the Insert Entity Reference dialog, which allows users to select an entity
reference to insert into the document. Does not use parameters.
InsertFootnote
Inserts a footnote at the current cursor location.
Table: InsertFootNote Parameters
Parameter | Required | Definition |
noteType | no | String. Specifies whether the inserted note should be a Footnote or Endnote. Defaults to Footnote. |
InsertHyperlink
Invokes the Quark XML Author Insert Hyperlink dialog. The resulting Text to display is inserted into the document, emphasized, and its href attribute assigned the value
of the Address. As with Word, when the current selection is within the link emphasis, invoking InsertHyperlink
allows editing the link. Does not use parameters.
InsertInlineElement
Allows inserting of an inline element (media or OLE) for a para type element.
Table: InsertInlineElement Parameters
Parameter | Required | Definition |
displayName | yes |
|
InsertPageBreak
Toggles the pageBreak attribute value on the next visible element following the cursor location between
true and false. See section 12.3 for information on the pageBreak attribute. Does not use parameters.
InsertSectionBreak
Toggles the sectionBreak attribute value on the next visible element following the cursor location between
true and false. See section 12.3 for information on the sectionBreak attribute.
Table: InsertSectionBreak Parameters
Parameter | Required | Definition |
breakType | no | String. Specifies the type of section break to be inserted. May be set to either sectionBreaknextPage or sectionBreakContinuous. Defaults to sectionBreaknextPage if not specified. |
columnCount | no | String. Specifies the number of columns in the section break. The value for this attribute |
InsertTable
Displays the Insert Table dialog. For more information about elements that affect
this dialog, see “TableStyle” and “Template”.
Table: InsertTable Parameters
Parameter | Required | Definition |
definition | yes | String. Specifies the name of the table definition that should be used for the new |
style | no | String. Specifies the name of the TableStyle that should be used for the new table. |
template | no | String. Specifies the name of the table template that should be used for the new table. |
InsertTableColumn
Insert a new column in the table.
Table: InsertTableColumn Parameters
Parameter | Required | Definition |
direction | yes | String. Specifies where the new column should be inserted relative to the current |
InsertTableRow
Insert a new row in the table.
Table: InsertTableRow Parameters
Parameter | Required | Definition |
direction | yes | String. Specifies where the new row should be inserted relative to the current selection. |
ManageTextEntities
Invokes the Manage Text Entities form, which allows users to add, edit, and remove
content entities and values. Does not use parameters. This applies to internal content
entity definitions. External content entities defined outside of the document are
not displayed in the form.
MergeComments
Used to merge into the current document the comments of other documents.
Selecting Files
To allow the user to select those documents, do not use the <Token> element and MergeComments
will display the MergeComments dialog.
Figure 5‑5: Merge Comments dialog
To provide the list of other documents programmatically, use the optional <Token>
element.
<InternalClass name="MergeComments">
<Token>filepath=...</Token>
<Token>filepath=...</Token>
...
</InternalClass>
Each of the filepath tokens must point to a valid file.
Automatically Merging All Comments
Use the optional <AutoMerge> element to automatically merge all comments rather than
allowing the user to choose on a comment-by-comment basis which comments should be
merged. Only used in conjunction with <Token>.
<InternalClass name="MergeComments">
<Token>filepath=...</Token>
<Token>filepath=...</Token>
<AutoMerge/>
...
</InternalClass>
MergeTableCells
Merges the selected table cells. Does not use parameters.
PageLayout
Invokes the interface for setting page orientation. Does not use parameters.
Paste
Paste the clipboard contents into the document at the current location. Does not use
parameters
DefaultPasteOptionAsText
Allows you to specify whether to or not to automatically paste copied content as Unicode
text without formatting when using the CTRL-V short cut.
<DefaultPasteOptionAsText>true</DefaultPasteOptionAsText>
NOTE: If this parameter is not defined, the default value is false. When the value is false, the text that is pasted is based on the current cursor position as well as the data
available on the clipboard. It could be pasted as unicode text, formatted text or
an <element>.
PreviewRendition
Creates a document rendition according to the values specified by its parameters and
displays the rendition in the specified application. PreviewRendition uses the same
set of parameters as CreateRendition with the addition of the appPath parameter.
Table: PreviewRendition Parameters
Parameter | Required | Definition |
appPath | no | String. Location of the launch application. |
destination | no | String. Specifies the path to which the exported file and embedded media should be |
expandRef | no | Boolean. Indicates whether or not the reference elements should be expanded into the |
filter | no | String. When specified, if destination is omitted, OR if {cd} is specified and one |
params | no | String. Used to supply parameter values to the stylesheet. Parameters are specifies “name=value | name2=value2 | …” |
supportPath | no | String. When a document is rendered/previewed, all files under the folder specified |
xpath | no | String. Apply the transform to a fragment of the current active document pointed to |
xslt | no | String. Specifies the path and name of the transform stylesheet. The path may be a |
filter
The Save As dialog is displayed only if the destination parameter has no value. The
optional filter attribute, if populated, determines what filters will be present in
the Save as Type drop-down box in the Save As dialog. The value of the filter attribute is a resource
ID in the Resources file.
The resource ID identifies a string list of filter types. Each filter type comprises
two parts: the filter text and the filter definition, which are separated by the pipe
character (|). For example, to specify a filter to save as a Word document, you would use the
pair shown below as the value of the “SaveWordDocs” resource ID:
SaveWordDocs = Word Document (*.doc)|*.doc
This would produce the filter shown in “Figure 5‑6”.
Figure 5‑6: Save As Filter
Each filter set is likewise separated by a pipe character. For example, if we wanted
to add Quark XML Author Document (*.xml)|*.xml to the example already given above,
it would look like the example below.
Save
WordDocs
= Word Document (*.doc)|*.doc|Quark XML Author Document (*.xml)|*.xml
It is always wise to include a filter that shows All Files (*.*). Adding this filter
to the example above produces the example below.
SaveWordDocs = Word Document (*.doc)|*.doc|Quark XML Author Document (*.xml)|*.xml|All
Files (*.*)|*.*
Of course, the actual resource ID is arbitrary and can have any name you want. The
filter is specified in this way to aid in localization.
If neither destination nor filter are specified, the rendition is saved to the Quark
XML Author temp directory with a Quark XML Author-generated filename, e.g. MyDoc.doc.
StyleSheet Child Nodes
PreviewRendition may have any number of StyleSheet child nodes. This provides the
ability to perform chained transformations with the output of one stylesheet provided
to the next. Any XSLT parameters that need to be supplied to the individual stylesheet
can be specified by the params attribute as shown in the example shown below.
<Stylesheet xslt="stylesheet name" params="name1=value1|name2=value2"/>
Using PreviewRendition to Load External Objects
PreviewRendition supports configurable stylesheet extensions that allow the execution
of .NET code from within the transform itself. When PreviewRendition is invoked, Quark
XML Author inspects the top of the XSLT for <?XpressExtension?> processing instructions.
For each instruction that is found (multiple instructions are allowed), the .NET object
is loaded and made available to the transform. Additional parameters required by the
.NET object can be supported using the “params” attribute.
Table: PreviewRendition Parameters
Parameter | Required | Definition |
params | no | String. Used to supply parameter values to the stylesheet. Parameters are specifies “name=value | name2=value2 | …” |
The format of the XSLT processing instruction is shown below:
<?XpressExtension namespace="ns" assembly="Assembly" object="Invision.objectname"
?>
Redo
Invokes Quark XML Author’s Redo function. Does not use parameters.
Similar to Word, the Redo stack is cleared each time an action is pushed onto the
Undo stack.
RejectRevision
Rejects the currently selected document revision or, if the rejectAll parameter is present and set to true, rejects all document revisions. If neither parameter is present, any revision(s)
in the current selection will be rejected.
Table: RejectRevision Parameters
Parameter | Required | Definition |
keyCode | no | Integer. Specifies the keyCode for a specific document node. If keyCode is a valid |
rejectAll | no | Boolean. Set to true to reject all revisions in the document. Set to false to reject all revisions in the current selection. Defaults to false. |
SaveToRepository
Saves the current document to the specified repository.
Table: SaveToRepository Parameters
Parameter | Required | Definition |
assembly | yes | String. Specifies the file name of the .NET class library of the external process, |
class | yes | String. Specifies the fully namespace-qualified class name within the .dll file being |
Tokens
Token child elements can be used to specify additional parameter information. See
section 6.2.1.2 for more information on using tokens.
Delegates
Indicates that the Argument will have one or more Delegate child nodes that will make
a call to an external DLL for information. The syntax is shown in the example below.
<Delegate>InvokeInternalClass</Delegate>
Delegates refer to methods in the external DLL that may be called to perform functions
within the application. Some are named similarly to methods in other assemblies, and
may be called by them. See section 6.4, for a list of available delegates and information
on how to use them.
SetAccessMode
Allows user to change the accessMode property of a document dynamically.
Table: SetAccessMode Parameters
Parameter | Required | Definition |
accessMode | yes | String. The required accessMode parameter specifies the access mode to which the author |
Table: accessMode Values
Value | Definition |
Author | User can perform all editing and authoring functions. |
Comment | User cannot edit document content. User can view, add, modify and delete all comments |
RestrictedComment | User cannot edit document content. User can view their own comments in Balloons or |
Review | Read-only access. User can view the document, but cannot change any content or any |
Revise | Does not affect the editing experience, but is used to indicate when menu options |
User Experience
The user experience for working with comments is currently not documented in an out-of-the-box
user guide so we are describing the experience here for archival purposes.
Editing Comments
Comments may only be edited in Word’s Reviewing Pane.
Viewing Comments
In Word’s comment balloons, only the comments of the current author are displayed.
In Word’s Reviewing Pane, the comments of all authors are displayed.
Access Modes and SharePoint
For details on modeling access modes in SharePoint see the “QXA_Technical_Reference_Manual_Adapter_for_SharePoint_EI_4.0”
manual.
SetColumns
Launches the Quark XML Author Columns dialog. Does not use parameters. See the user guide for details on the user experience.
SpellChecker
Launches the Quark XML Author spelling checker. Does not use parameters.
ShowAttributesHandler
Displays the Attributes Panel dialog.
Table: ShowAttributesHandler Parameters
Parameter | Required | Definition |
xpath | no | String. An xpath value that describes the element that will be affected. The xpath If an xpath for a specific element is provided, the visible attributes for that element If an xpath is not provided, the XomCurrentNode is used as the starting point in a |
SplitTableCells
Splits the currently selected table cell. Does not use parameters.
StyleHandler
Invokes the Quark XML Author style handler. Does not use parameters.
TableAutoFitBehavior
Sets the column width behavior for the selected table.
Table: TableAutoFitBehavior Parameters
Parameter | Required | Definition |
value | yes | Specifies whether columns have fixed width or a width proportional to the number of If set to Proportional, invoking TableAutoFitBehavior will set the table to proportional-width columns. |
TableBorders
Invokes the toolbar drop-down table borders tool, which allows the user to apply borders
to table cells.
Table: TableBorders Parameters
Parameter | Required | Definition |
borderType | yes | String. Specifies the border type to apply to the currently selected table cells. |
TableCellAlignment
Invokes the Table Cell Alignment handler.
In Word, the handler uses the following parameter:
Table: TableCellAlignment Parameters
Parameter | Required | Definition |
align | yes | String. Specifies the alignment of content within the cell. The first character species |
For example,
<toggleButton id="TableCellAlignTopLeftXA" label="Align Top Left" imageMso="TableCellAlignTopLeft" showLabel="false">
<InternalClass name="TableCellAlignment" align="tl"/>
</toggleButton>
TableDistributeColumns
Distributes currently selected table columns so that all are equal width. Does not
use parameters.
TableDistributeRows
Distributes currently selected table rows so that all are equal height. Does not use
parameters
TableRefresh
Redraws the selected table. Does not use parameters.
QuarkSubSection
Displays Text Direction dialog. Allows user to change the text direction for the table
cell. Does not use parameters.
ToggleCommentsPane
Toggles the Comments Pane opened and closed. Does not use parameters.
ToggleEmpty
Toggles the Empty style between its standard font height/background color and the
specified values.
Toggles the Empty style between its standard font height/background color and the
specified values.
ToggleEntityView
Toggles the display of content entities in the document between the entity names and
their values. Does not use parameters.
ToggleKeepWithNext
For the selected element, toggles the value of the keep-with-next attribute between true and false. Does not use parameters.
ToggleTrackChange
For the current document, toggles the Track Changes feature bbetween true and false. Does not use parameters.
ToggleVisibleElement
Renders an element, emphasis, or set of elements or emphasis, identified by the xpath parameter, visible or hidden, depending on the value of the state parameter. Invoking this Internal Class sets the value of the inv:visible attribute for the specified element(s) to true if state=”Show” or to false if state=”Hide”.
Only elements that
are defined as visible in the XAS can be hidden/shown in this manner.
Children of the table node (table heading rows, table body, and so forth) cannot be
hidden/shown independently of the parent table
Table: ToggleVisibleElement Parameters
Parameter | Required | Definition |
state | yes | String. Valid values are: Show or Hide. If set to Show, existing inv:visible attributes for the specified element(s) are removed (because |
xpath | yes | String. An xpath value that describes the element or elements that will be affected. |
ToggleWidowOrphanControl
For the selected element, toggles the value of the widow-control attribute between true and false. Does not use parameters
Undo
Invokes Quark XML Author’s Undo function. Does not use parameters.
Similar to Word, the Redo stack is cleared each time an action is pushed onto the
Undo stack.
UpdateSchema
Dynamically changes the Quark XML Author Structure (XAS) and re-renders the document.
This change only affects the current document. Instead of parameters, uses one or
more child <ElementDef> nodes similar to the XAS definition element of the same name.
For example, consider an ElementDef for a node that is initially visible in the document:
<ElementDef name="heading-instruction" friendly="Instruction" visible="true" style="Heading Instruction">
<!-- Element structure defined -->
</ElementDef>
To dynamically change the definition’s visible value from true to false, the Internal Class would be defined as shown below:
<Internal Class="" name="UpdateSchema">
<ElementDef name="heading-instruction" friendly="Instruction" visible="false" style="Heading Instruction"/>
</InternalClass>
Note that the <ElementDef> node is a leaf node only.
The following ElementDef attributes may be changed: visible, style, excludeFromContextMenu.
WordDialogEdit
Invokes the Word dialog named in the dialogName parameter.
Table: WordDialogEdit Parameters
Parameter | Required | Definition |
dialogName | yes | String. The Word dialog that should be invoked. For example, wdDialogInsertSymbol. |