Re: efficient filtering of XML files. ( XML!=content && XSL
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
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