InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IXMLElementCommands Class Referenceabstract

#include <IXMLElementCommands.h>

Inheritance diagram for IXMLElementCommands:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IXMLELEMENTCOMMANDS }
 
enum  TableTagPreference { kTagByRow, kTagByColumn, kNone, kTagByRowAndBody }
 

Public Member Functions

virtual ErrorCode CreateElement (const WideString &tagToApply, UIDRef storyUIDRef, TextIndex startTextIndex, TextIndex endTextIndex, const XMLReference &parentXMLR=kInvalidXMLReference, XMLReference *createdElement=nil, bool16 doVerify=kTrue, bool16 useExistingMarkers=kFalse)=0
 
virtual ICommandCreateElementCommand (const WideString &tagToApply, UIDRef storyUIDRef, TextIndex startTextIndex, TextIndex endTextIndex, const XMLReference &parentXMLR=kInvalidXMLReference, bool16 doVerify=kTrue, bool16 useExistingMarkers=kFalse)=0
 
virtual ErrorCode CreateElement (const WideString &tagToApply, UIDRef storyUIDRef, const RangeData &range, const XMLReference &parentXMLR=kInvalidXMLReference, XMLReference *createdElement=nil, bool16 doVerify=kTrue, bool16 useExistingMarkers=kFalse)=0
 
virtual ICommandCreateElementCommand (const WideString &tagToApply, UIDRef storyUIDRef, const RangeData &range, const XMLReference &parentXMLR=kInvalidXMLReference, bool16 doVerify=kTrue, bool16 useExistingMarkers=kFalse)=0
 
virtual ErrorCode CreateElement (UID tagToApply, UIDRef storyUIDRef, TextIndex startTextIndex, TextIndex endTextIndex, const XMLReference &parentXMLRef=kInvalidXMLReference, XMLReference *createdElement=nil, bool16 doVerify=kTrue, bool16 useExistingMarkers=kFalse)=0
 
virtual ICommandCreateElementCommand (UID tagToApply, UIDRef storyUIDRef, TextIndex startTextIndex, TextIndex endTextIndex, const XMLReference &parentXMLRef=kInvalidXMLReference, bool16 doVerify=kTrue, bool16 useExistingMarkers=kFalse)=0
 
virtual ErrorCode CreateElement (const WideString &tagToApply, UID contentItem, const XMLReference &parentXMLRef, int32 indexInParent, XMLReference *createdElement=nil, bool16 doVerify=kTrue)=0
 
virtual ErrorCode CreateElement (UID tagToApply, UID contentItem, const XMLReference &parentXMLRef, int32 indexInParent, XMLReference *createdElement=nil, bool16 doVerify=kTrue)=0
 
virtual ErrorCode CreateElement (const WideString &tagToApply, const UIDRef &table, GridID anchor, const GridSpan &span, XMLReference *createdElement=nil, bool16 doVerify=kTrue)=0
 
virtual ErrorCode CreateElement (UID tagToApply, const UIDRef &table, GridID anchor, const GridSpan &span, XMLReference *createdElement=nil, bool16 doVerify=kTrue)=0
 
virtual ErrorCode CreateElement (const WideString &tagToApply, const UIDRef &tableModelUIDRef, GridID cellGridID, XMLReference *createdElement=nil, bool16 doVerify=kTrue)=0
 
virtual ErrorCode CreateElement (UID tagToApply, const UIDRef &tableModelUIDRef, GridID cellGridID, XMLReference *createdElement=nil, bool16 doVerify=kTrue)=0
 
virtual ICommandCreateElementCommand (UID tagToApply, const UIDRef &tableModelUIDRef, GridID cellGridID, bool16 doVerify=kTrue)=0
 
virtual ErrorCode CreateElement (const XMLDTDInsertElement &xmlDTDInsertElement, XMLReference *createdElement=nil, bool16 doVerify=kTrue)=0
 
virtual ErrorCode CreateElement (UID tagToApply, const UIDRef &storyUIDRef, UID contentItem, bool16 addToDocRefList, XMLReference *createdElement=nil, bool16 doVerify=kTrue)=0
 
virtual ErrorCode CreateTableElement (const WideString &tableTagToApply, const WideString &tableCellTagToApply, const UIDRef &storyUIDRef, TextIndex textIndex, XMLReference *createdTableElement=nil, bool16 doVerify=kTrue)=0
 
virtual ICommandCreateTableElementCommand (const WideString &tableTagToApply, const WideString &tableCellTagToApply, const UIDRef &storyUIDRef, TextIndex textIndex, bool16 doVerify=kTrue)=0
 
virtual ErrorCode CreateTableElement (UID tableTagToApply, UID tableCellTagToApply, const UIDRef &storyUIDRef, TextIndex textIndex, XMLReference *createdTableElement=nil, bool16 doVerify=kTrue)=0
 
virtual ICommandCreateTableElementCommand (UID tableTagToApply, UID tableCellTagToApply, const UIDRef &storyUIDRef, TextIndex textIndex, bool16 doVerify=kTrue)=0
 
