Note that there are some explanatory texts on larger screens.

plurals
  1. POXSLT management - attaching metadata to a stylesheet for output and parameters
    text
    copied!<p>I am using about a dozen XSLT files to provide a large number of output formats. At the moment the user has to know the extension of the file format being exported to e.g. RTF, HTML, TXT.</p> <p>I would also like to use parameters to allow more options. If I can embed the metadata in the XSL file itself then I can pick up the details by scanning through the files.</p> <p>Here is what I am thinking about. In this example the program would have to parse the comments for the required information.</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!-- Title: Export to Rich Text Format --&gt; &lt;!-- Description: This Stylesheet converts to a Rich Text Format format which may be used in a word processor such as Word --&gt; &lt;!-- FileFormat: RTF --&gt; &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"&gt; &lt;xsl:param name="CompanyName"/&gt; &lt;!-- Format:String, Description: Company name to be inserted in the footer --&gt; &lt;xsl:param name="DateDue"/&gt; &lt;!-- Format:Date-yyyy-mm-dd, Description: Date Due --&gt; &lt;xsl:param name="IncludePicture"&gt;true&lt;/xsl:param&gt;&lt;!-- Format:Boolean, Description: Do you want to include a graphical representation? --&gt; &lt;xsl:template match="/"&gt; &lt;!-- Stuff --&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p>Are there any standards out there? Do I need to butcher more than one (Dublin Core with a smattering of XML Schema)?</p> <p>P.S. the project this is being applied to is <a href="https://sourceforge.net/projects/argumentative/" rel="noreferrer">Argumentative</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload