Quote:
Originally Posted by Tony_V
I know a little about rss... lets say I have an xml feed, can I turn this into an rss in any way. I actually have two files an xml and a dtd file. is there an easy way to convert these to an html page that viewers to a website can view and interact with? for example click links etc.
|
RSS is XML, and you can transfomrm XML into XML using XSLT. You can also convert an XML file into HTML using HTML output method in the XSLT stylesheet. You can not directly output it to XHTML, but you can indirectly do it using XML as otput method.
It is possible to aggregat RSS feeds in many ways where the most advancerd are the PHP XSL extension and PHP SOAP. You should not start there, though. You should also be aware of the
EXSLT extension.
You can even use (your own) PHP functions on an XSLT stylesheet, so the sky is the limit.
Conclusion:
- Start learning XSLT
- Then continuer here XML driven site: Read here (Start with the 3.d link).
Note: You can use XPath functions in XSL(T) in addition to the native functions. As indicated above, you can use the EXSLT function module and PHP functions.
XPath 2.0 and XSLT 2.0 are simplified and has additional functionality. An important difference that you may note at once is that the root is named Document Root in XPath 1.0 while it is called Document element in XPath 2.0. You should be aware of this distinction if you are reading older documentation, since there is an important difference between the Document Root and the Document Element. In XPath 1.0 the document element is a child of the root node that can be regarded as a container for the document. The root node is an conceptual node in the node tree in XPath 1.0.
If you use one of the PHP XML parsers and processors, you should use the last version of PHP and preferrably use a hoster that are fast to upgrade to newer versions of PHP and install the most important extensions like lib2xml, libxslt and EXSLT. Evolutin on XML technologies are very fast. Some modules need to be compiled with the rest of PHP, so if you get an error, the reason may be that the API is not recompiled with PHP core.
Last advice - XML minimalism.
Use the XML family of technologies before you use external scripting, since that should be more robust. There is more that can be solve using XPath, XPointer, XInclude, XLink, XSLT and EXSLT than you thought were possible. You may work best on external XML files using XInclude, since you can control processing using xi:fallback to test for broken links and server shutdown etc.