Cheap Web Hosting for Developers

PHP, MySQL, Java, Unix Cheap Web Hosting

CHAPTER 3 VALIDATION An element extendedNote has

Filed under: PHP and XML — webmaster @ 13:35

CHAPTER 3 VALIDATION An element extendedNote has been declared with a complex type that is extending the meetingNote definition. It is required to set the mixed attribute on the xsd:complexContent element; otherwise, it would default to false and override the setting from the meetingNote definition. The xsd:extension element is where the extension begins. As with user-derived types, the base attribute sets the base type you are using. All you want to do is add an element to the definition, which is handled the same way elements are declared as children. You use the normal xsd:sequence followed by the element declaration. Because this is an extension, this new type, which again is anonymous and being defined within the scope of the extendedNote declaration, inherits the definition of the meetingNote. The new element meetingLocation is added to the end of the sequence group. Based on this definition, you could write an extendedNoteas follows: A meeting is scheduled on 2005-06-03 at 15:00:00 in the Green Room. The enabled attribute was explicitly set just to illustrate that all the previous declarations set for meetingNote still apply to the complex data type set within extendedNote. If the value for the attribute were set to anything other than a Boolean value, validation would fail. Notations Notation elements within schemas are the same as notation declarations within a DTD. They are helpers to indicate how data should be processed. Their declarations are also similar to those in a DTD. Take a look at the following as a comparison: Using one of the notation declarations for an XML Schema, you could declare an element with the attribute imagetype, which is a notation type but limited to gif or jpeg:

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost PHP MySQL Web Hosting services

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Sorry, the comment form is closed at this time.

Powered by Cheap Web Hosting