Author: David Orchard This switched: http: //dev2dev.bea.com.cn/techdoc/other/200408223.html Introduction The purpose is to create a design based on XML language self-description tag. The inevitable evolution of these languages is called version management. Version management means adding, deleting or modifying some parts of the language. Make the version management can be used as one of the most difficult problems in the calculation. It has failed many times in a long time. One of the possible reasons for web rise and popularity because the evolution and version controls are built into HTML and HTTP headers, and both provide a clear extension point and rules for understanding the extension of its scattered extension and version management. XML Namespaces provides an ideal mechanism for various versions of the identification language, and all XML Schema languages (such as W3C XML Schema) specifies controlled scalability. This article describes a variety of techniques that achieve more effective loose coupling between systems, which improve the possibility of rearward compatibility and forward compatibility change when the relevant system evolves. These techniques are designed for compatible changes with or without SCHEMA propagation. Many rules are described by the version management of XML vocabulary, using XML Namespaces and XML Schema structures. It includes rules, especially SOAP, providing the language coexus of the expansion container model, especially SOAP. This rule set "must ignore" mode. Surprisingly, the "must ignore" model used for HTML markers and HTTP headers significantly promotes their adoption, but has not been widely used by XML. The goal of this article is to correct this situation for the current SCHEMA verification environment. The material will discuss the innovative unstrue SCHEMA verification environment. Define compatibility Foldoc [1] provides definitions for backward and forward compatibility. This article will repeat these definitions, and focus on the action of the message, especially the sender and the receiver, not the client and server. Backward compatibility means that a new version of the receiver can be launched without interrupting existing senders. This means that the sender can send the old version of the message to the recipient of the new version of the message, and the receiver can still handle the message. Forward compatibility means that the old version of the recipient can handle new messages without interruption. Of course, the old version will not implement any new behavior, but the sender can send a new version of the message and still handle it. In other words, backward compatibility means that the existing sender can use the updated service, and the forward compatibility means that the newer sender can continue to use existing services. Typically, it is typically related to the addition of optional elements and / or attributes. Cost related to the introduction of non-forward or backward compatible changes is often high, typical installs need to be updated to adapt to new versions. The rules described below are optimized for the case where the forward and backward compatibility changes are optimized. This article believes that this means that the name of the namespace name or changing element name is not changed. Compatibility is defined for the senders and recipients of a single message. However, most web service specifications provide an input and output definition. In these definitions of compatibility, a Web service that updates its output Schema is considered a new sender. When a compatibility definition is applied to the output message, it simply reverses the sender / receiver term for the input message. If a recipient updates the schema of the output message, it is "sending" a new version of the message, so it is considered to be a "sender". Identification and extended language typically, design scalability in language results in a loosely coupled system. The scalability allows the sender to change the instance without the need to authorize. In this way, the first rule related to the scalability is: 1. Allow scalability rules: language should be designed to have scalability. One basic requirement for extensibility is to determine the language of elements and properties. XML NameSpaces [14] provides a mechanism associated with the URI and XML elements or attribute names to specify the language of the name. This also prevents the name conflict. W3C XML Schema [15] provides a wildcard (("
The mechanism is used to control the positions allowed by elements from some namespaces. Wildcards indicate that the elements in the specified namespace are allowed in an instance document that exists in a wildcard. This takes into account the SCHEMA to expand in a strictly defined manner. The recipient of the extended document can identify the extensions they do not understand and securely ignore them according to the extended processing model. Use the Namespace property to control the extended elements from what namespaces. The main values of this attribute include: ## any, which means using elements from any possible namespace to extend Schema; ## Other, which only allows extended elements from namespaces other than the current namespace; #targetnamespace, which only allows extended elements from the current namespace.
Use the ProcessContents property to control how XML Parser verifies the extended element. The allowable methods include: "LAX", allowing verification, "strict", requires verification; "SKIP", skipping verification. This article uses "LAX" verification because it is the most flexible, and is a typical option for the web service specification. The main goal of the extended "Must Ignore" mode is to allow backward and forward compatibility of the document. In the least case, this means that neither modification does not add a namespace name, nor does it change the element name. Add element names in the target namespace. You can only use the ## annoy namespace or a combination of target namespaces for ## Other namespaces and vocabulary. Many examples illustrate the application of these rules. Imagine a next order from a machine to another machine. The processing of purchase orders will generate a "shipment" message. But this message is sent after receiving a single period of time. The sending software must wait for some time for a response (synchronization message), which is inconvenient. A better model is that the recipient can control the "Shipping" message by the recipient, do not need to wait. The recipient "callback" initial sender, thus derived "callback" in terms of terms. The sender provides an address to the recipient in the callback address. This means that the receiving direction sender sends an address that should be used by any subsequent messages. In a Web service, this Callback is typically sent as a SOAP header block. Our priority is to use an extensible style of ## any. The type of callback using this model is as follows:
Example 1 - SCHEMA using ## ANY Implementation Scheme However, W3C XML Schema's decision constraints (later will be more detailed) will prevent the model from work. When a follow-up version of the callback adds an optional element, the problem will appear. Timeout is a good example. The timeout of the callback is a rich information about the recipient. If the recipient does not understand the timeout, then they can continue to process. The following SCHEMA is about to use wildcards, but due to decision constraints, it is illegal:
Example 2 - A illegal Schema is unable to work, in order to achieve the initial goal, we need to create a substantially equivalent design mode. In order to allow new extensions in the same namespace, the author must create an extension type that allows extended extensions in the same namespace. The extension type should only be used for future compatibility expansion in the same namespace. We need two or more rules to allow an appropriate version of the XML language definition. The first is the rules of the namespace: 2. Any namespace rule: Extension should consider extensions in any namespace. For XML Schema applications, the extension point should be an element that considers the extension in the target namespace, considering the extension of the extension in any other namespace. Rules for allowing scalability: 3. Complete scalability rules: All XML elements should consider elemental scales after the element definition, and allow any properties. An example of a callback type that complyes these rules:
Example 3 - A callback type with scalability Because each extension in the target namespace is in the extended element, each subsequent target namespace will increase by another layer of nested. Although each extended nested layer is not desirable, it is available today to have a strict W3C XML Schema verification. If you can complete a variety of compatible modified versions for a language, you have multiple nested elements that it seems to be worth it. This technique allows an extension of the target namespace while maintaining the target namespace itself. In general, an extension can be defined by a new specification, which is a standard reference for previous specifications and then defines new elements. Making such an extension does not require the allowable allowance of the specification. In fact, the main design of XML namespace is to allow dispersion expansion. Inference is an extension in the same namespace, the license is required. There is an owner of the namespace to modify the non-owner of a meanings that may be harmful. Understand the expansion of the sender, it should be able to extend existing XML documents with new elements without the need to modify existing implementations. Extension is a step towards this goal, but reaching compatibility also requires a processing model for extended. The software should be clear when encountering an extension. This way, we introduce the next rule: 4. Provide processing model rules: Language should specify a processing model to use to process extensions. Making compatible modifications to possible simplest processing models are ignored. This rule is: 5. The rules must be ignored: the document recipient must ignore the XML properties and elements they cannot identify in the valid XML document. This rule does not require physical to delete elements, just ignoring them for processing purposes. There are many famous uses that "must ignore" rules. HTML 1.1, 2.0 and 3.2 Compliance must ignore the rules; they specify that any unknown start tag or end tag mapping is not in the segmentation process. HTTP 1.1 [6] Specifies that the receiver should ignore the header it does not understand: "The unrecognized header field should be ignored by the recipient, and must be forwarded by transparent agent." XML must ignore the rules in 1997 by the WebDAV Working Group first Introducing [19], in the WebDAV specification RFC 2518 [5] Section 14, it is submitted to the Flexible XML Processing Profile separately published [2]. There are two main vocabulary types related to processing extensions. These types are data-oriented and are demonstrations (or document) applications. For data-oriented applications, such as web services, rules are: 6. You must ignore rules: II must ignore the rules to be applied to the unrecognized elements and their descendants. For example, if a message with an unrecognized element in the SOAP header block is received, they must be ignored unless it is marked as "MustUnderstand", it is expected to write unrecognized elements to the log file. It is reasonable. A document-oriented vocabulary may require a different rule because the application usually needs to represent the content of unknown elements. Rules for documentation-oriented applications are: 7. Vegetable rules must be ignored: Ignore the rules only applies only to elements that cannot be identified. It reserves the descendant elements of the elements, such as elements for displaying purposes. One language may provide a different model for processing extensions, rather than ignoring components that cannot be identified. A model is that if the recipient finds an unaccompuliable component, it will generate a fault. For example, the recipient must understand any security specification. This requires a significant disadvantage: it does not allow compatibility modifications in the language; modifications cannot be ignored. Another model is an alternate model that will be provided if the receiving party understands the expansion. XSLT 2.0 provides such a model.
Version management When a new version of language is required, and it is compatible with the old language, then the author must decide the namespace name for the name in the new language. There are two options: Create a new namespace or reuse the existing namespace name. We believe that reuse is more effective, we will explore the issue of option # 1 in the "New Name Space" section. Reuse Namespace Rules: 8. Reuse Name Space Name Rules: If the specification is backward compatible, the old namespace name should be used with the XML scalability model. An important conclusion is that the new namespace name is only needed when it is not compatible. 9. New Name Space Interrupt Rules: Use a new namespace name when it is not allowed to be compatible, if the software does not understand the new language component, it must be interrupted. In two ways: add a desired information item; or change a semantics of an existing information item. Reuse namespace rules require compliance with the previous "must ignore" and "any namespace" rules. If these rules are not complied, the language designer will be prevented by compatibility and reuse the namespace. We have emphasized that the namespace name is good for compatible extension reuse namespace. The opposite is that namespace owners can provide extended points that allow other namespaces (
) To use new namespaces for compatibility changes. This technology has a problem: extended in different namespaces means that combined Schema cannot be fully verified. In particular, there is no way to create a new SCHEMA for a constraint wildcard. For example, imaging NS1 includes foo and bar, it is impossible to use SOAP Schema (a Schema example using wildcards) and requires NS1: foo elements must be a child element of the header element, NS1: bar must not use the header element of the W3C XML component. Child elements. Indeed, some WSDL functions have been generated for this feature. The new namespace name method causes the specification and namespaces that are inappropriately decomposed because the relevant structure will be located in separate namespaces. Further, reusing the same namespace has better tool support. Many applications use single Schema to create equivalent programming structures. These tools often work together with a single namespace support for the "generated" structure. The namespace name is reused at least allows the namespace author to change the namespace and perform verification of the extension. The default processing model override assumptions must ignore the rules, and the common case is that the extended creator requires rewriting to ignore the rules and make the reception to understand the expansion. 10. Provide a Mustunderstand Rule: Container language should provide a "Mustunderstand" model that handles rewrite defaults to ignore the extension of the rules. This rule and must ignore the rules together to provide a stable, flexible processing model for extensions. The simplest and flexible rewriting technology a Mustunderstand flag indicating whether the item must be understood. Specify UAP [7], WSDL [8] and WS-Policy [10] attributes and values: SOAP: MUSTUNDERSTAND = "1", WSDL: Required = "1", WSP: usage = "Wsp: Required" . SOAP may be an area where the container that provides a Mustunderstand mode. The default is 0, it must be ignored. A Mustunderstand flag allows the sender to insert an extension into a container and rewrite the rule using the Mustunderstand property. This allows the sender to extend the message, keep backward compatibility without changing the namespace of the parent element of the extended element. Obviously, the recipient must be extended to handle new extensions, but there is a loose coupling between the language processing model and the extended processing model. There are other possible technologies, such as providing an element to indicate which extension namespace must be understood. In some cases, a language does not provide a Mustunderstand mechanism. When the Mustunderstand model is missing, if the recipient does not understand the expanded namespace, there is no way forced the recipient to reject a message. Determinative XML DTDS and W3C XML Schema have a rule that requires Schema to have certain content models. The following example comes from the XML 1.0 specification. For example, the content model ((B, c) | (b, d)) is non-deterministic, because given an initial B, the XML processor does not look forward to the case with B, do not know Which of the model is matched. ## Any means that there are some schema we may want to express, but not allowed. · Use the wildcards of ## any (hereinocurs is not equal to maxoccurs), not allowed before the element declaration. An example of this element will be valid for ## any or the element. You can use ## other. · The element before using the wildcards of ## Any must have the base of Maxocus, which is equal to its Minoccurs. If not the same, such as MinoCCURS = "1" and maxoccurs = "2", the optional event matches the element definition or ## ANY.
As a result of this rule, MinoCCURs must be greater than 0. · You must avoid the use of an export type defined after using the wildcard using ## any. The export type may add an element definition after a wildcard, then the instance of the added element definition may match the wildcard or export element definition. 11. Deterministic rules: The use of wildcard must be certain. The location of wildcards, the namespace of the wildcard extension, the value of MinoCCURS and MaxocCurs is constrained, and the type restriction is controlled. As previously, the general design mode will provide an extensibility point - rather than an element - to allow any namespaces at the end of the type. Typical case, this can pass
Come. In many cases, the determinism makes it possible to work as a complete solution. First, the extension can only occur after the desired element in the original Schema, limits the scope of the extensibility in the original SCHEMA. Second, the elements added to the down-compatible changes are optional, which means minoccurs = "0". Deterministic prevents us from placing a minoccurs = "0" before the ## ANY extension point. Thus, when an element is added to an extension, the author can make the element optionally, lose the extension point, or the author makes the element necessary, and loses backward compatibility. Why is this difficult? We have explained that the use of XML and W3C XML Schema is difficult to achieve loose coupling by fully utilizing compatible changes in new SCHEMA definitions. Compliance These extended rules have caused the W3C XML Schema document to be more cumbersome, and it is also a more shortage of expression. The structural restrictions introduced by the scalable process of W3C XML Schema are the results of W3C XML Schema design, rather than SCHEMA-based structures. For W3C XML Schema, it will be useful if it can add elements to any location (such as other elements). But determine constraints limit it. A less restricted deterministic model type can be used, such as the "GREEDY" algorithm defined in the URI specification [4]. This will allow optional elements to be placed in front of the wildcard without introducing the extended type. It still does not allow wildcards before the element, because the wildcard will match the element. Further, it does not allow types of wildcards and types to extend to coexistence. A "priority" wildcard model (one element can be matched by a wildcard, or if an element can match another element) will allow wildcards to be in front or after elements declaration. In addition, only the wildcards that have not yet been defined - other namespaces effectively add anything unselected in the target namespace - another useful model. These modifications will also allow inheritance and wildcards to be mixed cleaner. But that still means that the author must use wildcard in their type. A type-level ANY element that is combined with the average of the wildcards mentioned earlier. One possible solution is that the sequence declaration has an attribute that allows the extension that is allowed to be extended, and then there is a quite attribute that specifies the namespace, element, and verification rules. The problem with the last method is to use a specific schema, sometimes the same SCHEMA is applied in a rigorous or unstrustful manner in different parts of the system. For a long-standing rule of Internet is a robust principle, there is a detailed description in Internet Protocol [3]: "Typically, a realization must be conserved in its transmission behavior, free of receiving behavior." In Schema Verify Terminology, send The party can apply a SCHEMA in a strict manner, and the recipient uses SCHEMA in a loose manner. In this case, strict levels are not the properties of Schema, but how to use the properties. A solution that can solve these problems is to define a form of Schema authentication, allowing an open content model that is used when managing SCHEMA. We call this model to verify "by Projection", which ignores rather than refuses to appear in the message without being explicitly defined by Schema. We plan to explore this loose verification model in the future. The final evaluation of W3C XML Schema scalability is that there is still unmetable demand for SCHEMAs used to verify known extensions while maintaining scalability. An author will want to create a Schema based on an extended Schema, but mix other known Schema while maintaining wildcard scales. We have encountered this difficulty in some areas (like describing SOAP headers). It is also very urgent from multiple SCHEMA combined SCHEMA.
Leaving the topic of the wildcard scalability, if the recipient does not understand the expansion type, just in XSI: BaseType = ", then if the instance document can indicate a base type, the use of extended types on the Web may be more pleasant. If the recipient does not understand the expansion of the basic type, the recipient can back to use the basic type. Another field of improvements to the architecture is XML (or even W3C XML Schema) may have provided a Mustunderstand model. In the current situation, the vocabulary that provides the Mustunderstand model is re-transformed MU WHEEL. XML can provide an XML: Mustunderstand attribute and model that can be used for each language. February 2000 [18], Tim Berners-Lee describes the needs of XML in the XML in detail on his compulsory extended design notes, but XML 1.0 and 1.1 do not include the model. Finally, there is an unclear test in conformity testing for W3C XML Schema. W3C XML Schema Test Set [16] Do not test some, more general cases already excluded here. For example, rewriting a wildcard test of different styles, it is a complex type XS: ANY. They do not include some non-deterministic conditions, which typically can be obtained by combining minoccurs / maxoccurs and ## any, or combined inheritance with ## annine. In this way, some implementation cannot be tested correctly, which may generate documents that cannot be interoperable. The issue of people's common concern is to support these functions and combinations. These examples have been tested on many different Schema analyzers and tool packs, such as XML Beans, SQC, and JAX-RPCs. Although it is impossible to know if all implementations support these rules, it seems that those have been tested. The authors must have interested in understanding tools that do not support these rules. Conclusion W3C TAG determines that the version control and scalability topics are important for the web architecture, so work in one discovery [20], and the material contains the material into the Web Architecture document [21]. Although this paper provides a starting point for TAG materials, the material will include a broader range and more entered more in terms of interaction and repetition. For processing in progress, the reader can follow the TAG material. This document describes some rules that use XML, W3C XML Schema, and ML NameSpaces in language construction and extensions. The main goal of this rule is to allow language designers to be able to backward and forward compatible changes in order to obtain loose coupling between systems. To a certain extent, the technique described herein combines ## any and ## Other design and Komati rules to generate a design of the version control target that enables compatibility scalability and authentication using W3C XML Schema. The owner of the namespace name can add backward and forward compatibility to the extended element, while maintaining the ability to verify all components, other authors can add their modifications in the ## Other wildcard location.