Re: push v. pull (was[xsl] Never use for-each)

Subject: Re: push v. pull (was[xsl] Never use for-each)
From: Graham Seaman <graham@xxxxxxxxx>
Date: Tue, 6 Nov 2001 15:26:05 +0000 (GMT)
On Tue, 6 Nov 2001, cutlass wrote:

> multiple stage transformation is a basic cornerstone and is common practice.
> not hard to do.
Any standard techniques for doing this? If raw input is xml
(defined by given schema/dtd), and final output is to be html, what format
would you use for the intermediate stages? Define a new dtd?
> 
> as for a simplest web type framework i would suggest
> 
> global.xml: global elements, data urls,and possibly session data of client
> global.xsl: holds global vars, common location paths, common xpath, global
> language templates ( ie selector based on @xml:lang attribute, etc )

How do you centralise language handling? For localization, I'm using a
template which just holds the phrase dictionaries. Then every time instead
of printing a literal phrase, I have to call a lookup function, which
makes everything rather unreadable. Is that a case for multiple stage
handling (ie. use one language as the 'base' language, generate output
using this language only, then pass to the next stage template which does
the lookups for other languages and nothing else?). Or is there another
way of separating out localization tasks?

>, data
> handling templates ( possibly call-templates )
> 
> asset.xml: raw xml for data to be used in application
> asset.xsl: styling aspects ( images, text, etc )
> 
> have all other data as external and use a global call-template to access
> external data from within your local template.
> 
> inherit these 4 templates in every template for the web app, though with
> larger apps u will definately have to get more sophisticated.
> 
Cheers,
Graham


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread