|
Returns the document type of the called document.
std::string document::document_type();
None.
Returns a string which describes the type of document.
Use this operation to determine the document type of the called document object. The document type of a document will be the document type specified when creating the document object. In Xport, the document type is specified as a template argument for most of the defined class templates. Since Xport uses type aliases to allow users of the library to avoid using template nomenclature, the document type for a specific document object depends on the type alias which was used to create the document object. The document types associated for the different document type aliases can be viewed in Xport's Usage Overview.
Currently, there are three document types supplied with Xport, xhtml strict 1.0, xhtml transitional 1.0, and xhtml frameset 1.0. Additional document types can easily be added, in most cases without changing any existing code in Xport, since Xport was designed so that document types can be seamlessly added.
The string values returned for the three document types currently supplied in Xport are listed below.
document type | document_type() return value |
---|---|
xhtml_strict | xhtml strict 1.0 |
xhtml_traditional | xhtml traditional 1.0 |
xthtml frameset | xhtml frameset 1.0 |
Constant