virtual ErrorCode CreateTableElement (const WideString &tableTagToApply, const WideString &tableCellTagToApply, const UIDRef &tableModelUIDRef, XMLReference *createdTableElement=nil, bool16 doVerify=kTrue)=0
 
virtual ICommandCreateTableElementCommand (const WideString &tableTagToApply, const WideString &tableCellTagToApply, const UIDRef &tableModelUIDRef, bool16 doVerify=kTrue)=0
 
virtual ErrorCode CreateTableElement (UID tableTagToApply, UID tableCellTagToApply, const UIDRef &tableModelUIDRef, XMLReference *createdTableElement=nil, bool16 doVerify=kTrue)=0
 
virtual ICommandCreateTableElementCommand (UID tableTagToApply, UID tableCellTagToApply, const UIDRef &tableModelUIDRef, bool16 doVerify=kTrue)=0
 
virtual ErrorCode CreateTableElement (const TableTagData &tableTagData, const UIDRef &tableModelUIDRef, XMLReference *createdTableElement=nil, bool16 doVerify=kTrue)=0
 
virtual ErrorCode CreateTableElement (const TableTagData &tableTagData, const UIDRef &storyUIDRef, TextIndex textIndex, XMLReference *createdTableElement=nil, bool16 doVerify=kTrue)=0
 
virtual ICommandCreateTableElementCommand (const TableTagData &tableTagData, const UIDRef &tableModelUIDRef, bool16 doVerify=kTrue)=0
 
virtual ICommandCreateTableElementCommand (const TableTagData &tableTagData, const UIDRef &storyUIDRef, TextIndex textIndex, bool16 doVerify=kTrue)=0
 
virtual ErrorCode CreateStyleToTagElements (const UIDRef &docUIDRef, UID storyTagUID=kInvalidUID)=0
 
virtual ErrorCode DeleteElement (const XMLReference &deleteElementXMLRef, bool16 deleteChildren, bool16 deleteInSameStoryOnly=kFalse, bool16 reconnectChildren=kFalse, bool16 doVerify=kTrue)=0
 
virtual ICommandDeleteElementCommand (const XMLReference &deleteElementXMLRef, bool16 deleteChildren, bool16 deleteInSameStoryOnly=kFalse, bool16 reconnectChildren=kFalse, bool16 doVerify=kTrue)=0
 
virtual ErrorCode RangeDeleteElement (const UIDRef &storyUIDRef, TextIndex startTextIndex, TextIndex endTextIndex)=0
 
virtual ErrorCode RangeDeleteElement (const UIDRef &storyUIDRef, const RangeData &range)=0
 
virtual ICommandRangeDeleteElementCommand (const UIDRef &storyUIDRef, TextIndex startTextIndex, TextIndex endTextIndex)=0
 
virtual ErrorCode DeleteElementAndContent (const XMLReference &deleteElementXMLRef, bool16 deletePageItems=kFalse)=0
 
virtual ErrorCode MoveElement (const XMLReference &moveElementXMLRef, const XMLReference &newParentXMLRef, int32 newIndexInParent, TextIndex contentOffset, bool16 doVerify=kTrue)=0
 
virtual ErrorCode PlaceElement (const XMLReference &elementToPlace, const UIDRef &graphicFrame)=0
 
virtual ErrorCode UnplaceElement (const UIDRef &elementToUnplace)=0
 
virtual ICommandUnplaceElementCommand (const UIDRef &elementToUnplace)=0
 
virtual ErrorCode SetElement (const XMLReference &elementRef, UID tag)=0
 
virtual ErrorCode SetElement (const XMLReference &elementRef, const WideString &tag)=0
 
virtual ErrorCode SetElement (const XMLDTDReplaceElement &replaceElement)=0
 
virtual ErrorCode DeleteElementContent (const XMLReference &elementRef)=0
 
virtual ErrorCode SetTableTagPreference (const XMLReference &tableElement, TableTagPreference newSetting, const TableTagData &tableTagData)=0
 
virtual ErrorCode MakeParentStoryThreadTagged (ITextStoryThread *textStoryThread, bool16 doVerify=kTrue)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Processes (and creates) commands for creating, deleting, and manipulating XML elements. For instance, there are overloaded CreateElement methods for creating an XML element. Each one takes different arguments, but all of them create a regular element that can hold content. There are methods to process commands to delete elements in different way; directly, through reference or indirectly, through deleting elements that are marking-up a particular text range. There are other methods to change the properties of an element, such as its tag name.

Member Enumeration Documentation

Enumerator
kTagByColumn 

Each row of the table gets tagged automatically

kNone 

Each column of the table gets tagged automatically

kTagByRowAndBody 

No automatic row/column tagging In addition to each row of the table gets tagged automatically, also add header, body, and footer elements as appropriate

Member Function Documentation

