Blog Don't Like Ugly | 4
So I've got my Wordpress blog up and running locally and also at http://www.markmckay.ca. It's just the basic installation for now. I plan on using it for a portfolio site and over the coming weeks I will create a custom template for it.
I was hoping that I would be able to use Wordpress to import content from my Pipe's RSS feed as posts. But it doesn't look like it. The Wordpress's import function will only allow you to upload a local XML file - to for example: transfer all your posts from your Blogger to your Wordpress blog - which is not what I want to do.
After some thought, I figured out that I could probably use XSLT to transform the RSS feed into XHTML. And sure enough after a search of the internet, I found out that it is totally possible. Finally a solution!
XSLT is the perfect way - perhaps the only (some what easy) way to make the information generated by Yahoo! Pipes useful - I hope. My XSLT is a little bit rusty so it is going to take me some time to re-familiarize myself with the language and actually transform my Pipe into posts.
Here is a little bit of information about XSLT and XSL from the W3C School:
- XSLT is a language for transforming XML documents into XHTML documents or to other XML documents.
- XSL describes how the XML document should be displayed.
- XSL consists of three parts:
- XSLT - a language for transforming XML documents
- XPath - a language for navigating in XML documents
- XSL-FO - a language for formatting XML documents
- XPath is a language for navigating in XML documents.
- A common way to describe the transformation process is to say that XSLT transforms an XML source-tree into an XML result-tree.
- In the transformation process, XSLT uses XPath to define parts of the source document that should match one or more predefined templates. When a match is found, XSLT will transform the matching part of the source document into the result document.
- Start with a Raw XML document that you want to transform into XHTML.
- Then create an XSL Style Sheet with a transformation template.
- Link the XSL style sheet to the XML document (add the XSL style sheet reference to your XML document).
- If you have an XSLT compliant browser it will nicely transform your XML into XHTML.
0 comments:
Post a Comment