Dare Obasanjo
Microsoft Corporation
January 2003
Suitable for: W3C XML architecture
Abstract: To review the guidance articles of Kohsuke Kawaguchi to use the W3C XML architecture, the various guidelines he initially proposed, and the same or different views have been made for each major point of view, or some views have been described. What should I do when using the W3C XML architecture and should not do other guidelines. (This article contains some links to English sites.)
table of Contents
Introduction Guidelines
Why should be used to declare why the global and local attribute declaration should be used to understand why the XML namespace's impact on the W3C XML architecture should always set ElementFormDefault to "Qualified" why should the properties group should use the model group? Use the built-in simple type why should the complicated type should not use the representation declaration why should the replacement group should use the replacement group to use the key / keyref / unique instead of using the ID / IDREF to identify the constraint why should you carefully use a variable architecture? Use defaults and fixed values, especially for XS: QName types why you should use simple type limits and extended why should complicate types of expansions should carefully use complex type limits why should be cautious with abstract types should be used to improve Demand does not use group and type to redefine summary
Introduction
In the past year, many new and old architecture authors have been arguing in various aspects of the W3C XML architectural language. Since the W3C XML architecture suggestion (first part and the second part) content, it is better to understand and use the part of the W3C XML architecture to understand and try to understand all the details of the language, and use the part of the language. Effect.
Some documents have tried to define the effective subsets of the W3C XML architecture from the perspective of general use. The most influential is the W3C XML Schema Made Simple and the recognized standard committee (ASC) X12 proposed by Kohsuke Kawaguchi X12 Reference Model for XML. DESIGN. However, these two articles are extremely conservative, they all recommend not to use the powerful features of the W3C XML architectural language, and no sufficient discussion on the cost payable by these features.
Guidelines
Here is some guidelines that Kohsuke initial proposed, as well as some supplementary recommendations:
Elements should be used, attribute groups, model groups, and simple types. You should use XML namespace as much as possible to learn about the correct way to use them. Don't try to be a master of an XML architecture. This may take a few months. It should be (not recommended in Kohsuke initial guidelines) Use complex types and attribute statements. Do not use a representation. It should be (not recommended in Kohsuke initial guidelines) Use a local statement. Should be cautious (not recommended in Kohsuke initial guidelines). Should be cautious (not recommended in Kohsuke initial guidelines) Use the architecture without TargetNameSpace properties (ie, a variable architecture).
In the supplementary guidelines, there should not be some different opinions on the recommendations, attribute declarations, and local declarations, and elaborate with two guidelines using variable architecture and replacement groups, their advantages and disadvantages are explained.
Finally, in addition to supplementing Kohsuke's initial guidelines, the following recommendations are also proposed:
You should use key / keyref / unique instead of using ID / IDREF to identify constraints. Do not use defaults or fixed values, especially for the type of XS: QNAME. Do not use types or group heavy definitions. Simple type limits and extensions should be used. Complicated types of expansion should be used. Complex type limits should be used with caution. Abstract types should be used with caution. The ElementFormDefault should be set to Qualified and set AttributeFormDefault to UNQUALIFIED. You should use wildcard to increase scalability. If you are an initiator, unless the problem to be resolved must use the guidelines marked with "cautious" words, it is best to avoid using these guidelines. The reasonableness of the above recommendations is explained below.
Why should you use global and local elements to declare
Element declaration is used to specify the structure, type, expression form and value constraints of elements. Element declaration is the most important and most commonly used structural block in architectural documentation.
As the xs: Schema element, the elements, the elements, are considered "global elements". The global elements can be reused, which can be referenced by other parts of the same architecture or by other architectural documents. Another important feature of global elements is: they can be members of the replacement group. Since the W3C XML architecture is recommended not to provide a mechanism for specifying the root elements of the authenticated document, any global elements can be used as the root element of the valid document.
The element declarations that have not been cited in complex types or model group definitions in the model group definition are considered "local declaration". Unlike global elements, as long as they are not declare in the same stage, there are multiple names that are the same but different types of local elements in one architecture. The following example of the W3C XML Schema Primer is given:
You can only declare a global element named "Title", and this element is limited to one type (for example, XS: String or Persontitle). However, a local element named "Title" can be declared, which is a string and is a child element of "BOOK". In the same architecture (target namespace), it is also possible to declare that another element called "title", which has a "MR MRS MS" enumeration value.
When you need to use certain elements from the target architecture or from other architectural documents, if the elements and their related types can be bound together for widespread use, these elements should be declared as global elements. For those contexts that are only in the context of the declaration type, the declaration is not required to be partial elements.
By default, the namespace name of the global element is the same as the schema's target namespace name, and the local element does not have a namespace name. This means that by default, when verifying the elements in the XML document, these elements should have the same namespace name as the target namespace of the global element architecture, while verifying according to local elements, There should be no namespace name. The following example illustrates this.
Test.xsd
XML Version = "1.0" encoding = "UTF-8"?>
Targetnamespace = "http://www.example.com" XMLns = "http://www.example.com">
xs: sequence> xs: complexType> xs: sequence> xs: complexType> xs: schema> Test.xml XML Version = "1.0"?> EX: root> TEST2.XML XML Version = "1.0"?> EX: root2> Why should you use a global and local attribute statement Attribute declares for specifying the type, optionality, and default information of the property. As the sub-elements of the XS: SCHEMA element, the attribute statement appears to be "global properties". The global attribute can be reused, which can be referenced by other parts of the same architecture or by other architectural documents. The attribute declaration that appears in a complex type definition that is not cited global attribute is considered "local properties". For types that need to be reused from the target architecture and other architectural documents, a global property declaration should be used. For those contexts that are only in the context of the declaration, they are not required to be partial properties, which is more appropriate. Since attributes are typically closely coupled to their parent elements, architectures generally tend to use local attribute statements. However, in some occasions, global properties for a large number of elements in multiple namespaces are very useful, such as XSI: Type and XSI: SchemAlocation. Note: By default, the namespace name of the global property is the same as the target namespace name of the architecture, and the local attribute does not have a namespace name. This means that by default, when verifying the properties in the XML document, these properties should have the same namespace name as the target namespace of the global attribute architecture, and when verify according to local properties, There should be no namespace name. The following example illustrates this. Test.xsd XML Version = "1.0" encoding = "UTF-8"?> Targetnamespace = "http://www.example.com" XMLns = "http://www.example.com">
Language properties ->
Language properties -> xs: sequence> xs: complexType> xs: sequence> xs: complexType> xs: schema> Test.xml XML Version = "1.0"?> EX: root> TEST2.XML XML Version = "1.0"?> EX: root2> Why should I understand the impact of XML namespace on the W3C XML architecture Support for XML namespace has been tightly integrated into the W3C XML architecture suggestion. Many occasions need to use namespaces, for example: This reason is based on the element and attributes of the declaration of the declaration in the architecture and include other architectural documents when the gestational element, attributes, or types are determined, and including other architectural documents, which is recommended to be familiar with the namespace and W3C. The special impact of the XML architecture. MSDN article XML namespaces and how the Affect XPath and XSLT details Details of XML namespaces, and article Working With Namespaces in XML Schema explains the main impact of named space to the W3C XML architecture. Why should ElementFormDefault set to "Qualified" In the previous section, it has been mentioned that the global statement is used to verify an element or attribute with a named space name, and the local declaration is used to verify an element or attribute that does not have a namespace name. The term used to describe elements or attributes with namespace names is "Namespace Limitation". Default mode may be replaced based on whether the local statement verifies the element or attribute defined by the namespace. The XS: Schema element has the ElementFormDefault and AttributeForMDefault properties, which are used to specify whether local declarations in the architecture should verify the element or attributes defined by the namespace. The valid values of these two attributes are Qualified and UNQualified, and the default is unqualified. Similarly, the formal element and attribute declaration of the formation can be used to replace the ElementFormDefault and AttributeFormDefault attribute values specified on the XS: Schema element. This makes it more accurately to verify the elements and properties in the unique document depending on the global statement or according to the local declaration. The following example is taken from the "Why You Should Avoid Local Declarations" section in the Kohsuke article, and it analyzes the huge impact of these attributes on the verification results. Architecture: Targetnamespace = "http://example.com"> Verify the following documents: ... architectures usually do not want to do this, but inadvertently introduced. Change the architecture to: Targetnamespace = "http://example.com" ElementFormDefault = "Qualified"> ... Allow it to verify the following documentation: -or- Let the AttributeFormDefault property take default unqualified as appropriate, because most architectures do not want to make naming all attributes by adding prefixes to explicitly define all properties. Why should I use attribute groups? Attribute group definition is a method of creating a naming collection consisting of attribute declarations and attribute wildcards. Attribute groups help the architecture modularity, allowing you to declare a commonly used properties, then reference from one or more architectures. Note: In the article, the property group mentioned in the Koshui's article can replace global properties, which may cause both readers to exclude erroneous impressions. The properties of the global statement are independent and can be reused. The attribute group is a set of modular properties, and the attribute declaration in the property group can be a local statement or a reference to the global declaration. Therefore, the property group described in Koshui's article is not very accurate to replace the global attribute declaration. Why should I use a model group? Model group definition is a mechanism for creating naming element groups using all, options or sequential composite methods. The model group is suitable for applications that need to avoid complex types (especially type derived) and need to reuse certain elements. However, model groups cannot replace complex types because they cannot contain attribute declarations, and they cannot specify the type of element declaration. In addition, the derived function of the model group has many restrictions compared to complex type derivatives. Why should you use a built-in simple type? The W3C XML architecture is superior to DTD in XML 1.0, mainly in its data type. In the W3C XML architecture, the element value or attribute value can be specified as a string, date, or numerical data, which makes the architectural authors to specify and verify the contents of XML data in interoperability and independent of the platform. Due to many built-in data types (approximately 44 species), if the architect author standardizes the subset of the built-in type to avoid information overload, this will be very wise. In most cases, users do not need to use subtypes of XS: String (such as XS: Entity or XS: Language), xs: integer (such as xs: short or xs: unsignedByte) subtype and Gregorian date type (such as XS: GMONTHDAY or XS: GYEARMONTH). Remove these types mentioned above, you can reduce the type of type to be tracked to an acceptable quantity. Why should you use a complex type Complex type defines a content model for specifying elements and attributes. Element declarations can specify their content model by reference to a naming or anonymous complex type. For named complex types, you can reference from the name or external architectural document, and anonymous complex type must be defined in the element declaration of the type of element. In addition, the content model of naming complex types can be expanded or restricted using the W3C XML architecture inheritance mechanism. Complex types are similar to model group definitions, but there are two main differences: Complex type definitions can include attributes in their defined content models, and can use type derived, and naming model groups cannot be used. In Kohsuke's article, he advocates combining anonymous complex type, model group definition, and attribute groups, instead of using a complex type to specify the content model of the element, trying to avoid processing "complexity" of naming complex types. However, some people have proposed objections that, when the content model of the designated element, three mechanisms are used more easily to use a mechanism. Therefore, naming complex types are the most intuitive way to specify the content model of the element content model in addition to allowance to reuse the content model. Anonymous complex type should only be used without the need to declare the external reference type and do not need the type of derivation. One thing is worth noting that new types cannot be derived from anonymous complex type. In general, a large number of architectures using anonymous types is likely to have problems in unity and consistency. Why should not use a representation statement Kohsuke has suggested avoiding the use of representations, which is completely correct. The present is only compatible with DTD backwards, but cannot be compatible with DTD representation. It is best to assume that they do not exist at all. Why should you use a replacement group with caution? The replacement group provides an XML element that provides a mechanism for sub-type polymorphisms in the programming language. Tagged one or more elements as an alternative global element (also known as head element), meaning that the member in the replacement group can be interchanged with the head elements in the content model. For example, for the Address replacement group containing members USAddress and UkadDress, you can use common element Address in the content model, or use USAddress or Ukaddress to replace it. The only requirement is that the type of replacement group must be the same, or the head element belongs to the same type hierarchy. An example architecture and its verification are given below: EXAMPLE.XSD: XMLns: XS = "http://www.w3.org/2001/xmlschema" Targetnamespace = "http://www.example.com" XMLns: EX = "http://www.example.com" ElementFormDefault = "Qualified"> xs: sequence> xs: complexType> xs: element> xs: schema> Example.xml: library> In the above example, the content model of the library element allows for one or more BOOK elements. Since the Magazine element is included in the Book replacement group, the Magazine element can appear in an instance XML that requires the BOOK element. The replacement group makes the content model more flexible, and its scalability is larger than the imagination of architecture author. Flexibility is a double-edged sword, although it provides better scalability, but processing this architecture will be more difficult. For example, in the above example, the code to handle the library element is not only to handle its BOOK sub-elements, but also processing the Magazine element. If the instance document also specifies more architectures through the XSI: SchemAlocation property, the application must process more Book replacement group members as the child elements of library elements. More complex is that the members in the replacement group can be derived from the replacement group. By writing code to properly handle the derived type, this is usually more difficult, especially when there are two relative derived methods: Restriction, the range or value of the content model; EXTENSION, add an element or attribute to the content model. By using certain properties in an element declaration, architectures can better control the elements in the instance document, and reduce the possibility of accidental replacement in the XML instance document. The block attribute can be used to specify whether the element (its type uses some derived method) can replace the elements in the instance document, and the final property can be used to specify whether the element (its type uses some derived method) can declare its own declaration as a target element replacement group a part of. The default values of all the blocks declared in the architecture declaration can be specified by the BlockDefault and FinalDefault properties of the root XS: schema element. By default, all replacements are allowed, without any restrictions. Why should Key / KeyRef / Unique instead of using ID / IDREF to identify constraints The DTD provides a mechanism that specifies some attribute as a type ID (ie, the attribute value is unique), which corresponds to the name generating mechanism in XML 1.0. The ID in XML 1.0 can also be referenced by attributes of type IDREF or IDREFS. In order to compatibility with DTD, the W3C XML architecture provides XS: ID, XS: IDREF and XS: iDRefs type. W3C XML architective syndrome can be used to specify unique values, primary keys, and references to primary keys by using XPath expressions defined within the range of elements declare. From a functional perspective, the logo constraint mechanism is more than the ID / IDREF mechanism. First, it is not limited to the value or type that can be used as an identifier constraint, and the ID can only be one of the predetermined values (eg, 7 is not a valid ID). Another important aspect of the architecture logo is superior to ID / IDRef is that in the document, the latter must be unique, and the former does not limit this limit. In other words, the symbolic space of the unique ID is the entire document, and the only primary key symbolic is the target range of XPath. If two different ranges of the same XML document have overlapping value space, and these values require unique, this feature of the primary key will be very useful. The XML document containing a hotel's room number and table number is an example. It is very likely that the number overlaps (for example, the 18th room and 18 table), but they should not overlap in their own value space. Note: The ID type series of the W3C XML architecture is not fully compatible with the DTD ID type. First of all, XS: ID, XS: idRef and XS: IDREFS Type can be used for elements in the W3C XML architecture, but can also be used for attributes, but can only be used in the DTD. Second, the types that can appear in the element The number of properties of the XS: ID is not limited, and the ID attribute in the DTD is limited. Why should the variable architecture should be used with caution The target namespace of the architecture document is used to identify the namespace name of the element and attribute that can be verified with the schema. Architecture without the target namespace typically only verifies elements and properties without named space names. However, if a schema without a target namespace is included in another schema with a target namespace, the architecture without the target namespace uses the target namespace containing its architecture as its own target namespace. This feature is often referred to as a variable architecture design pattern. In Kohsuke's article, he claims that the variable architecture program is not good, this statement is incorrect. Michael Leditschke refutes Kohsuke's views on the article about XML-dev, indicating that this design is feasible and points out that it is very useful for the type definition and declaration module that creates the need to reuse. There are some problems when using the variable architecture with the identity constraint. The problem is that in the variable architecture, the QNAME defines the type definition and declaration is enforced with the namespace containing the architecture, but XS: Key, XS: Keyref and XS: UNIQUE Identifies the XPath expression used by the constraint is not mandatory. The application contains the namespace of the architecture. Consider the following architecture: XMLns: XS = "http://www.w3.org/2001/xmlschema" ElementFormDefault = "Qualified"> xs: sequence> xs: complexType> xs: key> xs: keyref> xs: element> xs: extension> xs: simplecontent> xs: complexType> xs: schema> If the above architecture is included in another architecture with the target namespace, the XPath expressions in Key and Keyref failed. In this example, the Person element does not have namespaces in the variable architecture, but once it is included in other schema, it uses the target namespace containing its architecture. XPath expressions matching with Person without namespace do not work normally, do not mean that they can never work properly because the processor does not need to ensure that the PATH expression in the identity constraint must return the result. Therefore, it is recommended not to use the identity constraint in the variable architecture. Why should not use defaults or fixed values, especially for XS: QNAME types The main problem with the default and fixed values is that they can cause new data into the source XML after verification, thereby changing data. This means that if the architecture in a document uses unspecified defaults, this document is incomplete. Trying to verify the actual content of the XML document is unwise, because sometimes there is no architecture. Assuming that users of documents have always performed verification is also unwise. Due to the form of the form, the XS: QName type will also have some other questions. Consider the following architecture and XML instances: XMLns: XS = "http://www.w3.org/2001/xmlschema" Targetnamespace = "http://www.example.com" XMLns: EX = "http://www.example.com" XMLns: EX2 = "ftp://ftp.example.com" ElementFormDefault = "Qualified"> xs: sequence> xs: complexType> xs: element> xs: schema> XMLns: foo = "ftp://ftp.example.com"> Root> In the above example, what value should I insert into the Node element for verification? If the EX2 prefix is mapped to an instance document instead of a different namespace in the architecture, should it be ex2: ftpsite? If the "foo" prefix is mapped to EX2 to the same namespace in the architecture, should it be "foo: ftpsite"? So, if ftp://ftp.example.com has no corresponding XML namespace declaration, what will happen? Do you have to insert a namespace declaration to XML? If you don't violate some views on the correct operation, these issues are not satisfactory. It is best to avoid using the XS: QNAME default value, because in the above example, different implementations are unlikely in semantics. Why should you use simple type limits and expansions As mentioned earlier, there are two types of forms of formation: limits and expansions in the W3C XML architecture: limitation and expansion. Limiting simple types include all aspects of the constraint type, thereby reducing the allowable value of the type. This limitation includes the maximum length of the specified string value, specifies a list of date ranges or enumeration allowable values. Architecture authors usually use type constraints in this way, which occupy most of the W3C XML architecture. These types can be used in the type definition of elements and properties. Extending the simple type allows you to create complex types (ie, element content models) with simple contents with properties. A typical extension example is an element declaration to simply type as its own content, and have one or more attributes. Since this element content model is generally existed in the XML document, it is also a function commonly used by architectural authors through expansion. It is worth noting that, like complex types, simple types have naming and anonymous. For naming simple types, you can reference it from the name of the architecture or external architecture document, and anonymous simple type must be defined in the element declaration or attribute statement using this type. Similarly, like complex types, only named types can be executed. Common error concepts is that the same type of anonymous type is the same type: <- Pieces A -> xs: restriction> xs: simpletype> xs: element> xs: restriction> xs: simpletype> xs: element> Equivalent to: <- Pieces B -> xs: restriction> xs: simpletype> Fundamentally, it is considered that the two elements in the clip B declare the same type is wrong. Even if the two types have the same structure, they cannot be considered the same, unless they have named, the name is the same, and from the same target namespace. All aspects of the W3C XML architecture (such as replacement groups, specify key / keyref pairs, and type derived) may require elemental declarations with the same type. For example, KeyRef must be the same as the type of Key. However, most of the functionality of the W3C XML architecture requires elemental declarations in fragment a to have different types, while elements declare in fragment b have the same type. Why should complicated types of extensions Extending complex types include adding more attributes or elements to the content model of the derived type. Elements added are appended to the basic type of content model in order. For extracting a set of complex types of common features, then use these features by extending basic type definitions, this technology is very useful. The following architecture fragments are discussed and examples of complex type extensions in W3C XML Schema Primer, showing how to repeat the universal function of the email address by extension. xs: sequence> xs: complexType> xs: sequence> xs: extension> xs: complextence> xs: complexType> xs: extension> xs: complextence> xs: complexType> In the above architecture, the Address type defines the information common address, and its two derived types add special address information in the United States and the United Kingdom. The content model is a powerful and useful feature having a W3C XML architecture by extending and establishing a content model, which promotes the modular and consistency of similar content. Use the processor to handle a problem when derived by an extension. This issue is related to the type related processor and the elements added to the content model by extension. In the future, type-related languages (such as xQuery / or XLST 2.0) may be able to process XML elements and properties in a variety of forms. For example, an application can determine all elements of processing type Address or all an element that processes all types of common information in ADDRESS. However, for the following query: // * [. instance of address] / city If you use the following method to extend the derived type of the content model, it will return unexpected results: <- There are two CITY items in the address format, one for approaching the region, Another city for practical -> xs: sequence> xs: extension> xs: complextence> xs: complexType> Although the above example is specifically designed and it seems impossible, it explains the existing danger. For a detailed description of this potential problem, see Paul Prescod On XML-dev. Why should you use complex type limits with caution? Restrictions on complex types include creating a derived complex type (its content model is a subset of basic types). First give you some advice. The W3C XML architecture suggests that the derivation of the restriction complex type (Section 3.4.6 and Section 3.9.6) is generally considered to be the most complex part of the document, generally more difficult to understand. Most of the problems when implementing how to properly support this function, so when discussing the various details of the restriction complex type, you can often see the realization of the red ear. Another problem is that the derived derivation of the complex type cannot be well mapped to the concept of object-oriented programming or relational database theory, while object-oriented programming and relational database theory is the primary source and user of XML data. This is completely opposite to the extension of the expansion of the complex type. Another problem that is derived by limiting complex types is caused by the declaration limit: If a given complex type is derived by limiting another complex type, it must be copied and redefined with its content model. . The defined copy will replicate, which may have to pass a long derived chain, so any modifications for the initial type must be sent to the derived trees. Moreover, this copy cannot cross the namespace boundary - if NS2: SlowCar has child elements ns2: maxSpeed, may not be available from NS1: Car to derive NS2: SlowCar, because the child Elements of NS1: Car cannot be derived from NS2 from NS1: MAXSPEED : MaxSpeed. The following architecture limits a complex type by limiting the derived way, which describes one user of the XML-DEV mailing list as the type of Dare Obasanjo. Any elements that meet the DareobaSanjo type can also be verified as an instance of the XML-Deviant type. Maxoccurs = "1" /> xs: sequence> xs: complexType> xs: restriction> xs: complextence> xs: complexType> xs: schema> Derivation by limiting complex types is a multi-faceted function, which is very useful when the second type needs to meet the general-purpose main type, but add more constraints than the primary type than the main type. However, because it is too complicated, only those who fully understand the W3C XML schema function can be used. Why should you use an abstract type with caution? By borrowing an object-oriented programming language such as C # and Java, the element declaration and complex type definition can become abstract. Abstract elements declare refers to an element declaration that cannot be used to verify elements in the XML instance document, and can only appear in the content model by replacing. Similarly, abstract complex type definitions cannot be used to verify elements in the XML instance document, but can be used as an abstract parent element of element derived types, or use when using XSI: Type alternatives. Abstract complex types and elements declarations are useful for creating common basic types of common information that contains a set of types (such as Shape and Circle or Square). But only after applying other derived (extensions or restrictions), the definition is "complete". Although this feature is easy to use, there are some subtle and complex uses, so it should be cautious when using abstract types. You should use wildcard to improve scalability The W3C XML architecture provides wildcards xs: any and xs: annattribute, used to display elements and properties in the specified namespace in the content model. Using wildcards, architectures can expand the content model while maintaining control of elements and attributes. For the benefits of using wildcard, see the W3C XML architecture design mode: the discussion in handling changes. The cautious architecture author cares about the problem caused by type derived, which may use the factory attribute (as in SeaRed and Java in C #, then using the FINAL in the C #, then use wildcard to the content model. Some parts implement extension. In this way, architectures can better control the content model they define, thereby reducing the various problems that have emerged by complex type derivatives (especially issues caused by expanding derivation). It is worth noting that wildcards sometimes have uncertain problems, and if not improper use, it will conflict with the Unique Particle Attribution rules. The following architecture has appeared such problems because XML Version = "1.0" encoding = "UTF-8"?> Targetnamespace = "http://www.example.com/fruit/" ElementFormDefault = "Qualified"> xs: kice> xs: complexType> xs: schema> ... Mykitchen type content model can include one or more apple, cherry, or any other element. However, during the verification process, if you encounter a Choosing the NamePsAce property and the ProcessContents property have some subtle deeper details. Excessive limits may hinder scalability, while excessively open values may result in misuse of architectures. The namespaces that control wildcard support are also easy to make people, especially when the optional namespace set may change. Do not use groups or type redefinctures Refersions is a function of the W3C XML architecture that allows you to change the meaning of the included type or group definition. Architecture authors can use XS: Redefine, including types or group definitions in architectural documents, and then change these definitions in some way. The redifact will simultaneously affect the type or group definition in two architectures containing the relationship, so it has a relatively wide impact. Thus, all references to the original type or group in two architectures will reference the type of redefined, while the original definition is masked. This results in the W3C XML architecture design mode: the problem pointed out in handling changes: This will weaken performance to a certain extent, because the type of redirect can be combined with the derived type, resulting in conflicts. A common conflict is to add a similar naming or attribute to the content model when derived type of content model is added to the type of content model. The main problem with the type redifunity is that the type derived is different, and the type redefinition cannot be disabled using the block or final property. Therefore, all architectures can redefine their own type by general method to completely change their semantics. This feature is recommended for use of this feature since it may cause a conflict. Many architecture authors attempt to use the type redemption to increase the value of the enumerated type, but this method cannot be successful. Used as an enumerated type of the basic type can be accepted, the only way to add the value of the value is to create a Union. However, the added values can only be used to generate an app for the UION type, and cannot be used for the original basic type of application. In addition, it is necessary to note that chain redefine (redefined to redifacts) may have problems, resulting in unexpected definition conflicts. summary