I am creating Schema using Core Service in SDL Tridion 2011 SP1. In the creation of the Schema I have used the custom namespace URI for the Schema. Generally when we create a Schema through Tridion CME directly, we will get a namespace URI generated automatically starting with uuid:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
I have used this code to create a Schema:
Tridion.ContentManager.CoreService.Client.SchemaData schemas = new SchemaData
{
Title = "coreservicesschema3",
Description = "coreservicesschema",
Id = "tcm:0-0-0",
LocationInfo = new LocationInfo
{
OrganizationalItem =
new LinkToOrganizationalItemData { IdRef = "tcm:7-18-2" }
},
RootElementName = "Content",
NamespaceUri = "customnamespaceuri",
Xsd = xsd.ToString(SaveOptions.None)
};
schemas = (SchemaData)client.Create(schemas, new ReadOptions());
Response.Write("<BR>" +"new schema id"+ schemas.Id);
Response.Write("<BR>" + "new schema Name" + schemas.Title);
//schema created
Can anyone indicate how to create a Schema with default namespace URI?
Thank you