virtual ErrorCode IXMLElementCommands::CreateElement (const WideStringtagToApply,
UIDRef storyUIDRef,
TextIndex startTextIndex,
TextIndex endTextIndex,
const XMLReferenceparentXMLR = kInvalidXMLReference,
XMLReferencecreatedElement = nil,
bool16 doVerify = kTrue,
bool16 useExistingMarkers = kFalse 
)
pure virtual

Can be used to tag a text range; creates named tag if it doesn't already exist in tag-list. The command will automatically find the XML element which will be the parent of the of the new element, based on the range you pass in. This can be slow on a story with many elements, so optionally you may pass a reference to an element (parentXMLR) in the story to start searching from, to find the element that encloses the text range. Returns a reference to the new element in createdElement, if createdElement is not nil. This and related methods may process a command of type kXMLCreateElementCmdBoss behind the facade.

Parameters
tagToApplyname of tag to mark up text range; it will create a tag in the document tag list (IXMLTagList)if one doesn't already exist.
storyUIDRefspecifies text model containing text to mark-up
startTextIndexlocation of the start of the range you want to tag in the text model
endTextIndexlocation of end of the range you want to tag in the text model
parentXMLRparent reference, can be kInvalidXMLReference, optionally you may pass a reference to an element in the story to start searching from, to find the element that encloses the text range
createdElement[OUT] if createdElement is not nil, contains a reference to the newly created element
doVerify[DEBUG only] whether to perform structure verification after command is executed
useExistingMarkersIf kFalse, the create command will create new markers for the element. If kTrue, the create command will use the existing markers at startTextIndex and endTextIndex for the element (caller guarantees they are valid marker characters)
Returns
ErrorCode kSuccess if operation could be completed, kFailure otherwise
virtual ErrorCode IXMLElementCommands::CreateElement (const WideStringtagToApply,
UIDRef storyUIDRef,
const RangeDatarange,
const XMLReferenceparentXMLR = kInvalidXMLReference,
XMLReferencecreatedElement = nil,
bool16 doVerify = kTrue,
bool16 useExistingMarkers = kFalse 
)
pure virtual
Method to create element and tag a text range

Parameters
tagToApplyname of tag to mark up text range; it will create a tag in the document tag list (IXMLTagList) if one doesn't already exist.
storyUIDRefspecifies text model containing text to mark-up
rangeidentifies range to mark-up with given tag
parentXMLRparent reference, can be kInvalidXMLReference, optionally you may pass a reference to an element in the story to start searching from, to find the element that encloses the text range
createdElement[OUT] if createdElement is not nil, contains a reference to the newly created element
doVerify[DEBUG only] whether to perform structure verification after command is executed
useExistingMarkersIf kFalse, the create command will create new markers for the element. If kTrue, the create command will use the existing markers at the beginning and the end of the range for the element (caller guarantees they are valid marker characters)
Returns
ErrorCode kSuccess if operation could be completed, kFailure otherwise
virtual ErrorCode IXMLElementCommands::CreateElement (UID tagToApply,
UIDRef storyUIDRef,
TextIndex startTextIndex,
TextIndex endTextIndex,
const XMLReferenceparentXMLRef = kInvalidXMLReference,
XMLReferencecreatedElement = nil,
bool16 doVerify = kTrue,
bool16 useExistingMarkers = kFalse 
)
pure virtual

Method to create element and tag text range.

Parameters
tagToApplyUID of tag to apply
storyUIDRefspecifies text model containing text to mark-up
startTextIndexlocation of the start of the range you want to tag in the text model
endTextIndexlocation of end of the range you want to tag in the text model
parentXMLRefparent reference, can be kInvalidXMLReference, optionally you may pass a reference to an element in the story to start searching from, to find the element that encloses the text range
createdElement[OUT] if not nil, contains a reference to the newly created element
doVerify[DEBUG only] whether to perform structure verification after command is executed
useExistingMarkersIf kFalse, the create command will create new markers for the element. If kTrue, the create command will use the existing markers at startTextIndex and endTextIndex for the element (caller guarantees they are valid marker characters)
Returns
ErrorCode kSuccess if operation could be completed successfully, kFailure otherwise
virtual ErrorCode IXMLElementCommands::CreateElement (const WideStringtagToApply,
UID contentItem,
const XMLReferenceparentXMLRef,
int32 indexInParent,
XMLReferencecreatedElement = nil,
bool16 doVerify = kTrue 
)
pure virtual

Call when you are creating a new element as a child of an existing element, and you want the start and end locations in the text to be generated automatically.

Parameters
tagToApplyname of tag; it will create a tag in the document if one doesn't already exist.
contentItemreference to the content the tag will hold (text story, image, or pdf) or a graphic frame
parentXMLRefparent reference, can be kInvalidXMLReference, optionally you may pass a reference to an element in the story to start searching from, to find the element that encloses the text range
indexInParentlocation within the parent where the new element will be created
createdElement[OUT] if createdElement is not nil, contains a reference to the newly created element
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ErrorCode kSuccess if operation could be completed successfully, kFailure otherwise
virtual ErrorCode IXMLElementCommands::CreateElement (UID tagToApply,
UID contentItem,
const XMLReferenceparentXMLRef,
int32 indexInParent,
XMLReferencecreatedElement = nil,
bool16 doVerify = kTrue 
)
pure virtual

