DocId is a sequential, unique ID which is global, essentiall the PK for the document table.
RefID is a sequential and unique ID for each document type or template.
Typically these would be used instead of an identity column for parent data but then repeating child tables would use an identity column.
Using the DBXL ID accomplishes the same need but also provides a link to the actual document as well.
Hope that helps.