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

sanely ordering template imports?

Subject: sanely ordering template imports?
From: "James A. Robinson" <jim.robinson@xxxxxxxxxxxx>
Date: Tue, 6 Dec 2011 11:04:27 -0800
 sanely ordering template imports?
Folks,

I've got a set of stylesheets that I originally set up with a primary
stylesheet 'content.xsl' that imported four other stylesheets:

  content.xsl
    imports common.xsl
    imports clean-entry.xsl
    imports clean-xhtml.xsl
    imports clean-source.xsl

Originally

  content.xsl had the bulk of the logic for processing the input
  content

  common.xsl had a few xsl:variable definitions set (the values of
  which are independent of the input)

  clean-*.xsl contained simple xsl:template match rules that elided or
  lightly modified the content.

Basically content.xsl would pull the content from various sources and
then kick of processing a mode that would be picked up by one of the
three clean-*.xsl stylesheets.

After this original setup had been in place for a little while I found
myself needing to add new functionality to the clean-*.xsl stylesheets
that could benefit from importing common.xsl not because of the
stylesheet but because the editor I'm using (Oxygen) would complain
about missing definitions.  Basically both clean-*.xsl and content.xsl
would be referring to variables defined in common.xsl.

I can't be the first person who has encountered this, so I'm wondering
what you all do in situations like that.  Do you simply take the hit
of redundant import statements, or do you restructure your
stylesheets?  If you do the latter, do you tend to follow a specific
set of rules on how to lay out the imports?


Jim

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
James A. Robinson                       jim.robinson@xxxxxxxxxxxx
Stanford University HighWire Press      http://highwire.stanford.edu/
+1 650 7237294 (Work)                   +1 650 7259335 (Fax)

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-2013 All Rights Reserved.