Create an element given a UID of a tag to apply (IXMLTag)

Parameters
tagToApplyname of tag; it will create a tag in the document if one doesn't already exist.
contentItemreference to the content the tag will hold (text story, image, or pdf) or a graphic frame
parentXMLRefparent reference, can be kInvalidXMLReference, optionally you may pass a reference to an element in the story to start searching from, to find the element that encloses the text range
indexInParentlocation within the parent where the new element will be created
createdElement[OUT] if createdElement is not nil, contains a reference to the newly created element
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ErrorCode kSuccess if operation could be completed successfully, kFailure otherwise
virtual ErrorCode IXMLElementCommands::CreateElement (const WideStringtagToApply,
const UIDReftable,
GridID anchor,
const GridSpanspan,
XMLReferencecreatedElement = nil,
bool16 doVerify = kTrue 
)
pure virtual

Create an element given a name of a tag to apply

Parameters
tagToApplyname of tag; it will create a tag in the document if one doesn't already exist.
startCellfirst cell in the range to tag
endCelllast cell in the range to tag
parentXMLRefparent reference, can be kInvalidXMLReference, optionally you may pass a reference to an element in the story to start searching from, to find the element that encloses the text range
createdElement[OUT] if createdElement is not nil, contains a reference to the newly created element
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ErrorCode kSuccess if operation could be completed successfully, kFailure otherwise
virtual ErrorCode IXMLElementCommands::CreateElement (UID tagToApply,
const UIDReftable,
GridID anchor,
const GridSpanspan,
XMLReferencecreatedElement = nil,
bool16 doVerify = kTrue 
)
pure virtual

Create an element given a UID of a tag to apply (IXMLTag)

Parameters
tagToApplyname of tag; it will create a tag in the document if one doesn't already exist.
startCellfirst cell in the range to tag
endCelllast cell in the range to tag
parentXMLRefparent reference, can be kInvalidXMLReference, optionally you may pass a reference to an element in the story to start searching from, to find the element that encloses the text range
createdElement[OUT] if createdElement is not nil, contains a reference to the newly created element
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ErrorCode kSuccess if operation could be completed successfully, kFailure otherwise
virtual ErrorCode IXMLElementCommands::CreateElement (const WideStringtagToApply,
const UIDReftableModelUIDRef,
GridID cellGridID,
XMLReferencecreatedElement = nil,
bool16 doVerify = kTrue 
)
pure virtual

Create an element given a name of a tag to apply

Parameters
tagToApplyname of tag; it will create a tag in the document if one doesn't already exist
tableModelUIDRefUIDRef of table model containing the cell
cellGridIDGridID of cell to tag
createdElement[OUT] if createdElement is not nil, contains a reference to the newly created element
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ErrorCode kSuccess if operation could be completed successfully, kFailure otherwise
virtual ErrorCode IXMLElementCommands::CreateElement (UID tagToApply,
const UIDReftableModelUIDRef,
GridID cellGridID,
XMLReferencecreatedElement = nil,
bool16 doVerify = kTrue 
)
pure virtual

Create an element given a UID of a tag to apply (IXMLTag)

Parameters
tagToApplyUID of tag to apply (IXMLTag)
tableModelUIDRefUIDRef of table model containing the cell
cellGridIDGridID of cell to tag
createdElement[OUT] if createdElement is not nil, contains a reference to the newly created element
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ErrorCode kSuccess if operation could be completed successfully, kFailure otherwise
virtual ErrorCode IXMLElementCommands::CreateElement (const XMLDTDInsertElement & xmlDTDInsertElement,
XMLReferencecreatedElement = nil,
bool16 doVerify = kTrue 
)
pure virtual

Create an element using the given insert element info

Parameters
xmlDTDInsertElementinsert element info to create element with
createdElement[OUT] if returned error is kSuccess and createdElement is not nil, contains the reference to the newly created element
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ErrorCode kSuccess if operation be completed successfully; error code otherwise
virtual ErrorCode IXMLElementCommands::CreateElement (UID tagToApply,
const UIDRefstoryUIDRef,
UID contentItem,
bool16 addToDocRefList,
XMLReferencecreatedElement = nil,
bool16 doVerify = kTrue 
)
pure virtual

Create an element given the containing story and the content item. Since no parent element is specified, the created element is not added to the XML structure. The caller is responsible for maintaining the new element. NOTE: this is limited use only. Do not use unless absolutely necessary. Structure verification is not done because there's no parent anyway and is thus not part of XML structure.

