![]() | InDesign SDK 20.5 |
#include <IXMLImportMatchRecorder.h>

Public Types | |
| enum | { kDefaultIID = IID_IXMLIMPORTMATCHRECORDER } |
| typedef KeyValuePair < IIDXMLDOMNode *, XMLReference > | MatchRecord |
Public Member Functions | |
| virtual void | RecordMatch (IIDXMLDOMNode *leftNode, const XMLReference &rightNode, bool16 rightNodeIsNew, bool16 recordAsLastMatch=kTrue)=0 |
| virtual bool16 | MatchMade (void) const =0 |
| virtual MatchRecord | GetLastMatch (void) const =0 |
| virtual bool16 | FindMatch (IIDXMLDOMNode *leftNode, XMLReference *rightNode=nil, bool16 *rightNodeIsNew=nil) const =0 |
| virtual bool16 | FindMatchRight (const XMLReference &rightNode, IIDXMLDOMNode **leftNode=nil, bool16 *rightNodeIsNew=nil) const =0 |
| virtual void | ReplaceRightNode (const XMLReference &oldRightNode, const XMLReference &newRightNode, bool16 rightNodeIsNew)=0 |
| virtual void | PushMatchMade (bool16 matchMade=kFalse)=0 |
| virtual bool16 | PopMatchMade (void)=0 |
| virtual void | PushLevel (void)=0 |
| virtual void | PopLevel (void)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
interface to perform XML import match notification and record keeping
a match record denoting how an incoming XML node is matched to the existing node
| key | left tree (incoming XML) node |
| value | right tree (existing/importing into) node |
| pure virtual |
for use by ContentHandlers. Use this method to find the corresponding element in the
document for the incoming elements
| leftNode | incoming XML node |
| rightNode | [OUT] optionally receives the element in the document leftNode is matched to |
| rightNodeIsNew | [OUT] optionally receives whether the right element is a new element |
| pure virtual |
internal use only
temporary method to lookup whether a right node has a match applied to it already. Later when we have a way to determine this from the right tree iterator, this method should be removed
| rightNode | right tree node to lookup |
| leftNode | [OUT] optionally returns the element in the document that rightNode is matched to note that it could be nil |
| rightNodeIsNew | [OUT] optionally receives whether the right element is a new element |
| pure virtual |
if MatchMade() is kTrue, return the match that was made for this round
| pure virtual |
returns whether a match has been made during this round
| pure virtual |
internal use only
call this method at the end of each level of match making process. A level is defined as a parent/child level
| pure virtual |
internal use only call this method at the end of each round of match making process
| pure virtual |
internal use only
call this method at the beginning of each level of match making process. A level is defined as a parent/child level
| pure virtual |
internal use only
call this method at the beginning of each round of match making process. A round is defined as a single match
| matchMade | initial value of match made for the new round |
| pure virtual |
call this method to record a match
| leftNode | incoming node |
| rightNode | left node is matched to this node in the right/existing tree. If kInvalidXMLReference is used, it means a match was made, and leftNode was matched to nothing. This is different than no match made (in which case this function should not be called at all) |
| rightNodeIsNew | indicates whether the right node is a new element in the document. If the element is an existing element or one that was cloned/duplicated from an existing element, then the element/node is not new. If the element was created by, for example, a XMLCreateElementCmd, or it was cloned/duplicated from a new element, then the element is new |
| recordAsLastMatch | if kTrue (default), the given match will be recorded as the last match made. Until another RecordMatch is called on this level, all subsequent calls to GetLastMatch() will return this match. If kFalse, the given match will not be recorded as last match. The previous last match record will remain |
| pure virtual |
internal use only
replaces the a right tree node in the match recorder with a new one
| oldRightNode | right tree node to be replaced |
| newRightNode | the new right tree node |
| rightNodeIsNew | indicates whether the right node is a new element in the document. If the element is an existing element or one that was cloned/duplicated from an existing element, then the element/node is not new. If the element was created by, for example, a XMLCreateElementCmd, or it was cloned/duplicated from a new element, then the element is new NOTE: Passing kInvalidXMLReference for oldRightNode is not recommended because it could result in the wrong DOMNode getting replaced. Similarly, Passing kInvalidXMLReference for newRightNode is not recommended because it can result in incorect searches by FindMatchRight() |