<!-- Copyright 2002 HiSoftware, Inc.  All Rights Reserved. -->
<!-- XML Custom Checkpoint Definition (XCCD) -->
<!ELEMENT XCCD (CheckpointName,CheckpointURL,CheckpointDesc,
                ((CPTrueResult,CPFalseResult,FindTextCheckpoint)|
                 (CPTrueResult,CPFalseResult,CondFindTextCheckpoint)|
                 (CPTrueResult,CPFalseResult,ValidElementCheckpoint)|
                  VisualCheckpoint))>
<!ATTLIST XCCD ccdID CDATA #REQUIRED>

<!-- The Checkpoint Name -->
<!ELEMENT CheckpointName (#PCDATA)>

<!-- The Checkpoint URL -->
<!ELEMENT CheckpointURL (#PCDATA)>

<!-- The Checkpoint Description -->
<!ELEMENT CheckpointDesc (#PCDATA)>

<!-- The Checkpoint Result when the conditions evaluate to true
     The element content is the text to display before the detail
     in the report
-->
<!ELEMENT CPTrueResult (#PCDATA)>
<!ATTLIST CPTrueResult
          cpTrueVal (Pass|Fail|Warn|Visual) #REQUIRED>

<!-- The Checkpoint Result when the conditions evaluate to False
     The element content is the text to display before the detail
     in the report
-->
<!ELEMENT CPFalseResult (#PCDATA)>
<!ATTLIST CPFalseResult
          cpFalseVal (Pass|Fail|Warn|Visual) #REQUIRED>

<!-- The Find Text Checkpoint Type
     The element content is the text to search for in the document.
     The ftcpTrueIf attribute designates that the condition
     evaluates to true if the text is Found or Not Found
     The ftcpListLoc attribute specifies if the location of the
     text should be listed if found
     The ftcpIncCmtNScr attribute specifies if the search should 
     include Comments and Scripting 
-->
<!ELEMENT FindTextCheckpoint (#PCDATA)>
<!ATTLIST FindTextCheckpoint
          ftcpTrueIf (Found|NotFound) #REQUIRED
          ftcpListLoc (Yes|No) #REQUIRED
          ftcpIncCmtNScr (Yes|No) #REQUIRED>


<!-- The Conditional Find Text Checkpoint Type -->
<!ELEMENT CondFindTextCheckpoint (PrimaryCond,SecondaryCond)>
<!-- The Primary Condition of the Conditional Find Text Checkpoint Type
     The element content is the text to search for in the document.
     The pcTrueIf attribute designates that the condition
     evaluates to true if the text is Found or Not Found
     The pcListLoc attribute specifies if the location of the
     text should be listed if found
     The pcIncCmtNScr attribute specifies if the search should 
     include Comments and Scripting 
-->
<!ELEMENT PrimaryCond (#PCDATA)>
<!ATTLIST PrimaryCond
          pcTrueIf (Found|NotFound) #REQUIRED
          pcListLoc (Yes|No) #REQUIRED
          pcIncCmtNScr (Yes|No) #REQUIRED>

<!-- The Secondary Condition of the Conditional Find Text Checkpoint Type
     The element content is the text to search for in the document.
     The scTrueIf attribute designates that the condition
     evaluates to true if the text is Found or Not Found
     The scListLoc attribute specifies if the location of the
     text should be listed if found
     The scIncCmtNScr attribute specifies if the search should 
     include Comments and Scripting 
-->
<!ELEMENT SecondaryCond (#PCDATA)>
<!ATTLIST SecondaryCond
          scTrueIf (Found|NotFound) #REQUIRED
          scListLoc (Yes|No) #REQUIRED
          scIncCmtNScr (Yes|No) #REQUIRED>

<!-- The Element Validation Checkpoint Type -->
<!ELEMENT ValidElementCheckpoint (ListElemLoc?,AttrCond?,
                                  ElemContentCond?,ChildElemCond?)>

<!-- The ValidElementCheckpoint attributes
     vecElemName - name of the element
     vecElemNameCS - is name comparison case sensitive
     vecResNA - Should the result be set to NotApplicable when no elements
              are found
     vecVLevel - how many elements are required to be "valid"
     vecValidWhen - elements are considered "valid" either when all
                    conditions are met (True) or when all conditions
                    are not met (False)
 -->
<!ATTLIST ValidElementCheckpoint
          vecElemName CDATA #REQUIRED
          vecElemNameCS (Yes|No) #REQUIRED
          vecResNA (Yes|No) #REQUIRED
          vecVLevel (All|One|None|First) #REQUIRED
          vecValidWhen (True|False) #REQUIRED>


<!-- The ListElemLoc element, if present, indicates that the locations of the
     tested elements should be listed as the detail of the checkpoint
     The attributes designate what and how they should be listed
          vecListLocType - list locations of valid or invalid elements
          vecListLocAs - type of listing they should be
 -->
<!ELEMENT ListElemLoc EMPTY>
<!ATTLIST ListElemLoc
          vecListLocType (Valid|Invalid) #REQUIRED
          vecListLocAs (Failure|Warning|Note) #REQUIRED>

<!-- The AttrCond element, if present, tests the element for a named attribute
          acAttrName - the name of the attribute
          acAttrNameCS - is the name comparison case sensitive
          acNullValAllow - is the attribute allowed to have a null value 
 -->
<!ELEMENT AttrCond (AttrValLength?,AttrValCompare?)>
<!ATTLIST AttrCond
          acAttrName CDATA #REQUIRED
          acAttrNameCS (Yes|No) #REQUIRED
          acNullValAllow (Yes|No) #REQUIRED>

<!-- The AttrValLength element, if present, tests the value of the named 
     attribute for a defined length
          avlNumCompType - length value comparison type
          avlNumChars - the number of characters to compare to 
                        if this is not a positive integer then 0 is assumed
 -->
<!ELEMENT AttrValLength EMPTY>
<!ATTLIST AttrValLength
          avlNumCompType (GreaterThan|LessThan|Equals|DoesNotEqual) #REQUIRED
          avlNumChars CDATA #REQUIRED>


<!-- The AttrValCompare element, if present, tests the value of the named 
     attribute for defined text which is defined in the element content
          avCompType - comparison type
          avCompCS - is comparison case sensitive
 -->
<!ELEMENT AttrValCompare (#PCDATA)>
<!ATTLIST AttrValCompare
          avCompType (MustContain|MustEqual|MustNotContain|MustNotEqual) #REQUIRED
          avCompCS (Yes|No) #REQUIRED>

<!-- The ElemContentCond element, if present, tests the element content
          eccECReq - is element content required
 -->
<!ELEMENT ElemContentCond (ElemContentCompare?)>
<!ATTLIST ElemContentCond
          eccECReq (Yes|No) #REQUIRED>

<!-- The ElemContentCompare element, if present, tests the element content value for defined text which is defined in the element content
          ecCompType - comparison type
          ecCompCS - is comparison case sensitive
 -->
<!ELEMENT ElemContentCompare (#PCDATA)>
<!ATTLIST ElemContentCompare
          ecCompType (MustContain|MustEqual|MustNotContain|MustNotEqual) #REQUIRED
          ecCompCS (Yes|No) #REQUIRED>

<!-- The ChildElemCond element, if present, tests the element for a child element
          cecElemName - name of the child element
          cecElemNameCS - is name comparison case sensitive
          cecTrueIf - condition is true if either Found or NotFound  
 -->
<!ELEMENT ChildElemCond EMPTY>
<!ATTLIST ChildElemCond
          cecElemName CDATA #REQUIRED
          cecElemNameCS (Yes|No) #REQUIRED
          cecTrueIf (Found|NotFound) #REQUIRED>


<!-- The Visual Checkpoint Type 
     No attributes
-->
<!ELEMENT VisualCheckpoint EMPTY>

