cause
Everyone knows what is direct link. Whether in browsing the web, a slight version of the next to the blue underscore, or the like seen in various books, "See the Volume 276" format comment, these links guide the reader in a large number The information is looking for a subject and the information related to it. Although the direct link helps, it has always been unchanged, this is a more tricky problem. I happened to have a rare George Orwell 1945 version of Animal Farm, which naturally did not quote the content of the 1984 book because 1984 was written after four years. Of course, there is a concise preface to any new version of Animal Farm you bought today, list all the works of Orewll, but I have always hope that I can find a way, so that I are shabby, almost scattered The book can be updated like this.
The only way to update the printed information is to re-print, this is obvious, but it is strange that the update of online content must also be manufactured. The only difference is that for Web, there is no need to waste extra paper. Almost every page needs to open, edit, save, and re-release on the Web, only this can reflect new content. It is because it is very inconvenient to add a new link in many old documents, so I think I think the concept of reverse link. Reverse link refers to an instruction in the new document (destination document), which is pointed out which old document (source document) is to reference the contents of the new document.
Reverse link concept
Another way to understand the reverse link is to compare them with the other party payment. Unlike regular calls (phonemia payers), the other party pays the phone to separate the phone and pay the fee, and pay the fee. Similarly, the conventional link is declared and displayed inside the source document, and the reverse link declares inside the target document. In other words, it is not like a directive to document B in document A, and an inverse link uses a request for your own request in document B. The concept of the entire reverse link is shown in Figure 1. ]
Figure 1. Direct link comparison reverse link
As a shortcut, the declaration of the reverse link can contain multiple HREF for simultaneous listing of all target documents.
Figure 2. Reverse link extension syntax
For example, the following code example demonstrates the usage of the condition template in the XSLT, allowing four related language reference documents to access themselves through a line of code.
HREF2 = "../ Langref / XSL-chaoose.xml" HREF3 = "../ Langref / XSL-WHEN.XML" HREF4 = "../ Langref / xsl-Otherwise.xml> Conditional Templates link: from> However, how do some pages know other document requests display all reverse reference links to this page? One of the methods is to scan all other documents each time you open a page to search for related reverse link declarations. However, when the number of documents is large, this method is the shortcomings of extremely low efficiency. Therefore, I think of a method, that is, only scan all documents, then compile all the declarations and arranged in an intermediate link group, as shown in Figure 3. Figure 3. A link group example Let's take a look at how to create a link group. First, the compiler scans the BaseFolder and all XML files in its subfolders, and then saves the results into the corresponding tree (this tree mirrors the scanned directory structure). These buildings can immediately locate its entry immediately, while developers can also sharpen their project files to other folders, drives or networks, even on the Internet. The tree has a relative root, only relative links, as long as the internal structure of the project folder remains unchanged, all links remains as it. In the entry of each file in the link group, the compiler copies all reverse links found in the corresponding document. When performing replication operations for all documents, a algorithm is run, convert the reverse link "request" to the actual direct link and store the link: reqby (Requested By) element in the actual display of the document, not Displayed in the entry of the request document. Finally, if we want to know which documents will be referenced for a particular document, just view the contents of the document entry in the link group, because all requests from other documents are set here. Figure 4. A document example of a demo reverse link Looking back and look at the other party's payload call, where the link group's role is equivalent to the intermediate telephone operator. Telephone operators notify the payer requesting it to pay the call fee, similar to this, the link group displays all the links notifications for a page to the page. Figure 5 completely displays the reverse link scheme. Figure 5. Reverse link solution Keep in mind that each time you change the information system, you must compile the link group; otherwise, the old link group will not be synchronized with the update or newly added content and its issued link requests. Reverse link applicable I want my article to be referenced on MSN.com, Yahoo! And WWW Consortium, but only adding the following code on the page. The declaration may not be sufficient: HREF2 = "www.yahoo.com" HREF3 = "www.w3.org"> Take a Look at My New Article Link: from: from > Although the reverse link does greatly expand the function of direct links, they also have their own limitations. That is, they are invalid for remote resources because you must build a link group for the entire Internet and http: // as the base folder, which is purely the sky. However, what I want to say is that although the interface between two friendly sites (imitation B2B information exchange channel) is possible, it is still introduced to this type of reverse link. Within your information system, the reverse link is not an ideal choice. It not only makes the old document contains new content, but also enables changing parts in the information system to link each other with fixed systems. In almost all programming language help files, there is always a contradiction between the language reference and the User Guide section, and we will further explain the problem as an example. For some reason, most User Guide Articles will accurately redirect to the relevant language reference page, and the language reference does not mention the article in the User Guide. Why is this this? Very simple, language reference is the core of language, this core does not change even when it is upgraded in a major version. Maybe I have some conservative, but even in today's .NET era, I still think that I have the 1981 edition, introducing the Microsoft manual of Basic. In contrast, the user guide is the most variation, the most unpredictable part of the manual. The User Guide contains important introductions and latest examples of different language elements, and often the language reference is very perfect when writing it, then who has time to change or update the language reference? This result is very unfortunate, but it is always impossible to avoid. The conservative language reference content never updates with new content and modern technology (just like I have the same 1945 version of Animal Farm), even if it contains error messages. And now, this problem can be solved by reverse link solutions. For User Guide Articles, coding staff garden demonstrations, and other types of dynamic content, the reverse link request can be displayed on the related language reference page. translater Compiler function Init () main function. GetFiles (WhatFolder, root, path) mapping the folders and files in the catalog and their subdirectories in the compiler startup. Call GetReverselinks for each file. GetReveSelinks (XMLDOC retrieves the reverse link set from a given document and passes it to buildReqLinks. BuildReqLinks (root) creates a direct link for each reverse link declaration, and stores it under the document that actually displays the link. In the link group. Path / URL-related functions (using compiler and supplied style sheets) The link group is filtered from the reverse link declaration and thoroughly format it. The tree displays the link group immediately after the link group is compiled, and reports the disconnected reverse link. Supported style sheet getPath (PATH) provides the path to the file and returns the path to the folder stored in the file. GetrelURL (SRC, DEST) Gets two absolute paths and calculates the relative link between the source document to the target document. NormalizePath (PATH) Removes path strings (for example, "./" and "path /../". Supported style sheet Reverse-linking-library.xslt Access the link group to get the request link to the displayed document and display them. To enable reverse links in your document, add the following three lines of code in the style sheet: Thank you Thanks to Chris Lovett, it is through a series of detailed discussions, which makes me realize that I am not XLINK in this demo, but only one of them. One of the founders of XLINK, Steven J Derose mentioned in his Introduction to XLink article, the reverse link consistently solved three of the six issues resolved by XLINK, namely: • Two-way link • Links to read-only documents • Link Database Since I found ARC, Locator and Traverse in XLINK, I decided to put them and the close relationship between the project and XLINK in the background.