[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: opinion re flexible style vs speed

Subject: Re: opinion re flexible style vs speed
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 9 Jan 2007 16:44:51 GMT
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.