[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] I'm on the edge and I need a push...
Hi guys... OK, I'm close to recommending we stop building a home grown sort of templating scheme (that I'm building), and instead use XML/XSL to build websites for a client... Here are the few things that are holding me back right now... Most of the books I've read on XML/XSL use examples as follows: They take output from a database (converted to XML, of course) and then pretty up the output using XSL... This is great, however, a real site would need a little bit more, and would likely involve not just one XML doc per output page, but likely more than one: For example, if you go to Yahoo's home page: I see a lot of static info, to be sure, which would fit in <xsl> <rule> <root/> < (blah blah blah) > <children/> < (blah blah blah) > </rule> </xsl> But, some stuff, wouldn't fit so clearly: the ad for instance at the top under the Yahoo logo, the latest bids section and the latest news. To my way of thinking, these would each involve multiple database queries, and multiple database queries to me at least spells multiple XML docs. (I know, not necessarily, but, if you wanted to put arbitrary pieces of database _stuff_ on a page, you'd want to separate all the different data onto different "modules" and then just plug them into the page) How does one do this in XML/XSL? This is what I was thinking, but, again I'm still not sure how to go about doing it... Upon request the CGI/Servlet/API whatever generates an XML doc to encapsulate the request info, Something like <CGI_REQUEST> <CGIVARS> <VARIABLE NAME="Blah1" VALUE="Blah Blah"/> <VARIABLE NAME="Blah2" VALUE="Blah Blah"/> <VARIABLE NAME="Blah3" VALUE="Blah Blah"/> <VARIABLE NAME="Blah4" VALUE="Blah Blah"/> </CGIVARS> <SERVER_HEADERS> <HEADER NAME="User-Agent" VALUE="Mozilla"/> <HEADER NAME="Blah7" VALUE="Blah Blah"/> </SERVER_HEADERS> </CGI_REQUEST> from here is where I'm sort of stuck... The closest I think of is having an XSL page which will be something like: <xsl> <rule> <HTML> [ Blah blah blah ] <adbanner/> [ Blah blah blah ] <relatedlinks/> [ Blah blah blah ] <mostrecent_bids/> [ Blah blah blah ] <recentnews/> [ Blah blah blah ] </HTML> </rule> </xsl> But, then, relatdlinks needs to take two XML docs, the CGI XML doc and _based_ on the CGI XML doc _generate_ another XML doc, which will then get converted to HTML, right? How is this being handled? Same for recentnews and mostrecent_bids, although, here, we likely wouldn't need the CGI XML doc... Also, what if the output is to have a framed page? Like, you submit to the CGI, and the output is to be a frame which needs to relay info about the CGI request? I guess another good eg is if you do a search on AltaVista, it generates the search results that you want, but it also generates "related searches" which are pretty clearly another database hit separate from the original search... (And on Yahoo, the ad banner at the top seem pretty clearly related to what you search for... For instance a search for wedding brings me back an ad for the weddingchannel.com at the top, and there are all these flower links on the right side of the page... I pretty much know how I'd do all these things if I were to go all out servlet /CGI/API whatever again, but, am not quite sure how to handle it with XML/XSL, without resorting somehow to an "impure" solution, involving Java/C/C++, in which case, I wonder about not being purely standards based, in which case, you know, what's the point? (I mean, like, if I were to write my own web server, that was 99 44/100 % pure HTTP, but, the extensions were only understood by the BineshBrowser what would be the point? The users would now be locked in to the Binesh Web Server/BineshBrowser combination, and wouldn't be able to take advantage of other tools to help them maintain/modify the site...) Ditto for extra HTML tags, as we all know from reading our XML books... The whole point of a standard (to me) is flexibility in choosing tools because everyone will code to those standards, right? Like I said, I'd rather build something built on standards than something homegrown, but from what I've read I haven't _yet_ seen a full eg. of something like this... and, I'd need to solve them before going that route... Thanks, Binesh Bannerjee xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1 To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|