Parameters
tagToApplytag to apply to the element
storyUIDRefUIDRef of the story containing the element
contentItemcontent item in the layout view which will represent the content
addToDocRefListwhetehr to insert the new element to the IXMLReferenceListData interface on the document
createdElement[OUT] if returned error is kSuccess and createdElement is not nil, contains the reference to the newly created element
virtual ICommand* IXMLElementCommands::CreateElementCommand (const WideStringtagToApply,
UIDRef storyUIDRef,
TextIndex startTextIndex,
TextIndex endTextIndex,
const XMLReferenceparentXMLR = kInvalidXMLReference,
bool16 doVerify = kTrue,
bool16 useExistingMarkers = kFalse 
)
pure virtual

Can be used to tag a text range; creates named tag if it doesn't already exist in tag-list. The command will automatically find the XML element which will be the parent of the of the new element, based on the range you pass in. This can be slow on a story with many elements, so optionally you may pass a reference to an element (parentXMLR) in the story to start searching from, to find the element that encloses the text range. Returns a command of type kXMLCreateElementCmdBoss to create the new element.

Parameters
tagToApplyname of tag to mark up text range; it will create a tag in the document tag list (IXMLTagList)if one doesn't already exist.
storyUIDRefspecifies text model containing text to mark-up
startTextIndexlocation of the start of the range you want to tag in the text model
endTextIndexlocation of end of the range you want to tag in the text model
parentXMLRparent reference, can be kInvalidXMLReference, optionally you may pass a reference to an element in the story to start searching from, to find the element that encloses the text range
doVerify[DEBUG only] whether to perform structure verification after command is executed
useExistingMarkersIf kFalse, the create command will create new markers for the element. If kTrue, the create command will use the existing markers at startTextIndex and endTextIndex for the element (caller guarantees they are valid marker characters)
Returns
ICommand interface ptr with reference count incremented
virtual ICommand* IXMLElementCommands::CreateElementCommand (const WideStringtagToApply,
UIDRef storyUIDRef,
const RangeDatarange,
const XMLReferenceparentXMLR = kInvalidXMLReference,
bool16 doVerify = kTrue,
bool16 useExistingMarkers = kFalse 
)
pure virtual

Method to create a command to create an element and tag a text range

Parameters
tagToApplyname of tag to mark up text range; it will create a tag in the document tag list (IXMLTagList) if one doesn't already exist.
storyUIDRefspecifies text model containing text to mark-up
rangeidentifies range to mark-up with given tag
parentXMLRparent reference, can be kInvalidXMLReference, optionally you may pass a reference to an element in the story to start searching from, to find the element that encloses the text range
doVerify[DEBUG only] whether to perform structure verification after command is executed
useExistingMarkersIf kFalse, the create command will create new markers for the element. If kTrue, the create command will use the existing markers at the beginning and the end of the range for the element (caller guarantees they are valid marker characters)
Returns
ICommand interface ptr with reference count incremented
virtual ICommand* IXMLElementCommands::CreateElementCommand (UID tagToApply,
UIDRef storyUIDRef,
TextIndex startTextIndex,
TextIndex endTextIndex,
const XMLReferenceparentXMLRef = kInvalidXMLReference,
bool16 doVerify = kTrue,
bool16 useExistingMarkers = kFalse 
)
pure virtual

Method to create a command to create an element and tag text range.

Parameters
tagToApplyUID of tag to apply
storyUIDRefspecifies text model containing text to mark-up
startTextIndexlocation of the start of the range you want to tag in the text model
endTextIndexlocation of end of the range you want to tag in the text model
parentXMLRefparent reference, can be kInvalidXMLReference, optionally you may pass a reference to an element in the story to start searching from, to find the element that encloses the text range
doVerify[DEBUG only] whether to perform structure verification after command is executed
useExistingMarkersIf kFalse, the create command will create new markers for the element. If kTrue, the create command will use the existing markers at startTextIndex and endTextIndex for the element (caller guarantees they are valid marker characters)
Returns
ICommand interface ptr with reference count incremented
virtual ICommand* IXMLElementCommands::CreateElementCommand (UID tagToApply,
const UIDReftableModelUIDRef,
GridID cellGridID,
bool16 doVerify = kTrue 
)
pure virtual

Create an element given a UID of a tag to apply (IXMLTag)

Parameters
tagToApplyUID of tag to apply (IXMLTag)
tableModelUIDRefUIDRef of table model containing the cell
cellGridIDGridID of cell to tag
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ICommand interface ptr with reference count incremented
virtual ErrorCode IXMLElementCommands::CreateStyleToTagElements (const UIDRefdocUIDRef,
UID storyTagUID = kInvalidUID 
)
pure virtual

Create elements using the Style-To-Tag mapping. This will cycle through user accessible stories in the document. If a story is tagged, all non-link element children in the story are deleted; if a story is not tagged, it will be tagged if it contains a mapped style. Then the content of the story is scanned, and elements are created if any style is mapped to a tag.

Parameters
docUIDRefspecifies the document to process
storyTagUIDa story tag UID. If no story tag UID is provided, "Story" will be used, and created if necessary.
Returns
ErrorCode kSuccess if operation could be completed successfully, kFailure otherwise
virtual ErrorCode IXMLElementCommands::CreateTableElement (const WideStringtableTagToApply,
const WideStringtableCellTagToApply,
const UIDRefstoryUIDRef,
TextIndex textIndex,
XMLReferencecreatedTableElement = nil,
bool16 doVerify = kTrue 
)
pure virtual

