CHAPTER 3 VALIDATION Namespaces You now know
CHAPTER 3 VALIDATION Namespaces You now know how to combine schemas into a single schema. One thing I haven t addressed, however, is what happens if the same globally named definition or declaration appears in multiple schemas. During the development of XML Schemas, this limitation in DTDs was addressed by namespaces. XML Schemas support namespaces that can get around this problem. This section will show how to use namespaces in schemas and will introduce some new attributes in the process. Listing 3-32 shows the schemas for the course data. If you were in charge of managing the course data and its schema, you may want to ensure that your schema, if combined into another schema, remains intact and that your declarations and definitions never conflict with other schemas. Listing 3-35 is a modified version of the course schema in that it introduces namespaces into the schema. The local complex type definition for the course element has also been broken out and defined as a named type in the global scope. Listing 3-35. Namespaced Course Schema course.xsd
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Cheap Web Hosting services