EPTSchemaGetCategoryEPTSchemaXML Method (ConnectionId, SessionId, XMLSchemaTypes, DocumentId) 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.

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,
	DocumentId editTemplateId


Type: ContentStudioConnectionId
A value that 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: ContentStudio.DocumentDocumentId
The edit template to return schema for.

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
SqlExceptionAn error occurred when executing the command against the 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.
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.
See Also