Create table and table cell elements

Parameters
tableTagToApplyname of tag to apply to the table
tableCellTagToApplyname of tag to apply to the table cells
storyUIDRefUIDRef of the story containing the table
textIndextextIndex of any cell in the table
createdElement[OUT] if createdElement is not nil, receives a reference to the newly created element
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ErrorCode kSuccess if operation could be completed successfully, kFailure otherwise
virtual ErrorCode IXMLElementCommands::CreateTableElement (UID tableTagToApply,
UID tableCellTagToApply,
const UIDRefstoryUIDRef,
TextIndex textIndex,
XMLReferencecreatedTableElement = nil,
bool16 doVerify = kTrue 
)
pure virtual

Create table and table cell elements

Parameters
tableTagToApplyUID of tag to apply to the table
tableCellTagToApplyUID of tag to apply to the table cells
storyUIDRefUIDRef of the story containing the table
textIndextextIndex of any cell in the table
createdElement[OUT] if createdElement is not nil, receives a reference to the newly created element
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ErrorCode kSuccess if operation could be completed successfully, kFailure otherwise
virtual ErrorCode IXMLElementCommands::CreateTableElement (const WideStringtableTagToApply,
const WideStringtableCellTagToApply,
const UIDReftableModelUIDRef,
XMLReferencecreatedTableElement = nil,
bool16 doVerify = kTrue 
)
pure virtual

Create table and table cell elements

Parameters
tableTagToApplyname of tag to apply to the table
tableCellTagToApplyname of tag to apply to the table cells
tableModelUIDRefUIDRef of table model to tag
createdElement[OUT] if createdElement is not nil, receives a reference to the newly created element
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ErrorCode kSuccess if operation could be completed successfully, kFailure otherwise
virtual ErrorCode IXMLElementCommands::CreateTableElement (UID tableTagToApply,
UID tableCellTagToApply,
const UIDReftableModelUIDRef,
XMLReferencecreatedTableElement = nil,
bool16 doVerify = kTrue 
)
pure virtual

Create table and table cell elements

Parameters
tableTagToApplyUID of tag to apply to the table
tableCellTagToApplyUID of tag to apply to the table cells
tableModelUIDRefUIDRef of table model to tag
createdElement[OUT] if createdElement is not nil, receives a reference to the newly created element
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ErrorCode kSuccess if operation could be completed successfully, kFailure otherwise
virtual ErrorCode IXMLElementCommands::CreateTableElement (const TableTagDatatableTagData,
const UIDReftableModelUIDRef,
XMLReferencecreatedTableElement = nil,
bool16 doVerify = kTrue 
)
pure virtual

Create table and table cell elements

Parameters
tableTagDatainformation about what tags to use when tagging
tableModelUIDRefUIDRef of table model to tag
createdElement[OUT] if createdElement is not nil, receives a reference to the newly created element
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ErrorCode kSuccess if operation could be completed successfully, kFailure otherwise
virtual ErrorCode IXMLElementCommands::CreateTableElement (const TableTagDatatableTagData,
const UIDRefstoryUIDRef,
TextIndex textIndex,
XMLReferencecreatedTableElement = nil,
bool16 doVerify = kTrue 
)
pure virtual

Create table and table cell elements

Parameters
tableTagDatainformation about what tags to use when tagging
storyUIDRefUIDRef of the story containing the table
textIndextextIndex of any cell in the table
createdElement[OUT] if createdElement is not nil, receives a reference to the newly created element
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ErrorCode kSuccess if operation could be completed successfully, kFailure otherwise
virtual ICommand* IXMLElementCommands::CreateTableElementCommand (const WideStringtableTagToApply,
const WideStringtableCellTagToApply,
const UIDRefstoryUIDRef,
TextIndex textIndex,
bool16 doVerify = kTrue 
)
pure virtual

Generate a command to create table and table cell elements

Parameters
tableTagToApplyname of tag to apply to the table
tableCellTagToApplyname of tag to apply to the table cells
storyUIDRefUIDRef of the story containing the table
textIndextextIndex of any cell in the table
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ICommand interface ptr with reference count incremented
virtual ICommand* IXMLElementCommands::CreateTableElementCommand (UID tableTagToApply,
UID tableCellTagToApply,
const UIDRefstoryUIDRef,
TextIndex textIndex,
bool16 doVerify = kTrue 
)
pure virtual

Generate a command to create table and table cell elements

Parameters
tableTagToApplyUID of tag to apply to the table
tableCellTagToApplyUID of tag to apply to the table cells
storyUIDRefUIDRef of the story containing the table
textIndextextIndex of any cell in the table
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ICommand interface ptr with reference count incremented
virtual ICommand* IXMLElementCommands::CreateTableElementCommand (const WideStringtableTagToApply,
const WideStringtableCellTagToApply,
const UIDReftableModelUIDRef,
bool16 doVerify = kTrue 
)
pure virtual

