Arbortext Command Language > Functions by Alphabetical Listing > dcf_validate
  
dcf_validate
dcf_validate ([doc])
This function reads the document type configuration file (.dcf) for the document type associated with doc, and checks that its contents are valid. It does not do a context check.
If doc is a .dcf file, then doc is verified. Otherwise, the .dcf file for the document type for doc is used. If doc is omitted or 0, the current document is used.
This function returns:
Value
Description
-1
Couldn't load the corresponding document type (needed to verify element and attribute names).
0
Detected errors or warnings, which are displayed in a message window.
1
Didn't detect any errors or warnings.
* 
Arbortext Editor only detects errors, not warnings, when a .dcf file is loaded.
Following is a list of errors that the dcf_validate function detects:
Graphic definition missing both entity and file name attributes.
Graphic definition with scaleToFit attribute set, but with either reproDepth or reproWidth missing.
Link definition missing both uri and idref attributes.
Target definition missing id attribute on an element without an attribute named "id".
ElementDisplay entry contains pair="end" for a singleton entry.
Icon entry contains invalid character set or character number.
Following is a list of warnings that the dcf_validate function detects:
Element name is not found in the target DTD.
Attribute name is not found on element in the target DTD.
* 
This means that Arbortext Editor only verifies the attribute when it is paired with an element attribute. The attribute values in the AttributeOption element are not checked because they apply globally to the document type.
Element name is duplicated in a InsertAroundToFix list.
Element name is duplicated in an element's Substitutions list.
Element name is duplicated in a Smart Insert Category list.
Substitution list or InsertAuto contents for an element is empty.
InsertAutoWithin section contains multiple InsertAutoCaret or InsertAutoSelection elements.
InsertAutoWithin section for a singleton element contains an InsertAutoSelection element.
ElementDisplay entry refers to an icon that is not declared.
Smart Insert list for a category is empty.
Allowed value is duplicated in a profile class.
Profile class has an empty allowed value.
InsertAuto content found for a table element (except when in a cell or caption).
* 
InsertAuto content is inserted unless markup is inserted by the Table Editor.
InsertAutoCaret or InsertAutoSelection found in InsertAuto contents for a table cell element.
* 
InsertAutoCaret or InsertAutoSelection are ignored when a cell is added to a table using the Table Editor.
Related Topics
Document type configuration files
Editing and validating .dcf files
doc_type_dcf_file function