Combination of xml+xsl and HTML two schemes _javascript skills

Source: Internet
Author: User
Tags xsl
The current content management system, the way to show the client specific data is mainly: xml+xsl or Html two ways. In the case of CSDN, both of these approaches are present. For example: forum, we use the xml+xsl way, the document center we use is the shtml way.

According to my experience of use. The advantage of xml+xsl is that the data layer is separated from the presentation. XML definition data, XSL definition display. The obvious disadvantage is 1, some users installed some XML editor, client resolution XML+XSL will be a problem, the user is directly to see the XML code, sometimes there are always people complain that they can not see the CSDN forum. The reason is basically these. (This problem is difficult to overcome) 2, the complex logic operation Xml+xsl is poor, some complex logic operations will occupy a large client resources. For example, in the current CSDN forum based on the implementation of support UBB function. It's complicated. If this ubb is performed by the client, it is intolerable to anyone. 3, Google does not support the retrieval of XML files.

The way to use HTML, the advantages are very simple, to the user is the need to show the things. The disadvantage is that the extraction of valid data is more complex.

Today, with the "Son of the Wind" exchange content, the news system how to show, I suddenly remembered that we can use the advantages of xml+xsl and HTML to do. The practice is to convert some complex logic operations into server segment, convert them to HTML code, and then save the converted content to the <! of XML data. [cdata[]]> Festival. The xml+xsl approach is presented to the user, but the client does not have complex logical operations in this way. The pressure of the client parsing is not very large, some complex functions can be implemented, such as support UBB and other complex functions on the CSDN forum.

I've always objected to the support of UBB in the CSDN forum, an important reason is to add pressure to customer segments. It is now possible to address this problem with the XML+XSL scheme that is integrated into HTML mentioned above. The next generation of CSDN forum can do so. But another reason is that the technical exchange of the BBS, it is necessary to do so fancy it?? In particular, many people in their own signature, add a lot of fonts, very special pictures, will not bring many problems??

The way in which XML is integrated into HTML is the way the data island is used, and this example can be seen in the tycoon forum. That's a very representative way of using the data island. Open a csdn forum, the tree on the left will automatically sync function, but also with the data Island Records need to sync to that node data.

Another: The Shtml way, in fact, is to support include HTML. You can use include in shtml to include some HTM files.

Baidu can find the CSDN forum XML post:
http://www.baidu.com/baidu?lm=0&si=&rn=10&ie=gb2312&ct=0&word=site%3Aexpert%2Ecsdn%2Enet+% 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.