File:  [mozdev] / celtx / www / reports.html
Revision 1.5: download - view: text, annotated - select for diffs - revision graph
Tue Jun 1 18:35:00 2004 UTC (13 years, 4 months ago) by chadh
Branches: MAIN
CVS tags: HEAD
Me makinmg silly errors, requiring more minor updates to the bleedin' HTML pages.


<!-- ***************** INFO/NEWS *************** -->
<div id="infoTabs">
<div class="infoTab" id="whats-new">
<h5 class="infoHeader">End User Docs</h5>
<ul>
<li><a href="http://celtx.com/">celtx.com</a></li>
<li><a href="http://celtx.com/walkthru">Three Minute Walk-thru</a></li>
<li><a href="http://www.celtx.com/guide">Celtx User Guide</a></li>
</ul>
</div>

<div class="infoTab" id="other-stuff">
<h5 class="infoHeader">Developer Info</h5>
<ul>
<li><a href="reports.html">Creating Reports</a></li>
<li><a href="script.html">XML Script Format</a></li>
</ul>
</div>

<!-- alternative image/table base tab works better in NS4 -->
<!--
<div class="infoTab" id="whats-new-image">
<h5 class="infoHeader"><img src="http://www.mozdev.org/sharedimages/whatsnew_top.gif" width="154" alt="What's New"></h5>
<div class="infoItems">
<div>News item goes here</div>
<div>More news item goes here</div>
<div><a href="http://mozdev.org/">mozdev.org</a></div>
</div>
</div>
-->
</div>
<!-- ***************** INFO/NEWS *************** -->

<!-- MAIN CONTENT -->
<h5 class="page-header">Creating Reports</h5>
<p>Reports are created in celtx via XSL. XSL is used to  transform the in-memory XML script document into a HTML report.  Buttons to print and/or close the report appear at the top of the window, but their CSS styles prevent them from appearing when printed.</p>

<b>Relevant Code Modules</b>

<p>project.js<br />
Project.toXML method creates an XML DOM object from the RDF data source, suitable for subsequent transformation. Separate sections for each scene are created with notes at the end.</p>

<p>celtx.js<br />
The initReports function loads report configuration from the reports.rdf file into the app.reports object which is used to generate the Reports menu and initialize the report commands.</p>

<p>The ReportController object registers itself as the controller for report commands. It's responsible for loading a particular report's XSL transform and applying it to an XML DOM version of the current project, serializing the results of the transform, and launching a new window with a file:// URL pointing to the serialized report HTML file.</p>

<p>reports.rdf<br />
Contains the basic report configuration. Here's the info for the "sample" report:</p>
<pre>
&lt;rdf:Description about="http://celtx.com/report/sample"&gt;
&nbsp;&nbsp;&lt;rdfs:label&gt;Sample&lt;/rdfs:label&gt;
&nbsp;&nbsp;&lt;rdfs:type rdf:resource="http://celtx.com/NS/v1/Report"/&gt;
&nbsp;&nbsp;&lt;cx:id&gt;sample&lt;/cx:id&gt;
&nbsp;&nbsp;&lt;cx:style&gt;project.xsl&lt;/cx:style&gt;
&lt;/rdf:Description&gt;
</pre>
<b>Adding a Report</b>

<p>Each report should have a unique (if arbitrary) URI -- the sample report's is 'http://celtx.com/report/sample' above. The RDFS type simply indicates the class of the object. The RDFS label is displayed as the report's name in menus. The cx:id is a short, unique identifier used to build the command name for the report. Finally, the cx:style is the XSL file to be applied to produce the report output.</p>

<p>To add a new report, you must create a new XSL file in the transform directory  and add another stanza to reports.rdf using the sample report as a template.</p>
<p>For more information about Celtx please visit <a href="http://www.celtx.com">www.celtx.com</a>.</p>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>