mellin
03-12-2003, 05:40 PM
In my site, i use news system based on SSI, Perl and flat-file databases, also called Content Management System. Anyways, last night i modified all news files to valid xml, every news article is it's own xml file, like this:
---------------------------
<?xml version="1.0" encoding="iso-8859-1"?>
<header>
<topic>Internet Explorer sucks</topic>
<author>Mikko</author>
<date>12.3.2003 08:25</date>
<related>3</related>
<icon>xml-ico.gif</icon>
<data>
News issue dated 12.3 blah blah blah..
</data>
</header>
---------------------------
These xml files are then parsed with Perl, and placed within XHTML 1.1 page, as presented via CSS. They dont have XSL stylesheet, because it was just way too difficult coding one :D I did try like this:
---------------------------
<?xml-stylesheet type="text/xsl" href="xml-topic.xsl"?>
---------------------------
and in the XSL file, using CSS rules like:
---------------------------
<div style="font-size: 12px;color: #666666;">
---------------------------
but only Internet Explorer (6.0) bothered to show my custom styles, Mozilla did nothing as like the much praised Opera 7.
Aaa-nyways, the real problem is that i cannot place HTML elements like A, UL, LI, P or whatever inside the "data" element on the xml file, 'cause the Perl parser goes nuts.
As a solution i coded all HTML elements inside the news files, to look like this, [BR], [A HREF], [P] and so on. Then when visitor requests some topic, those coded elements are decoded back to normal elements.
It's just pretty slow and memory hogging way, makes the server scream more processor cycles, everytime it parses the scripts.
So any suggestions of making my system more "efficient"? I'm out of ideas.
---------------------------
<?xml version="1.0" encoding="iso-8859-1"?>
<header>
<topic>Internet Explorer sucks</topic>
<author>Mikko</author>
<date>12.3.2003 08:25</date>
<related>3</related>
<icon>xml-ico.gif</icon>
<data>
News issue dated 12.3 blah blah blah..
</data>
</header>
---------------------------
These xml files are then parsed with Perl, and placed within XHTML 1.1 page, as presented via CSS. They dont have XSL stylesheet, because it was just way too difficult coding one :D I did try like this:
---------------------------
<?xml-stylesheet type="text/xsl" href="xml-topic.xsl"?>
---------------------------
and in the XSL file, using CSS rules like:
---------------------------
<div style="font-size: 12px;color: #666666;">
---------------------------
but only Internet Explorer (6.0) bothered to show my custom styles, Mozilla did nothing as like the much praised Opera 7.
Aaa-nyways, the real problem is that i cannot place HTML elements like A, UL, LI, P or whatever inside the "data" element on the xml file, 'cause the Perl parser goes nuts.
As a solution i coded all HTML elements inside the news files, to look like this, [BR], [A HREF], [P] and so on. Then when visitor requests some topic, those coded elements are decoded back to normal elements.
It's just pretty slow and memory hogging way, makes the server scream more processor cycles, everytime it parses the scripts.
So any suggestions of making my system more "efficient"? I'm out of ideas.