G
Gabriel Guernik
Hi to all! I'm try to design a web site, not to big and not too fancy,
consisting of just 15 to 20 web pages. I've recently started with
xhtml, but i was wondering if there's a more automated and flexible
way. And i would like to have as result simple xhtml files, i would
really prefer not no manage my site with PHP, ASP or the like.
I've started learning xml + xslt, but i'm not sure if what i want is
acievable with these. This is what i have in mind:
1) to keep all content in one (xml or other format) file, say foo.xml
2) to have a stylesheet that stores the general layout of the pages
3) an (another or the same) stylesheet placing each element of foo.xml
in ist proper place in each of the fina pages, so that when processing
it (in MY machine) it outputs all the webpages of the site with proper
layout and content.
As an axample, consider the files:
foo.xml:
<title>the title</title>
<news>here goes the news...</news>
<oldernews>And here the older ones...</oldernews>
and style.xsl should say that the general layout (i omitt all meta's,
declarations, etc) is:
<h1><here:goes:the:title/></h1>
<div><here:goes:the:content/></div>
and the same or another style should say that i want to output two
files, called news.html and oldnews.html, sth like:
<allfiles><here:goes:the:title=title/></allfiles>
<file:news><here:goes:the:content=news/></file:news>
<fileldnews><here:goes:the:content=oldnews/></fileldnews>
So my questions are:
1) is this achievable with xml+xslt? or is there a better way?
2) i'd thought of writting my own JAVA program to do this. Are there
some "xml parsing and xslt applying" classes around that would help
with this?
I hope it's rather clear what i've tried to ask. If not, please tell me
and i will try again.
Thanks to all!
Gabriel
consisting of just 15 to 20 web pages. I've recently started with
xhtml, but i was wondering if there's a more automated and flexible
way. And i would like to have as result simple xhtml files, i would
really prefer not no manage my site with PHP, ASP or the like.
I've started learning xml + xslt, but i'm not sure if what i want is
acievable with these. This is what i have in mind:
1) to keep all content in one (xml or other format) file, say foo.xml
2) to have a stylesheet that stores the general layout of the pages
3) an (another or the same) stylesheet placing each element of foo.xml
in ist proper place in each of the fina pages, so that when processing
it (in MY machine) it outputs all the webpages of the site with proper
layout and content.
As an axample, consider the files:
foo.xml:
<title>the title</title>
<news>here goes the news...</news>
<oldernews>And here the older ones...</oldernews>
and style.xsl should say that the general layout (i omitt all meta's,
declarations, etc) is:
<h1><here:goes:the:title/></h1>
<div><here:goes:the:content/></div>
and the same or another style should say that i want to output two
files, called news.html and oldnews.html, sth like:
<allfiles><here:goes:the:title=title/></allfiles>
<file:news><here:goes:the:content=news/></file:news>
<fileldnews><here:goes:the:content=oldnews/></fileldnews>
So my questions are:
1) is this achievable with xml+xslt? or is there a better way?
2) i'd thought of writting my own JAVA program to do this. Are there
some "xml parsing and xslt applying" classes around that would help
with this?
I hope it's rather clear what i've tried to ask. If not, please tell me
and i will try again.
Thanks to all!
Gabriel