Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Newbie question...

Reply
Thread Tools

Newbie question...

 
 
Gabriel Guernik
Guest
Posts: n/a
 
      06-20-2006
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

 
Reply With Quote
 
 
 
 
Peter Flynn
Guest
Posts: n/a
 
      06-20-2006
Gabriel Guernik wrote:
> 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.

[snip]
> So my questions are:
>
> 1) is this achievable with xml+xslt? or is there a better way?


Yes, have a look at Cocoon (cocoon.apache.org). It's quite big, but it
will do what you want.

> 2) i'd thought of writting my own JAVA program to do this.


Unless you're a masochist I'd use Cocoon...it's all in Java and runs
under Tomcat.

///Peter
--
XML FAQ: http://xml.silmaril.ie/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie with newbie questions JohnE ASP .Net 3 08-17-2009 10:10 PM
VONAGE Newbie w/newbie question New_kid@nowhere.new VOIP 0 08-11-2007 01:40 PM
another newbie question from another newbie.... Lee UK VOIP 4 05-17-2005 04:10 PM
newbie: cisco vlan newbie question No Spam Cisco 3 06-07-2004 10:02 AM
Newbie! I'm a newbie! What's wrong with this program? Id0x Python 4 07-20-2003 11:40 PM



Advertisments