DocTypeManagerGetForObject Method (ConnectionId, SessionId, String, Int32, String) Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Returns the doctype in use by a either a document a category, unit or the site root.

Namespace: ContentStudio.Document
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public string GetForObject(
	ConnectionId connectionId,
	SessionId sessionId,
	string xmlParameterData,
	out int status,
	out string statusText
)

Parameters

connectionId
Type: ContentStudioConnectionId
A value that identifies the web site
sessionId
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).
xmlParameterData
Type: SystemString
XML that contains the parameters that this call uses. This XML is according to the Content Studio parameters XML schema
status
Type: SystemInt32
An integer indicating result of the call. Zero is success.
statusText
Type: SystemString
The textual representation of the call result.

Return Value

Type: String
Xml
Examples

<root>
   <status>0 </status>
   <statustext>Success</statustext>
   <data>
      <doctype id="integer value" 
               inherited="bit value" 
               inheritedfrom="string value" 
               name="string value" 
               declaration="string value" />
   </data>
 </root>
Element/attributeTypeDescription
/root/statusinteger valueindicates the outcome of the call, always 0 (meaning success)
/root/statustextstring valuethe textual representation of the outcome, always Success
/root/data/doctypeRoot element for the returned document type declaration
/root/data/doctype@idintegerthe id of the document type declaration
/root/data/doctype@inheritedbit (0 / 1)Indicates whether the document type declaration has been inherited from a parent object.
/root/data/doctype@inheritedfromstringWhen inherited; the name of the object that defines the doctype; otherwise, empty
/root/data/doctype@namestringthe name of the doc type e.g. XHTML 1.0 Transitional
/root/data/doctype@declarationstringThe actual document type declaration in use, e.g. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Remarks

When the object is a document, the returned value is the doctype used by this document. For containers (categories, units and the site root) the returned value represents the doctype that containing documents will have.
Remarks

This is the backwards compatible implementation of this method. This implementation does not throw any exceptions, instead callers must examine the outcome of the call in the Status and StatusText output parameters.
See Also

Reference