XSL Transformation of CSDL into HTML

The attached XSL script neatly renders an Entity Framework CSDL file into HTML.

 

Below is the NorthwindEF model that we’ve been using for our samples, rendered using that XSL script: 

 

Northwind

Entity Sets
Entity Types
Complex Types
Associations


Entity Sets

Northwind

Employees

Northwind.Employee

Territories

Northwind.Territory

Regions

Northwind.Region

Suppliers

Northwind.Supplier

Products

Northwind.Product

Categories

Northwind.Category

Customers

Northwind.Customer

Orders

Northwind.Order

OrderDetails

Northwind.OrderDetail


Entity Types

Order

OrderID

Int32

EmployeeID

Int32

OrderDate

DateTime

RequiredDate

DateTime

ShippedDate

DateTime

Freight

Decimal

ShipName

String

ShipAddress

String

ShipCity

String

ShipRegion

String

ShipPostalCode

String

ShipCountry

String

Customer

Northwind.CustomerOrders

OrderDetails

Northwind.Order_Details_Order

InternationalOrder

Northwind.Order

CustomsDescription

String

ExciseTax

Decimal

Employee

EmployeeID

Int32

LastName

String

FirstName

String

Title

String

TitleOfCourtesy

String

BirthDate

DateTime

HireDate

DateTime

Address

Northwind.CommonAddress

HomePhone

String

Extension

String

Photo

Binary

Notes

String

PhotoPath

String

Territories

Northwind.EmployeesTerritories

CurrentEmployee

Northwind.Employee

PreviousEmployee

Northwind.Employee

Product

ProductID

Int32

ProductName

String

QuantityPerUnit

String

UnitPrice

Decimal

UnitsInStock

Int16

UnitsOnOrder

Int16

ReorderLevel

Int16

Category

Northwind.Products_Category

OrderDetails

Northwind.Order_Details_Product

Supplier

Northwind.Products_Supplier

DiscontinuedProduct

Northwind.Product

DiscontinuedDate

DateTime

Customer

CustomerID

String

CompanyName

String

ContactName

String

ContactTitle

String

Address

Northwind.CommonAddress

Phone

String

Fax

String

Orders

Northwind.CustomerOrders

Category

CategoryID

Int32

CategoryName

String

Description

String

Picture

Binary

Products

Northwind.Products_Category

Supplier

SupplierID

Int32

CompanyName

String

ContactName

String

ContactTitle

String

Address

Northwind.CommonAddress

Phone

String

Fax

String

HomePage

String

Products

Northwind.Products_Supplier

OrderDetail

OrderID

Int32

ProductID

Int32

UnitPrice

Decimal

Quantity

Int16

Discount

Single

Order

Northwind.Order_Details_Order

Product

Northwind.Order_Details_Product

Territory

TerritoryID

Int32

TerritoryDescription

String

Region

RegionID

Int32

RegionDescription

String


Complex Types

CommonAddress

Address

String

City

String

Region

String

PostalCode

String

Country

String


Associations

CustomerOrders

Customer

Northwind.Customer

0..1

Orders

Northwind.Order

*

Products_Category

Category

Northwind.Category

0..1

Products

Northwind.Product

*

Products_Supplier

Supplier

Northwind.Supplier

0..1

Products

Northwind.Product

*

Order_Details_Product

Product

Northwind.Product

1

OrderDetails

Northwind.OrderDetail

*

Order_Details_Order

Order

Northwind.Order

1

OrderDetails

Northwind.OrderDetail

*

EmployeesTerritories

Employees

Northwind.Employee

*

Territories

Northwind.Territory

*

TerritoriesRegion

Region

Northwind.Region

1

Territories

Northwind.Territory

*

 

 

csdl.xsl