Use xslt + css to make RSS display as beautiful as a webpage

Source: Internet
Author: User
Tags xsl xslt smarty template

Recently, I began to study XML + XSLT + CSS to construct webpages. I also considered some of my websites as experiment products ..
Because I threw the lab stuff on this site to another server, but I am too lazy to make a homepage again, so I synchronized the RSS here. When the homepage
How can I see XML of non-associated styles and dislike it ....

Directly associating CSS can make XML look decent... although it is not the final goal... you still need to learn about it... because not all browsers support XSLT.
The browsers I can use seem to be able to understand the associated CSS ~ Unfortunately, CSS alone can do too little. It's better to use xslt ..

There is basically no difference between CSS that is directly used for writing XML and CSS that is usually written... the element names are different. high difficulty... the freedom to write HTML is gone... you cannot add any element because you want a certain effect...
It seems that my level decides that I can only write the CSS defined better than the text, and then I will take a look at the example and skip it... study XSLT.

Xslt can do a lot of things. xml can finally be used directly for webpages ..

Open a copy of the xslt written by others and discover a lot of familiar things ..........
For the application in RSS, we only need to know about XLST.

Xsl: for-each select = "rss/channel/item"
Xsl: value-of select = "..."
Disable-output-escaping = "yes"
One cycle, one selection node... one setting disables output escape
Then I copied the template file used by my program ..... replace the smarty tag with the one in xsl .. it's too much like .. I don't even need to write html .. one-way replication ..
After the core program of the website is completed, I must try to use xslt to directly create a smarty template...

Then I sorted out a separate CSS, and thought it was all done .........
-____________-!! Some browsers may get upset every time you make a webpage... this is the moz kernel ....
I need to display the HTML in CDATA to make it more like a webpage,
You can search and tell me that Mozilla's Transformiix does not support disable-output-escaping.

I remember that feedburner can display the HTML code in CDATA in Firefox ~
After reading his xslt and search results, I found that the content is basically written into JavaScript innerHTML once again to display ........

I don't know why... I learned how to solve it. I barely solved disable-output-escaping .........

When writing JS, I found that... JS is a little strange... for example, it is a little different from external links in xslt ..
I wanted a page .. A function can be run without writing it .... we found N strange problems again .. there is no time to study him .... write some tests when you are free...

So much nonsense ..
Look at my learning results, http://lab.loaoao.com

Additional reading
Http://www.w3.org/TR/xslt/
Http://www.xml.org.cn/list.asp? Boardid = 8
Www.w3schools.com/
Hedong.3322.org/archives/42444.html

Related Article

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.