- From: Shane McCarron via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 22 Feb 2010 23:15:38 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2009/dap/ReSpec.js
In directory hutz:/tmp/cvs-serv30928
Modified Files:
documentation.html template.html
Log Message:
Added subtitle parameter for spec subtitle support
Changed title handling so it emits an id and class of title
Added copyrightStart parameter for copyright range support
Added support for data-include and data-oninclude
Index: documentation.html
===================================================================
RCS file: /sources/public/2009/dap/ReSpec.js/documentation.html,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- documentation.html 30 Dec 2009 17:03:11 -0000 1.32
+++ documentation.html 22 Feb 2010 23:15:36 -0000 1.33
@@ -221,6 +221,17 @@
that short names are assigned by the Director — ask your Team contact or Chair in advance of
publication.
</dd>
+ <dt>subtitle</dt>
+ <dd>
+ W3C specifications have an optional subtitle that is displayed
+ below the title in the heading section. Define yours here if you have
+ one.
+ </dd>
+ <dt>copyrightStart</dt>
+ <dd>
+ Some W3C specifications have a copyright that spans a range of years.
+ You can specify the optional starting year with this parameter.
+ </dd>
<dt>publishDate</dt>
<dd>
When a draft is made ready for publication it is often done several days in advance. In that
@@ -521,7 +532,7 @@
</p>
<p>If the <code>refNote</code> parameter is defined then a paragraph will be
created in the References section with the content of that
- parameter, as noted in the Configuration section.
+ parameter, as noted in the Configuration section.</p>
</section>
<section>
@@ -539,6 +550,42 @@
such as DAHUT come from the rest of the content.
</p>
</section>
+
+ <section>
+ <h2>Including other data</h2>
+ <p>
+ Sometimes a specification will need to incorporate data that is best kept in
+ an external file (e.g., an XML Schema implementation of the datatypes would be in an
+ '.xsd' file, but should also be in-line in the spec). <a>ReSpec</a> permits this
+ by allowing inclusion of arbitrary external data and also allowing optional
+ transformation of that data.
+ </p>
+ <p>
+ To reference an external resource, define the resource via the <code>data-include</code>
+ attribute (e.g., <code><div data-include='myDatatypes.xsd'></div></code> ).
+ The contents of the element with that attribute will be replaced with the data read from
+ the file.
+ </p>
+ <p>
+ To perform one or more transformations on the contents before they are placed in
+ the document, specify the names of transformation methods via the <code>data-oninclude</code>
+ attribute (e.g., <code><div data-include='myDatatypes.xsd' data-oninclude='updateSchema'></div></code> ).
+ Each whitespace separated method named will be called and passed
+ two parameters: the <code>berjon.respec</code> object and the contents of the
+ resource retrieved.
+ </p>
+ <p>
+ Here's a simple transformation method:
+ </p>
+ <pre class='example'>
+function updateExample(doc, content) {
+ // perform transformations to make it render and prettier
+ return '<pre class="example">' + doc._esc(content) + '</pre>';
+}
+ </pre>
+</section>
+
+
<section>
<h2>WebIDL Support</h2>
@@ -775,7 +822,14 @@
<li>
2009-12-30 - added additionalCopyrightHolders, to add other
copyright holders in addition to W3. (fjh)
- </li>
+ </li>
+ <li>2010-02-19 - added copyrightStart, subtitle, and changed
+ so the title and subtitle elements are emitted with
+ ids. (spm)
+ </li>
+ <li>2010-02-22 - added handling for data-include and data-oninclude
+ attributes. (spm)
+ </li>
</ul>
</section>
Index: template.html
===================================================================
RCS file: /sources/public/2009/dap/ReSpec.js/template.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- template.html 12 Nov 2009 17:24:28 -0000 1.6
+++ template.html 22 Feb 2010 23:15:36 -0000 1.7
@@ -17,9 +17,17 @@
// the specification's short name, as in http://www.w3.org/TR/short-name/
shortName: "xxx-xxx",
+ // if your specification has a subtitle that goes below the main
+ // formal title, define it here
+ // subtitle : "an excellent document",
+
// if you wish the publication date to be other than today, set this
// publishDate: "2009-08-06",
+ // if the specification's copyright date is a range of years, specify
+ // the start date here:
+ // copyrightStart: "2005"
+
// if there is a previously published draft, uncomment this and set its YYYY-MM-DD date
// and its maturity status
// previousPublishDate: "1977-03-15",
Received on Monday, 22 February 2010 23:15:40 UTC