include commands for xhtml

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

include commands for xhtml

Post by kendall »

Hello, I am developing and xml based website and i wanted to find out if at all i can <!-- include# file="file.xml" --> in a shtml document. If not what methods can i use to import xml data into other files?

Kendall
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You can use XSLT - PHP can do the transformations server side and then you can feed it into other files.

Mac
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Post by kendall »

twigle,

what do you mean??

as in create a xhtml complaint php file????

please elaborate

Kendall
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Basically PHP just facilitates XSLT creating XHTML out of your XML. You could do the transformations clientside but then you're at the mercy of different browser implementations.

If you are going to be doing a lot of XML work and haven't yet played with XML and XSLT you should go hunt out some tutorials and have a go - it's a lot of fun and kinda like magic, plain boring XML in - nice pretty web page out :)

Mac
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Post by kendall »

oh twigle beleev me i have i even suprised my self in creating a recursive xslt sheet that takes catalog information and listing it out in a "3 in a row " loop. i ask this question in reference to viewtopic.php?p=137143#137143 Im also reasearching ways of using it with MySQL but havent found anything understandable yet
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

there are some interesting articles at:
http://www.tonymarston.net/php-mysql/ph ... cles).html
Post Reply