Generate a command to create table and table cell elements

Parameters
tableTagToApplyname of tag to apply to the table
tableCellTagToApplyname of tag to apply to the table cells
tableModelUIDRefUIDRef of table model to tag
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ICommand interface ptr with reference count incremented
virtual ICommand* IXMLElementCommands::CreateTableElementCommand (UID tableTagToApply,
UID tableCellTagToApply,
const UIDReftableModelUIDRef,
bool16 doVerify = kTrue 
)
pure virtual

Generate a command to create table and table cell elements

Parameters
tableTagToApplyUID of tag to apply to the table
tableCellTagToApplyUID of tag to apply to the table cells
tableModelUIDRefUIDRef of table model to tag
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ICommand interface ptr with reference count incremented
virtual ICommand* IXMLElementCommands::CreateTableElementCommand (const TableTagDatatableTagData,
const UIDReftableModelUIDRef,
bool16 doVerify = kTrue 
)
pure virtual

Generate a command to create table and table cell elements

Parameters
tableTagDatainformation about what tags to use when tagging
tableModelUIDRefUIDRef of table model to tag
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ICommand interface ptr with reference count incremented
virtual ICommand* IXMLElementCommands::CreateTableElementCommand (const TableTagDatatableTagData,
const UIDRefstoryUIDRef,
TextIndex textIndex,
bool16 doVerify = kTrue 
)
pure virtual

Generate a command to create table and table cell elements

Parameters
tableTagDatainformation about what tags to use when tagging
storyUIDRefUIDRef of the story containing the table
textIndextextIndex of any cell in the table
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ICommand interface ptr with reference count incremented
virtual ErrorCode IXMLElementCommands::DeleteElement (const XMLReferencedeleteElementXMLRef,
bool16 deleteChildren,
bool16 deleteInSameStoryOnly = kFalse,
bool16 reconnectChildren = kFalse,
bool16 doVerify = kTrue 
)
pure virtual

Delete an element.

Parameters
deleteElementXMLRefreference to the element to be deleted
deleteChildrenflag which if kTrue will cause the element's children to be deleted also
deleteInSameStoryOnlyif kTrue, then child elements which are in the same story are deleted, but child elements which are in separate stories (e.g., placed in another frame) are not deleted).
reconnectChildrenif kTrue, deleted element's children are reconnected to deleted element's parent at the deleted element's position; this requires deleteChildren to be kFalse.
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ErrorCode kSuccess if operation could be completed, kFailure otherwise
virtual ErrorCode IXMLElementCommands::DeleteElementAndContent (const XMLReferencedeleteElementXMLRef,
bool16 deletePageItems = kFalse 
)
pure virtual
Delete an Element and all of it's content. This will delete the element itself and all content including text, 

linked stories and graphic content

Parameters
deleteElementXMLRefspecifies element to delete
deletePageItemswhen kFalse (default), only page item contents will be deleted while page items will remain. When kTrue, page items linked to by the elements will be deleted as well
Returns
ErrorCode kSuccess if operation could be completed, kFailure otherwise
virtual ICommand* IXMLElementCommands::DeleteElementCommand (const XMLReferencedeleteElementXMLRef,
bool16 deleteChildren,
bool16 deleteInSameStoryOnly = kFalse,
bool16 reconnectChildren = kFalse,
bool16 doVerify = kTrue 
)
pure virtual

Create command to delete an element.

Parameters
deleteElementXMLRefreference to the element to be deleted
deleteChildrenflag which if kTrue will cause the element's children to be deleted also
deleteInSameStoryOnlyif kTrue, then child elements which are in the same story are deleted, but child elements which are in separate stories (e.g., placed in another frame) are not deleted).
reconnectChildrenif kTrue, deleted element's children are reconnected to deleted element's parent at the deleted element's position; this requires deleteChildren to be kFalse.
doVerify[DEBUG only] whether to perform structure verification after command is executed
Returns
ICommand interface ptr with reference count incremented
virtual ErrorCode IXMLElementCommands::DeleteElementContent (const XMLReferenceelementRef)
pure virtual

Delete the content in the elements.

Parameters
elementRefspecifies element to remove content from
Returns
ErrorCode kSuccess if operation could be completed, kFailure otherwise
virtual ErrorCode IXMLElementCommands::MakeParentStoryThreadTagged (ITextStoryThreadtextStoryThread,
bool16 doVerify = kTrue 
)
pure virtual

Starting with the given story thread, recursively tag the story thread and its parent threads until a tagged story thread is reached or it doesn't have a parent thread. Tags used are the default tags

Parameters
textStoryThreadstory thread and its parent to tag
doVerify[DEBUG only] whether to perform a XML structure verification. Set to kFalse if this is a temporary state
Returns
ErrorCode error code from the operation
virtual ErrorCode IXMLElementCommands::MoveElement (const XMLReferencemoveElementXMLRef,
const XMLReferencenewParentXMLRef,
int32 newIndexInParent,
TextIndex contentOffset,
bool16 doVerify = kTrue 
)
pure virtual
Move an element to a different location in the hierarchy. 

