EPTSchemaGetCategoryEPTSchemaXML Method (ConnectionId, SessionId, XMLSchemaTypes, Int32, Boolean) Content Studio 5.7 SDK
Content Studio Web Content Management System

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

Returns the Xml schema used by an edit template from an Ept document or category.

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

public string GetCategoryEPTSchemaXML(
	ConnectionId connectionId,
	SessionId sessionId,
	XMLSchemaTypes schema,
	int objectId,
	bool isCategory


Type: ContentStudioConnectionId
A value that uniquely identifies the web site.
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).
Type: ContentStudioXMLSchemaTypes
The type of schema to obtain.
Type: SystemInt32

The object id. This value represents either a category or a document.

Type: SystemBoolean

A value that indicates whether objectId represents a category (true or a document (false).

Return Value

Type: String
A schema that describes the ept schema used by the ept documents. Depending on the value of the schema parameter the returned schema can be one either the Xdr-format or in the standard Xsd-schema format. Developers that validates ept-documents using the returned schema should use the Xsd-format rather than the deprecated Xdr format. Content Studio uses the Xdr format with legacy extensions internally to store validation rules and should for that reason not be used.

The following small ept-document generates the Xsd-schema below.

<?xml version="1.0" encoding="utf-8"?>
    <data1>Value 1</data1>
    <data2>Value 2</data2>
<xs:schema attributeFormDefault="unqualified" 
  <xs:element name="CSEPT">
           <xs:element name="CSRecord">
             <xs:complexType mixed="true">
                <xs:choice maxOccurs="unbounded">
                   <xs:element name="data1" type="xs:string" default="Value 1"/>
                   <xs:element name="data2" type="xs:string" default="Value 2"/>
                   <xs:element name="data3" type="xs:string" />

CSExceptionA business rule was violated in the underlying Content Studio database
InvalidOperationExceptionThere is no schema of the requested type for the edit template (id=NN). Please save and approve the edit template to synchronize the schema.
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

READ or BROWSE permission on the edit template is required.

Note Note
Although this method can return an Xdr schema, external callers using this schema are strongly encouraged to use the Xsd schema instead.

This method is the preferred method to use when reading an ept schema since it does not require the caller to first find the Editing template identifier.

This method was added in CS 5.2

When objectId represents a document this document must be either an Ept document or an Ept Editing template.

When objectId represents a category this category must be of the Ept document type.

All other document or category types generates a CSException of type 1106 - "Invalid object type"

See Also