Dreamweaver8 the creation of new features XSLT page visualization

Source: Internet
Author: User
Tags html form html tags readable xsl xslt

Open words

DW8 What is the good of this new function? This had to be preceded by a number of technical terms that made a beginner feel dizzy.

But note: This article is mainly to carry out an example of the process of explanation, you can follow the steps to complete the case project easily. However, in the process will eventually encounter some concepts, here first, the content only to do a summary of the relevant specific content can search for reference details.

First, XML.

What is it? More and more sites are beginning to apply XML, the most common is the existence of RSS in each blog.

So, there are now two technical nouns: XML and RSS.

· Please do more hands-on, see more of the following sites to observe the RSS

Look carefully, do they have anything in common?

1, are the structure of the tree directory

2, basically have <channel>,<item>,<title> and other related labels

3. ..............

In fact, RSS is a special standard XML document, where is the special? such as the need to declare <rss version= "2.0" >, such as <channel>,<item>,<title> and other fixed tags to contain and express the relevant content, As the RSS standard specification version (such as RSS1.0, RSS2.0) is different, it will define a label that is not nearly identical to represent the specific content.

So, RSS is a special kind of XML document.

· Then there is the understanding of XML

You can see from the RSS document just now that the structure of XML is so simple.

One of the simple: the tags are both end-to-end symmetrical, such as <channel> and </channel>, which is the same thing as HTML tags.

The simple second: These tags are not like the HTML tags have been fixed dead, such as <body>, <table>, <td>. In XML I can define tags, or even Chinese (of course, use Chinese must be declared in XML in advance: encoding= "gb2312").

Here you can write an XML document: Mysite.xml

<?xml version= "1.0" encoding= "gb2312"?>

< My Site >

< site information >

< establishment time >10/29/2003</time >

< site address >http://www.cnbruce.com</site address >

< site description > personal blog site, more web-related data collection station </site description >

</Site Information >

< site information >

< establishment time >5/20/2005</time >

< site address >http://www.liury.com</site address >

< site description > like Liu Song, appreciate her this person, so want to collect some of her things, unfortunately has been no time </site description >

</Site Information >

< site information >

< establishment time >7/20/2005</time >

< site address >http://www.dw8.cn</site address >

< site description > like DW, just mm of the new software DW8 release, so have this site </site description >

</Site Information >

< site information >

< establishment time >9/26/2005</time >

< site address >http://www.yzcheng.com</site address >

< site description > Yangzhou city, based on the local, the establishment of Yangzhou external window site, hope for Yangzhou to do their own humble </site description >

</Site Information >

</My Site >

Very simple to < My site >...........</My site > including various < site information > content

Type in Notepad (Suggest yourself to enter a deeper impression:) The above tag code, save as a mysite.xml file, and browse through the browser.

OK, with the above XML, maybe someone asked, what do you want this XML for?

Yes, in addition to the structure of the directory tree that makes us feel fun, don't forget RSS is an important application of it, of course, the contents of RSS XML tags are dynamic, generated by the program, this is another word; at the same time, XML as a future development, has been gradually widely used ... In short, you are unconditionally accepting the word XML in this article: D

P.S. More detailed information about XML search the Internet, the keywords "xml", "What is XML", "XML Tutorial" and so on

Here simply provides a connection

Speaking of XML, let's talk about XSLT

What is this XSLT thing? What's the use? And how to use it?

You can observe the RSS document just now, although the content information is displayed, but its readability is relatively weak, generally want to use the way of the Web page intuitive view.

Then the XML has been puzzled and the love of HTML friends, may ask: Since the use of visual display of the Web page, directly with the DW edit a table, the above main data input cell is not OK?

Yes, you can do this without having to use XML trouble. But one caveat is that pure XML files only record data, and there are no redundant tags like html <table><td>, so XML is better suited to preserving data than pure water. This is to be separated from the HTML section.

Also, some people would say that now is not the time to discuss the new web standards more, I can use <ul><li> to achieve AH.

is also true, and XHTML is the HTML transition to XML thing, and then, with <ul>, <li> more than < site information >, < set up time > So clear?

OK, the above is why to use XML, I believe you begin to like slowly: P

So how to make XML documents appear to be more readable web page effects, many friends who touch "web standards" are xhtml+css Lenovo to Xml+css.

Yes, using CSS can actually display the XML data more humanized, but CSS can only be displayed, can not have the choice of the user's customized display.

The arrival of SO,XSLT has solved our demand!

An Extensible Stylesheet Language Transformation (XSLT) is a subset language of XSL that allows you to display XML data on a Web page and "transform" XML data and XSL styles into readable, formatted information in HTML form.

In fact, XSL is also a special structure of XML

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.