Client may either specify an exact text index of the new element in contentOffset; or, if contentOffset is invalid, it will figure out the text index based on the element's target position within the parent (newIndexInParent).

Parameters
moveElementXMLRefspecifies element to move
newParentXMLRefnew location in the hierarchy
newIndexInParent
contentOffset
Returns
ErrorCode kSuccess if operation could be completed, kFailure otherwise
virtual ErrorCode IXMLElementCommands::PlaceElement (const XMLReferenceelementToPlace,
const UIDRefgraphicFrame 
)
pure virtual
Place an element into a graphic frame. Processes a command of type kXMLPlaceElementCmdBoss behind the

facade,

Parameters
elementToPlacespecifies element to place
graphicFramespecifies the element into which its to be placed
Returns
ErrorCode kSuccess if operation could be completed, kFailure otherwise
virtual ErrorCode IXMLElementCommands::RangeDeleteElement (const UIDRefstoryUIDRef,
TextIndex startTextIndex,
TextIndex endTextIndex 
)
pure virtual
Delete elements (with exception of linked elements) which has at least one marker in the specified text range 

[startTextIndex, endTextIndex]. Text range is a selection range; i.e.(1,2) means process character at position 1 only.

Parameters
storyUIDRefreference to the story containing the text range
startTextIndexstart TextIndex of the text range to process
endTextIndexend TextIndex of the text range to process
Returns
ErrorCode kSuccess if operation could be completed, kFailure otherwise
virtual ErrorCode IXMLElementCommands::RangeDeleteElement (const UIDRefstoryUIDRef,
const RangeDatarange 
)
pure virtual

Does a RangeDeleteElement with startTextIndex of range.Start(nil), endTextIndex of range.End()

Parameters
storyUIDRefreference to the story containing the text range
rangespecifies the selection range to process; i.e.(1,2) means process character at position 1 only.
Returns
ErrorCode kSuccess if operation could be completed, kFailure otherwise
virtual ICommand* IXMLElementCommands::RangeDeleteElementCommand (const UIDRefstoryUIDRef,
TextIndex startTextIndex,
TextIndex endTextIndex 
)
pure virtual
Create a RangeDeleteElement command for later processing

Parameters
storyUIDRefreference to the story containing the text range
startTextIndexstart of text range to be processed by command
endTextIndexend of text range to be processed
Returns
ICommand interface ptr with reference count incremented
virtual ErrorCode IXMLElementCommands::SetElement (const XMLReferenceelementRef,
UID tag 
)
pure virtual
Set the tag of an existing element

Parameters
elementRefspecifies element to change property of
tagUID of tag (IXMLTag) to associate with element
Returns
ErrorCode kSuccess if operation could be completed, kFailure otherwise
virtual ErrorCode IXMLElementCommands::SetElement (const XMLReferenceelementRef,
const WideStringtag 
)
pure virtual

Change the name associated with a given element.

Parameters
elementRefspecifies element to change property of
tagname of the element to use
Returns
ErrorCode kSuccess if operation could be completed, kFailure otherwise
virtual ErrorCode IXMLElementCommands::SetElement (const XMLDTDReplaceElement & replaceElement)
pure virtual

Replace an element associated with a DTD with another element

Parameters
replaceElementdata indicating the replacement. This is usually returned from IIDXMLElement::GetReplaceElementList()
Returns
ErrorCode kSuccess if operation be completed successfully; error code otherwise
See Also
XMLDTDReplaceElement
IIDXMLElement
virtual ErrorCode IXMLElementCommands::SetTableTagPreference (const XMLReferencetableElement,
TableTagPreference newSetting,
const TableTagDatatableTagData 
)
pure virtual

Specify how the table should be dynamically tagged. Tables can be tagged by row or by column, and then row & column elements will be added dynamically as the table grid layout changes. Or you can set this to none, and no dynamic changes are made.

Parameters
tablespecifies the table to tag
newSettinghow to tag the table
Returns
ErrorCode kSuccess if operation could be completed, kFailure otherwise
virtual ErrorCode IXMLElementCommands::UnplaceElement (const UIDRefelementToUnplace)
pure virtual
"Unplace" or suck content back into the story of the parent element. Processes a command of

type kXMLUnplaceElementCmdBoss behind the facade.

Parameters
elementToUnplacereference to element to unplace
Returns
ErrorCode kSuccess if operation could be completed, kFailure otherwise
virtual ICommand* IXMLElementCommands::UnplaceElementCommand (const UIDRefelementToUnplace)
pure virtual

Create command to "Unplace" or suck content back into the story of the parent element. Creates command boss object of type kXMLUnplaceElementCmdBoss.

Parameters
elementToUnplacereference to element to unplace
Returns
ICommand interface ptr with reference count incremented