[html5] r3112 - [t] (0) Not particularly great bibtex serialisation. If anyone knows of improvem [...]
whatwg at whatwg.org
whatwg at whatwg.org
Sun May 17 23:18:45 PDT 2009
Author: ianh
Date: 2009-05-17 23:18:43 -0700 (Sun, 17 May 2009)
New Revision: 3112
Modified:
index
source
Log:
[t] (0) Not particularly great bibtex serialisation. If anyone knows of improvements that could be made here, please let me know.
Modified: index
===================================================================
--- index 2009-05-16 11:26:48 UTC (rev 3111)
+++ index 2009-05-18 06:18:43 UTC (rev 3112)
@@ -39,7 +39,7 @@
<div class=head>
<p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<h1>HTML 5</h1>
- <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 16 May 2009</h2>
+ <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 18 May 2009</h2>
<p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<dl><dt>Multiple-page version:</dt>
@@ -43243,24 +43243,33 @@
<dd>
- <p>Gives the name of an author of the work cited by the
+ <p>Gives the name of the authors of the work cited by the
bibliographic entry.</p>
<p>The <a href=#concept-property-value title=concept-property-value>value</a> must be
text.</p>
- <p>Any number of properties with the name <code title=md-bibtex-author><a href=#md-bibtex-author>author</a></code> may be present within each
+ <!-- which should be a list of names, separated by "and", with the
+ weird BibTeX names form:
+ First last-prefix Last
+ last-prefix Last, First
+ last-prefix Last, last-suffix, First
+ http://artis.inrialpes.fr/~Xavier.Decoret/resources/xdkbibtex/bibtex_summary.html#names
+ ...and with "others" as the last name if there's more than listed. -->
+
+ <p>A single property with the name <code title=md-bibtex-author><a href=#md-bibtex-author>author</a></code> may be present within each
<a href=#concept-item title=concept-item>item</a> with the type <code title=md-bibtex><a href=#md-bibtex>bibtex</a></code>. When such an <a href=#concept-item title=concept-item>item</a> has an <code title=md-bibtex-entrytype><a href=#md-bibtex-entrytype>entrytype</a></code> property whose value
is one of <code title=md-bibtex-entrytype-article><a href=#md-bibtex-entrytype-article>article</a></code>, <code title=md-bibtex-entrytype-incollection><a href=#md-bibtex-entrytype-incollection>incollection</a></code>,
<code title=md-bibtex-entrytype-inproceedings><a href=#md-bibtex-entrytype-inproceedings>inproceedings</a></code>,
<code title=md-bibtex-entrytype-mastersthesis><a href=#md-bibtex-entrytype-mastersthesis>mastersthesis</a></code>,
<code title=md-bibtex-entrytype-phdthesis><a href=#md-bibtex-entrytype-phdthesis>phdthesis</a></code>,
- <code title=md-bibtex-entrytype-techreport><a href=#md-bibtex-entrytype-techreport>techreport</a></code>,
- or <code title=md-bibtex-entrytype-unpublished><a href=#md-bibtex-entrytype-unpublished>unpublished</a></code>, or
- when such an <a href=#concept-item title=concept-item>item</a> has an <code title=md-bibtex-entrytype><a href=#md-bibtex-entrytype>entrytype</a></code> property whose value
- is one of <code title=md-bibtex-entrytype-book><a href=#md-bibtex-entrytype-book>book</a></code> or
- <code title=md-bibtex-entrytype-inbook><a href=#md-bibtex-entrytype-inbook>inbook</a></code> and has no
- property with the name <code title=md-bibtex-editor><a href=#md-bibtex-editor>editor</a></code>, at least one property with
+ <code title=md-bibtex-entrytype-techreport><a href=#md-bibtex-entrytype-techreport>techreport</a></code>, or
+ <code title=md-bibtex-entrytype-unpublished><a href=#md-bibtex-entrytype-unpublished>unpublished</a></code>,
+ or when such an <a href=#concept-item title=concept-item>item</a> has an
+ <code title=md-bibtex-entrytype><a href=#md-bibtex-entrytype>entrytype</a></code> property whose
+ value is one of <code title=md-bibtex-entrytype-book><a href=#md-bibtex-entrytype-book>book</a></code>
+ or <code title=md-bibtex-entrytype-inbook><a href=#md-bibtex-entrytype-inbook>inbook</a></code> and has
+ no property with the name <code title=md-bibtex-editor><a href=#md-bibtex-editor>editor</a></code>, at least one property with
the name <code title=md-bibtex-author><a href=#md-bibtex-author>author</a></code> must be
present within the <a href=#concept-item title=concept-item>item</a>.</p>
@@ -43330,13 +43339,15 @@
<dd>
- <p>Gives the name of an editor of the work cited by the
+ <p>Gives the name of the editors of the work cited by the
bibliographic entry.</p>
<p>The <a href=#concept-property-value title=concept-property-value>value</a> must be
text.</p>
- <p>Any number of properties with the name <code title=md-bibtex-editor><a href=#md-bibtex-editor>editor</a></code> may be present within each
+ <!-- see note at "author" -->
+
+ <p>A single property with the name <code title=md-bibtex-editor><a href=#md-bibtex-editor>editor</a></code> may be present within each
<a href=#concept-item title=concept-item>item</a> with the type <code title=md-bibtex><a href=#md-bibtex>bibtex</a></code>. When such an <a href=#concept-item title=concept-item>item</a> has an <code title=md-bibtex-entrytype><a href=#md-bibtex-entrytype>entrytype</a></code> property whose value
is one of <code title=md-bibtex-entrytype-book><a href=#md-bibtex-entrytype-book>book</a></code> or
<code title=md-bibtex-entrytype-inbook><a href=#md-bibtex-entrytype-inbook>inbook</a></code> and has no
@@ -44918,13 +44929,94 @@
<h4 id=bibtex-0><span class=secno>5.5.5 </span>BibTeX</h4>
- <p class=XXX>...</p>
+ <p>Given a node <var title="">node</var> in a <code>Document</code>,
+ a user agent must run the following algorithm to extract any <code title=md-bibtex><a href=#md-bibtex>bibtex</a></code> data represented by that node into a
+ form that vaguely resembles the format used by BibTeX
+ processors:</p>
+ <ol><li>
+ <p>If <var title="">node</var> is not an element that is an <a href=#concept-item title=concept-item>item</a> with the type <code title=md-bibtex><a href=#md-bibtex>bibtex</a></code>, then run these substeps:</p>
+ <ol><li><p>If <var title="">node</var> has no parent, then there is
+ no event to output. Abort the algorithm, returning
+ nothing.</li>
- <h2 id=browsers><span class=secno>6 </span>Web browsers</h2>
+ <li><p>Let <var title="">node</var> be <var title="">node</var>'s
+ parent.</li>
+ <li><p>Restart the entire algorithm with the new value of <var title="">node</var>.</li>
+
+ </ol></li>
+
+ <li><p>Let <var title="">output</var> be an empty string.</li>
+
+ <li><p>Append a U+0040 COMMERCIAL AT character (@) to <var title="">output</var>.</li>
+
+ <li><p>Append the <a href=#concept-property-value title=concept-property-value>value</a>
+ of the first property named <code title=mb-bibtex-entrytype>entrytype</code> whose <a href=#concept-item-corresponding title=concept-item-corresponding>corresponding item</a> is
+ <var title="">node</var> if that <a href=#concept-property-value title=concept-property-value>value</a> is not itself an <a href=#concept-item title=concept-item>item</a>.</li>
+
+ <li><p>Append a U+007B LEFT CURLY BRACKET character ({) to <var title="">output</var>.</li>
+
+ <li><p>Append the <a href=#concept-property-value title=concept-property-value>value</a>
+ of the first property named <code title=mb-bibtex-bibtex-id>bibtex-id</code> whose <a href=#concept-item-corresponding title=concept-item-corresponding>corresponding item</a> is
+ <var title="">node</var> if that <a href=#concept-property-value title=concept-property-value>value</a> is not itself an <a href=#concept-item title=concept-item>item</a>.</li>
+
+ <li><p>Append a U+002C COMMA character (,) and a U+000A LINE FEED
+ (LF) character to <var title="">output</var>.</li>
+
+ <li>
+
+ <p>For each element <var title="">element</var> that has one or
+ more <a href=#property-names>property names</a> and whose <a href=#concept-item-corresponding title=concept-item-corresponding>corresponding item</a> is
+ <var title="">node</var>: for each name <var title="">name</var>
+ in <var title="">element</var>'s <a href=#property-names>property names</a>, run
+ the appropriate set of substeps from the following list:</p>
+
+ <ol><li><p>If <var title="">name</var> is equal to the string "<code title=md-about><a href=#md-about>about</a></code>", "<code title=md-bibtex-entrytype><a href=#md-bibtex-entrytype>entrytype</a></code>", or "<code title=md-bibtex-bibtex-id><a href=#md-bibtex-bibtex-id>bibtex-id</a></code>", skip this
+ name.</li>
+
+ <li><p>If <var title="">name</var> contains either a U+003A COLON
+ character (:) or a U+002E FULL STOP character (.), skip this
+ name.</li>
+
+ <li><p>If the <a href=#concept-property-value title=concept-property-value>value</a>
+ of the property is itself an <a href=#concept-item title=concept-item>item</a>, then skip this
+ property.</li>
+
+ <li><p>Append two U+0020 SPACE characters to <var title="">output</var>.</li>
+
+ <li><p>Append <var title="">name</var></p> to var
+ title="">output.</li>
+
+ <li><p>Append a U+0020 SPACE character, a U+003D EQUALS SIGN
+ character (=), and another U+0020 SPACE character to <var title="">output</var>.</li>
+
+ <li><p>Let <var title="">value</var> be the <a href=#concept-property-value title=concept-property-value>value</a> of the
+ property.</li>
+
+ <li><p>Replace all occurrences of the U+0022 QUOTATION MARK
+ character (") in <var title="">value</var> with the
+ three-character sequence "<code title="">{"}</code>" (U+007B LEFT
+ CURLY BRACKET, U+0022 QUOTATION MARK, U+007D RIGHT CURLY
+ BRACKET).</li>
+
+ <li><p>Append a U+0022 QUOTATION MARK character (") to <var title="">output</var>.</li>
+
+ <li><p>Append <var title="">value</var> to <var title="">output</var>.</li>
+
+ <li><p>Append a U+0022 QUOTATION MARK character (") to <var title="">output</var>.</li>
+
+ <li><p>Append a U+002C COMMA character (,) and a U+000A LINE FEED
+ (LF) character to <var title="">output</var>.</li>
+
+ </ol></li>
+
+ <li><p>Append aU+007D RIGHT CURLY BRACKET character (}) to <var title="">output</var>.</li>
+
+ </ol><h2 id=browsers><span class=secno>6 </span>Web browsers</h2>
+
<div class=impl>
<p>This section describes features that apply most directly to Web
Modified: source
===================================================================
--- source 2009-05-16 11:26:48 UTC (rev 3111)
+++ source 2009-05-18 06:18:43 UTC (rev 3112)
@@ -48888,13 +48888,21 @@
<dd>
- <p>Gives the name of an author of the work cited by the
+ <p>Gives the name of the authors of the work cited by the
bibliographic entry.</p>
<p>The <span title="concept-property-value">value</span> must be
text.</p>
- <p>Any number of properties with the name <code
+ <!-- which should be a list of names, separated by "and", with the
+ weird BibTeX names form:
+ First last-prefix Last
+ last-prefix Last, First
+ last-prefix Last, last-suffix, First
+ http://artis.inrialpes.fr/~Xavier.Decoret/resources/xdkbibtex/bibtex_summary.html#names
+ ...and with "others" as the last name if there's more than listed. -->
+
+ <p>A single property with the name <code
title="md-bibtex-author">author</code> may be present within each
<span title="concept-item">item</span> with the type <code
title="md-bibtex">bibtex</code>. When such an <span
@@ -48908,14 +48916,13 @@
<code
title="md-bibtex-entrytype-mastersthesis">mastersthesis</code>,
<code title="md-bibtex-entrytype-phdthesis">phdthesis</code>,
- <code title="md-bibtex-entrytype-techreport">techreport</code>,
- or <code
- title="md-bibtex-entrytype-unpublished">unpublished</code>, or
- when such an <span title="concept-item">item</span> has an <code
- title="md-bibtex-entrytype">entrytype</code> property whose value
- is one of <code title="md-bibtex-entrytype-book">book</code> or
- <code title="md-bibtex-entrytype-inbook">inbook</code> and has no
- property with the name <code
+ <code title="md-bibtex-entrytype-techreport">techreport</code>, or
+ <code title="md-bibtex-entrytype-unpublished">unpublished</code>,
+ or when such an <span title="concept-item">item</span> has an
+ <code title="md-bibtex-entrytype">entrytype</code> property whose
+ value is one of <code title="md-bibtex-entrytype-book">book</code>
+ or <code title="md-bibtex-entrytype-inbook">inbook</code> and has
+ no property with the name <code
title="md-bibtex-editor">editor</code>, at least one property with
the name <code title="md-bibtex-author">author</code> must be
present within the <span title="concept-item">item</span>.</p>
@@ -49000,13 +49007,15 @@
<dd>
- <p>Gives the name of an editor of the work cited by the
+ <p>Gives the name of the editors of the work cited by the
bibliographic entry.</p>
<p>The <span title="concept-property-value">value</span> must be
text.</p>
- <p>Any number of properties with the name <code
+ <!-- see note at "author" -->
+
+ <p>A single property with the name <code
title="md-bibtex-editor">editor</code> may be present within each
<span title="concept-item">item</span> with the type <code
title="md-bibtex">bibtex</code>. When such an <span
@@ -51106,11 +51115,133 @@
<h4>BibTeX</h4>
- <p class="XXX">...</p>
+ <p>Given a node <var title="">node</var> in a <code>Document</code>,
+ a user agent must run the following algorithm to extract any <code
+ title="md-bibtex">bibtex</code> data represented by that node into a
+ form that vaguely resembles the format used by BibTeX
+ processors:</p>
+ <ol>
+ <li>
+ <p>If <var title="">node</var> is not an element that is an <span
+ title="concept-item">item</span> with the type <code
+ title="md-bibtex">bibtex</code>, then run these substeps:</p>
+ <ol>
+
+ <li><p>If <var title="">node</var> has no parent, then there is
+ no event to output. Abort the algorithm, returning
+ nothing.</p></li>
+
+ <li><p>Let <var title="">node</var> be <var title="">node</var>'s
+ parent.</p></li>
+
+ <li><p>Restart the entire algorithm with the new value of <var
+ title="">node</var>.</p></li>
+
+ </ol>
+
+ </li>
+
+ <li><p>Let <var title="">output</var> be an empty string.</p></li>
+
+ <li><p>Append a U+0040 COMMERCIAL AT character (@) to <var
+ title="">output</var>.</p></li>
+
+ <li><p>Append the <span title="concept-property-value">value</span>
+ of the first property named <code
+ title="mb-bibtex-entrytype">entrytype</code> whose <span
+ title="concept-item-corresponding">corresponding item</span> is
+ <var title="">node</var> if that <span
+ title="concept-property-value">value</span> is not itself an <span
+ title="concept-item">item</span>.</p></li>
+
+ <li><p>Append a U+007B LEFT CURLY BRACKET character ({) to <var
+ title="">output</var>.</p></li>
+
+ <li><p>Append the <span title="concept-property-value">value</span>
+ of the first property named <code
+ title="mb-bibtex-bibtex-id">bibtex-id</code> whose <span
+ title="concept-item-corresponding">corresponding item</span> is
+ <var title="">node</var> if that <span
+ title="concept-property-value">value</span> is not itself an <span
+ title="concept-item">item</span>.</p></li>
+
+ <li><p>Append a U+002C COMMA character (,) and a U+000A LINE FEED
+ (LF) character to <var title="">output</var>.</p></li>
+
+ <li>
+
+ <p>For each element <var title="">element</var> that has one or
+ more <span>property names</span> and whose <span
+ title="concept-item-corresponding">corresponding item</span> is
+ <var title="">node</var>: for each name <var title="">name</var>
+ in <var title="">element</var>'s <span>property names</span>, run
+ the appropriate set of substeps from the following list:</p>
+
+ <ol>
+
+ <li><p>If <var title="">name</var> is equal to the string "<code
+ title="md-about">about</code>", "<code
+ title="md-bibtex-entrytype">entrytype</code>", or "<code
+ title="md-bibtex-bibtex-id">bibtex-id</code>", skip this
+ name.</p></li>
+
+ <li><p>If <var title="">name</var> contains either a U+003A COLON
+ character (:) or a U+002E FULL STOP character (.), skip this
+ name.</p></li>
+
+ <li><p>If the <span title="concept-property-value">value</span>
+ of the property is itself an <span
+ title="concept-item">item</span>, then skip this
+ property.</p></li>
+
+ <li><p>Append two U+0020 SPACE characters to <var
+ title="">output</var>.</p></li>
+
+ <li><p>Append <var title="">name</var></p> to var
+ title="">output</var>.</li>
+
+ <li><p>Append a U+0020 SPACE character, a U+003D EQUALS SIGN
+ character (=), and another U+0020 SPACE character to <var
+ title="">output</var>.</p></li>
+
+ <li><p>Let <var title="">value</var> be the <span
+ title="concept-property-value">value</span> of the
+ property.</p></li>
+
+ <li><p>Replace all occurrences of the U+0022 QUOTATION MARK
+ character (") in <var title="">value</var> with the
+ three-character sequence "<code title="">{"}</code>" (U+007B LEFT
+ CURLY BRACKET, U+0022 QUOTATION MARK, U+007D RIGHT CURLY
+ BRACKET).</p></li>
+
+ <li><p>Append a U+0022 QUOTATION MARK character (") to <var
+ title="">output</var>.</p></li>
+
+ <li><p>Append <var title="">value</var> to <var
+ title="">output</var>.</p></li>
+
+ <li><p>Append a U+0022 QUOTATION MARK character (") to <var
+ title="">output</var>.</p></li>
+
+ <li><p>Append a U+002C COMMA character (,) and a U+000A LINE FEED
+ (LF) character to <var title="">output</var>.</p></li>
+
+ </ol>
+
+ </li>
+
+ <li><p>Append aU+007D RIGHT CURLY BRACKET character (}) to <var
+ title="">output</var>.</p></li>
+
+ </ol>
+
+
+
+
<h2 id="browsers">Web browsers</h2>
<div class="impl">
More information about the Commit-Watchers
mailing list