Use XSLT+CSS to make RSS display as beautiful as the Web page _xml Foundation

Source: Internet
Author: User
Tags cdata xsl xslt smarty template
Recently started researching XML+XSLT+CSS construction Web pages. And take part of their own station as a test article.
Because I threw this station's lab stuff on another server. But also lazy to do a home page,,, synchronized this side of the RSS. When home
Can not be associated with the style of XML how to see how not like ....

Directly associating CSS can turn XML into a decent point. Although not the ultimate goal. But I still have to learn. Because not all browsers support XSLT
I can use the browser seems to be able to recognize the associated CSS ~ Unfortunately, the only thing CSS can do is too little. Or XSLT is good.

Write directly for XML CSS with the usual writing CSS basically no difference ... Only the element name is different. The difficulty is high ... The freedom to write HTML is gone ... Also can not because want an effect and disorderly add element ...
It's like my level determines that I can only write CSS that is more well defined than the text, and then. See examples. Jump off. Studying XSLT.

XSLT can do a lot of things. XML can finally be used directly as a Web page.

Open an XSLT discovery that someone else has written .... A lot of familiar stuff ....
for Applications in RSS. We just need to know about XLST.

Xsl:for-each select= "Rss/channel/item"
xsl:value-of select= "..."
disable-output-escaping= "Yes"
A loop a Select node .... When a setting prevents output from escaping
Then I copied the template file for my program ... Change the Smarty label directly into XSL. It's so much like. I don't even have to write HTML. Copy all the way.
After the core program of the website is finished, I must try to do the Smarty template directly with XSLT ...

And then sort out a separate CSS and thought it was over ...
-____________-!! Every time you do a Web page, there will always be some browser mood ... This time is the Moz kernel ....
I need to show the CDATA HTML so that he's more like a Web page,
Searchable and tell me that Mozilla's transformiix doesn't support disable-output-escaping.

I remember FeedBurner can display CDATA HTML code in Firefox ~
See his XSLT and search results find .... The basic is to use JS innerHTML content to be written in one time can show ...

I don't know why. Learn how to do it, to settle the disable-output-escaping.

When I write JS, I find ... JS is a little weird ... Like what.... Writing directly in XSLT is a little different from the outside chain.
I would like to have a page. A function to write can run on the line .... It turns out that n is a strange problem. There is no time to study him at the moment. Write some tests when you are free ...

Say such a lot of nonsense.
Everybody look at the results of my study, http://lab.loaoao.com

Extended Reading
http://www.w3.org/TR/xslt/
Http://www.xml.org.cn/list.asp?boardid=8
www.w3schools.com/xsl/
Hedong.3322.org/archives/000044.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.