XHTML and XSL

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
xploit-design

XHTML and XSL

Post by xploit-design »

Hey, i work in the web industry with our own inhouse CMS.  Using CMSMS is a home project.  Can I use XSL to create templates? or is it just XHTML?

Will
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: XHTML and XSL

Post by Dr.CSS »

XSL ?
extensible stylesheet language ?
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: XHTML and XSL

Post by Ted »

XHTML is about the only thing.  In theory, you could probably get some kind of XSL thing going, but I don't think the XSLT addon for php is a very popular add-on.  You'd probably be compiling it from scratch.  And even then, I'm not sure where you'd stick in the transformation code...

In other words, no XSL without some decent amounts of work.  :)
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: XHTML and XSL

Post by Russ »

Whilst I use XML/XSL quite a lot for transformation of data, I'm not quite sure why you would want to use it in this instance? The template module in CMS works pretty well. Any particular reason for you request?

Russ
xploit-design

Re: XHTML and XSL

Post by xploit-design »

Server-side manipulation of data thats adds an element of programing to make pages display what I want it to. Ive only just got CMSMS I suppose I need to explore it a bit better.
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: XHTML and XSL

Post by Russ »

Sorry, I didn't mean to be aloof, on re-reading my comments it might have appeared that way ;-). Well I guess there is no reason why you shouldn't include results from XSL transformation. Perhaps the easiest would be to write a user based tag to run your transformation via PHP and display the results? This presumes, as Ted points out, you have the necessary PHP bits installed.

Is this what you were after? Or is it something completely different?

Russ
xploit-design

Re: XHTML and XSL

Post by xploit-design »

Yeh it does help...thanx.  My practice of building sites is using lots of XSL templates that can be reused...

e.g. having a common template that can be used all through out my sites with basic layout info.  A template for a top nav, one for side nav, one for top nav side sub.  Rather than having the full code in each page for each site, the code just in one place. a more modular construct.

I suppose I'll just have to do it the long way by creating a collection of templates e.g.

top nav with two column content,
top nav with one colomn and news,
top nav side sub with two column content...etc

But thanks, I'm sure i'll find better ways of using the system as I get more used to it.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: XHTML and XSL

Post by Dr.CSS »

my post was a question...
did i get it right, that is what it stands for?
xploit-design

Re: XHTML and XSL

Post by xploit-design »

Oh sorry Mark. Yeh it is eXstensible Stylesheet Language

Our in house CMS at work kicks out XML then we have a huge collection of XSL templates for whole site schemes aswell as seperate templates holding Menu structure etc... that provides the XHTML for us to style and layout using CSS.  Its such a strong robust system as all the programming is esentially done on the server only for some special cases do we need to use JavaScript.

Hense why I'm so hyped about XSL!!!
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: XHTML and XSL

Post by Dr.CSS »

top nav with two column content,
top nav with one colomn and news,
top nav side sub with two column content...etc
i think these are in the default install, all you may need to do is restyle them...
or you could see if i have any you could use.... that's all my site is "Templates"...
http://www.multiintech.com/
xploit-design

Re: XHTML and XSL

Post by xploit-design »

Yeh I know, not in this sence.  Think of an XSL template as more of a subroutine.
e.g....


 

Blah blah


The above gets all the pages from the CMS sends em to "mainmenu" which is just a short bit of code putting them in a then returns.

So you see, I can set up one xsl file holding all the common 'templates' for main menu, sub menu, content layouts rather than like it seems you do... creating one file per whole page layout.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: XHTML and XSL

Post by Dr.CSS »

creating one file per whole page layout.
are you under the impression my CSS are one long style sheet?
actualy i have 196 style sheets, for 66 templates...
s**t no wonder i have 10 pages of style sheets, never counted them before...
as for menus, the system you mention, does it apply the styling to the menu also? or does it just go get the pages and return an ul li ...
i've changed the menu engine templates to make the ul li with the CSS calls i need to the tune of about 30 templates...
is there an OSS version of this system i could look at, play with, learn...
Post Reply

Return to “Developers Discussion”