Combination of XML + XSL and HTML _ javascript skills

Source: Internet
Author: User
Tags xsl
The combination of XML + XSL and HTML is the current content management system. The methods for presenting specific data to the client are mainly XML + XSL or Html. Take CSDN as an example. Currently, both methods exist. For example, in the forum, we use XML + XSL, and in the document center we use SHTML.

Based on my experiences. XML + XSL has the advantages of separating the data layer from the presentation. XML definition data, XSL definition display. The obvious disadvantage is: 1. Some users may encounter XML + XSL Parsing problems on the client after installing some XML editors. What users see directly is the XML code, from time to time, some people complain that they cannot view CSDN forums. These are the reasons. (This problem is hard to overcome) 2. The XML + XSL complex logic operations are relatively poor. Some complex logic operations occupy a large amount of client resources. For example, the support for UBB is implemented on the basis of the current CSDN forum. It is very complicated. If the UBB presentation operation is performed by the client, it cannot be tolerated by anyone. 3. Google does not support searching XML files.

The advantage of using Html is very simple, and the user is what needs to be presented. The disadvantage is that it is complicated to extract valid data.

Today, when talking to the "wind child" about content and how news systems are presented, I suddenly remembered that we can use the advantages of XML + XSL and HTML at the same time. The specific method is to convert some complex logic operations into server segments, convert these into HTML code, and then save the converted content to XML data. Section. The XML + XSL method is presented to the user, but this method does not involve complex logic operations on the client. There is not much pressure on user-side parsing, and some complicated functions can be implemented in this way. For example, you can support complex functions such as ubb on the csdn forum.

In the past, I have been opposed to supporting UBB in CSDN forums. One important reason is that it puts pressure on customer segments. Now we can solve this problem through the XML + XSL solution integrated into HTML mentioned above. The next-generation CSDN forum can do this. But another reason is that it is necessary for technical exchange BBS to be so fancy ?? Especially when many people add Large fonts and special images to their signatures, will there be more problems ??

The XML method in HTML is the data island method. For example, you can refer to the monopoly forum. That is a representative way to apply data islands. When you open a CSDN forum, the tree on the left will automatically synchronize the data that needs to be synchronized to that node.

In addition, the Shtml method supports Include Html. You can use Include in Shtml to Include some htm files.

Baidu can find the XML post of the CSDN Forum:
Http://www.baidu.com/baidu? Lm = 0 & si = & rn = 10 & ie = gb2312 & ct = 0 & word = site % 3 Aexpert % 2 Ecsdn % 2 Enet + % BD % AF % EA % C9 & cl = 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.