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)
Syntax

public string GetCategoryEPTSchemaXML(
	ConnectionId connectionId,
	SessionId sessionId,
	XMLSchemaTypes schema,
	DocumentId editTemplateId
)

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).
schema
Type: ContentStudioXMLSchemaTypes
The type of schema to obtain.
editTemplateId
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.
Examples

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

<?xml version="1.0" encoding="utf-8"?>
<CSEPT>
  <CSRecord>
    <data1>Value 1</data1>
    <data2>Value 2</data2>
    <data3/>
  </CSRecord>
</CSEPT>
<xs:schema attributeFormDefault="unqualified" 
           elementFormDefault="qualified" 
           xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="CSEPT">
     <xs:complexType>
        <xs:sequence>
           <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" />
                </xs:choice>
             </xs:complexType>
           </xs:element>
        </xs:sequence>
     </xs:complexType>
  </xs:element>
</xs:schema>
Exceptions

ExceptionCondition
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.
Remarks

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

Reference