|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] structuring for multiple output formats
Since I'm closer to getting what I'm working on into suitable shape for
distributing more widely, I'm now back to rethinking how to structure
the files.
Currently, I only have one set of input formats (docbook-ng/mods), and one output format (xhtml). However, I want what I've done to be easily extensible to other formats. I think the input format issue is pretty easy: I have a directory called "drivers" that contains files like "document-driver-db.xsl". Possible future export options are latex, openoffice, tei, fo, and maybe wordml. Currently, I have a structure like this (directories in brackets): [doc] [styles] mla.cls apa.cls ... [core] format-style.xsl functions.xsl core.xsl (includes files from the core directory) [drivers] drivers.xsl (includes files from the drivers directory) [xhtml] dbng.xsl (main document xsl, which includes xbiblio.xsl) [render-classes] [author-year] biblio-out.xsl citation-out.xsl render.xsl (includes two above) [key] [footnote] [number] render-mods.xsl (generic renderer) render-class.xsl (includes contents of render-classes directory) xbiblio.xsl (main xsl file, which includes other .xsl files above, and reads content of style file) The advantage of this is that everything is pretty well-modularized. If I need a new output format, though, it means adding a new subdirectory to the xsl directory, and then adding a bunch of further subdirectories and files (this is the approach with the standards docbook stylesheets). Does this make sense, or is their a better way to think of dealing with handling the different output formats? Some of the templates -- in for example the render-mods.xsl files) -- are output-agnostic, though I do have a lot of templates that look like: <xsl:template match="mods:titleInfo[not(@type='abbreviated')]"
mode="full">
<xsl:param name="prefix"/>
<xsl:param name="suffix"/>
<xsl:param name="font-style"/>
<xsl:param name="font-weight"/>
<xsl:value-of select="$prefix"/>
<span class="title {$font-style} {$font-weight}">
<xsl:apply-templates select="mods:title"/>
<xsl:apply-templates select="mods:subTitle"/>
</span>
<xsl:value-of select="$suffix"/>
</xsl:template>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








