From the course: XML Essential Training (2018)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Anatomy of a schema

Anatomy of a schema - XML Tutorial

From the course: XML Essential Training (2018)

Start my 1-month free trial

Anatomy of a schema

- [Narrator] Let's take a quick look at the structure of a Schema file. Schemas use the namespace at www.w3.org/2001/xmlschema. Usually Schema files use the xsd namespace prefix and, if you recall, back we talked about namespaces earlier in the course and we saw them in action when we went through the XSLT examples. A Schema definition typically begins with the xsd Schema tab and you can see I've got that here. And then inside the Schema tag, I would put in my element an attribute definitions. For example, this will define an element using the xsd element tag and you can see here in this example I've got an element that I'm declaring named ElemName and then I can put other content definitions inside my element that went along with the element. For example, I can put an xsd attribute tag in here and that would indicate that my element has an attribute named AttrName. Now this is a pretty simple example and things can get more complex than this depending on how much control and what…

Contents