<docbook><section><title>OATDOCfresnel</title><para> </para>
<title> fresnel.js</title> fresnel.js
<para>Fresnel Lens RDF Processor.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2"> Objects</bridgehead>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> OAT.Fresnel()</bridgehead>
<para>Creates the Fresnel Processor object.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2"> Methods</bridgehead>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> OAT.Fresnel::addURL(url, callback)</bridgehead>
<para>Loads a Fresnel RDF template, located at <computeroutput>url</computeroutput>.
 After loading and parsing is complete,callback(without arguments) is executed.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> OAT.Fresnel::format(dataObject)</bridgehead>
<para>Formats an RDF data set using loaded template.
 The <computeroutput>dataObject</computeroutput> is an OAT RDF structure, usually a <computeroutput>store.data.all</computeroutput> property.
 This function returns an array with two values:</para>
<itemizedlist mark="bullet" spacing="compact"><listitem>[0] - an XML document, containing the transformed document, </listitem>
<listitem>[1] - array of CSS stylesheets, referenced in Fresnel template.</listitem>
</itemizedlist><bridgehead class="http://www.w3.org/1999/xhtml:h2"> Example</bridgehead>
<programlisting>var fresnel = new OAT.Fresnel();
var rdf = new OAT.RDFStore(); /* don&#39;t forget to load some RDF into the store... */

var loadedCallback = function() {
        var results = fresnel.format(rdf.data.all);
}
fresnel.addURL(&quot;myFresnelTemplate.n3&quot;);
</programlisting><para> <ulink url="CategoryDocumentation">CategoryDocumentation</ulink> <ulink url="CategoryOAT">CategoryOAT</ulink> <ulink url="CategoryOpenSource">CategoryOpenSource</ulink></para>
</section></docbook>