CHAPTER 3 VALIDATION used and has been declared in the schema, then it must be valid according to its declaration. If the attribute has not been declared, then you just allow it and continue. Empty elements are not as easily defined as the anyTypeones. There is no built-in data type, so you must create one: This declaration is extremely restrictive. Absolutely no content or attributes are allowed. You can expand upon this to allow some attributes and use a little more formal syntax in the process: This declaration is a bit more formal. You should notice the xsd:complexContent element as well as its restrictions. I wanted to throw this out there because I will be covering complex, or mixed, content next. You could just as easily have written this as follows: Mixed Content You may run into cases where you need to allow mixed content within an element. For example: A meeting is scheduled on 2005-06-03 at 15:00:00. The note element contains a mixture of text and child elements. Listing 3-29 illustrates a possible definition for this. Listing 3-29. Using Mixed Content
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Cheap Web Hosting services
No comments yet.
Sorry, the comment form is closed at this time.