Topic: Refining tag transformation?
Hi there!
I have a question regarding transforming tags. I have a xml file generated by a flash CMS that in turn become the content both in flash and for xhtml pages as alternate content for a full flash site. Flash has limited number of html tags that can be used & not all of them are valid in XHTML 1.0 strict. So therefore the use of HTML-purifier. This is an excerpt from the XML-file:
<FONT FACE="Arial" SIZE="38" COLOR="#000000" LETTERSPACING="0" KERNING="0">This is the head.</FONT>
<FONT FACE="Matrix" SIZE="8" COLOR="#000000" LETTERSPACING="0" KERNING="0">This is the body copy.</FONT>As anyone can see I have the font tag but with different value for the face attribute. Is there a way to transform the font tag differently depending on the value of the face attribute?
My knowledge of php is quite limited... :-(
So I would like the font tag for the header to tranforms to bold or a header tag but not for the body copy...
If someone has the time to help me out with this it would be great!!
I've actually tried using HTML Purifier but never really managed to set it up the way I wanted. Also that library is just huge in comparison to HTMLawed!! It's seems to be such overkill for what I'm trying to acheive. I've played around with HTMLawed & it feels so simple and faster in comparison!!
Niklas