|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] import/include and file structure
I'm trying to get what I've been working on into shape to distribute
more widely, and am wondering if my approach to modularizing the (xslt
2.0) code makes sense.
I have a main file that looks like: <!-- read the external citation style file --> <xsl:param name="citation-style" required="yes" as="xs:string" /> <xsl:variable name="styles" as="document-node()"
select="doc(concat('../styles/',$citation-style, '.csl'))" /><!-- set the citation class parameter (e.g. author-year) as specified in the style file --> <xsl:param name="citation-class" select="$styles/cs:citationstyle/@class"/> <xsl:include href="core.xsl" /> <xsl:include href="drivers.xsl" /> <xsl:include href="render-classes.xsl" /> Each of these included files in turn includes other files. So, for example, core.xsl looks like: <xsl:include href="core/css.xsl" /> <xsl:include href="core/functions.xsl" /> <!-- all function code --> <xsl:include href="core/render-mods.xsl" /> <!-- all general rendering code --> <xsl:include href="core/style.xsl" /> The "render-classes.xsl" file looks like this: <xsl:include href="render-classes/author-year/render.xsl"/> <!-- all rendering code specific to author-year class --> <xsl:include href="render-classes/note/render.xsl"/> <!-- all rendering code specific to footnote/endnote class --> I am using conditional statements on the class-specific templates to keep stuff separate in processing. Is it fine or me to be using include in this way, or is there a compelling reason for me to be importing instead? I recall Wendell's discussion about import precedence and such, but am not sure practically whether this matters in this case. Bruce
|
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
|

Cart








