Re: opinion re flexible style vs speed
in general I'd go for flexibility rather than speed, but in this case I'm not sure that <xsl:template mode="metadata" match="Article/Body" /> is really so inflexible and is a resonably natural expression of the (current) fact that metadata isn't in the body. Yes it will need changing if the datamodel changes, but so will other parts of the stylesheet. <xsl:template mode="metadata" match="Article/Authors/Author"> might not pull in all authors if a new Book/Authors/Author element is added. writing it as <xsl:template mode="metadata" match="Author"> would make it catch both cases automatically (and probably make it a fraction faster as it wouldn't have to check the parent and grandparent names) but might be the wrong thing all together if there are other Author elements that would be matched by this that you don't want to process, or process differently. Everything depends so much on the details of the format, and how stable it is. > Have any of you folks made a similar decision one way or the other and > come to regret it? :) Oh yes, often, but not in any way that leads to any general conclusions. It's just that whichever way you choose, you always wonder if it would have been better the other way:-) David
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