This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: efficient filtering of XML files. ( XML!=content && XSLT!=pr esentation )?


Dave Pawson wrote:
> Mike, are you advocating something along the lines of a function
> which retrieves, from an external source, an appropriate 'styling' for
> the current node? Something like a function get-style(.) which returns,
> in your example, say, a colour, in mine, some heading text?

If I understand what you're saying, I'm not advocating a function, per se
-- rather, just coding a template that achieves similar results.

Your example of deciding which data to pull in based on a known choice of
media and corresponding properties associated with the data is something
that applies this principle. It can also be used for internationalization,
as I think someone has posted about in the not-too-distant past.

The association of properties to key off of with data can be achieved
directly with attributes in the data elements, or can be done via
references from another section of XML devoted specifically to the
purpose (like a join table in a relational database).

I use the latter option for associating presentational data with
structural data, using IDs and IDREFs (although not defined as such in the
DTDs, because the refs span across different XML documents). I'll use the
former option for internationalization of content and presentational data,
which is an upcoming priority in our product.

In this process I've been having to balance the temptation to abstract
everything into XML equivalents of join tables against the practical
simplicity of hard-coding direct references to data. The processes
creating and managing all this data have a lot of work to do.

   - Mike
___________________________________________________________
Mike J. Brown, software engineer, Webb Interactive Services
XML/XSL stuff: http://www.skew.org/    http://www.webb.net/


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]