Skip to content

Commit

Permalink
fix att def in attribute classes (v3) #35
Browse files Browse the repository at this point in the history
  • Loading branch information
kepper committed Jul 7, 2018
1 parent 8d916c4 commit fec1694
Show file tree
Hide file tree
Showing 468 changed files with 11,446 additions and 470 deletions.
11 changes: 8 additions & 3 deletions tools/extractGuidelines.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<xsl:output indent="true" method="html" saxon:suppress-indentation="egx:egXML tei:classes tei:content tei:list tei:item"/>
<xsl:output indent="true" method="html" saxon:suppress-indentation="egx:egXML tei:classes tei:content tei:list tei:item" name="html" omit-xml-declaration="true"/>
<xsl:param name="version" select="'{{ site.baseurl }}/{{ page.version }}'" as="xs:string"/>
<xsl:param name="guidelines.version" select="'dev'" as="xs:string"/>
<xsl:param name="guidelines.version" select="'v3'" as="xs:string"/>
<xd:doc scope="component">
<xd:desc>
<xd:p>
Expand Down Expand Up @@ -1505,15 +1505,20 @@
<!-- get attributes derived from attribute classes -->
<xsl:sequence select="local:getAttributes($classSpec)"/>
</xsl:variable>
<xsl:variable name="attribute.names" select="distinct-values($attributes/descendant-or-self::span[@class = 'attribute']/string(text()))" as="xs:string*"/>

<xsl:variable name="attribute.names" select="distinct-values($attributes/descendant-or-self::span[@class = 'attribute']//string(text()))" as="xs:string*"/>

<xsl:message select="'ATT ' || $classSpec/@ident || ': ' || count($attributes) || ': ' || string-join($attribute.names,', ')"/>
<xsl:message select="$attributes"/>
<xsl:message select="'\n\n'"></xsl:message>

<xsl:for-each select="$attribute.names">
<xsl:sort select="." data-type="text"/>
<xsl:variable name="current.att" select="." as="xs:string"/>
<xsl:if test="count($attributes/descendant-or-self::div[span[@class='attribute']/text() = $current.att]) gt 1">
<xsl:message select="'INFO: attribute ' || $current.att || ' specified multiple times on class ' || $classSpec/@ident"/>
</xsl:if>
<xsl:sequence select="($attributes/descendant-or-self::div[span[@class='attribute']/text() = $current.att])[1]"/>
<xsl:sequence select="($attributes/descendant-or-self::div[span[@class='attribute']//text() = $current.att])[1]"/>
</xsl:for-each>

</td>
Expand Down
27 changes: 26 additions & 1 deletion v3/attribute-classes/att.accid.anl.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,32 @@ title: "att.accid.anl"
</tr>
<tr>
<td class="wovenodd-col1"><strong>Attributes</strong></td>
<td class="wovenodd-col2"></td>
<td class="wovenodd-col2">
<div class="attributeDef"><span class="attribute"><strong>@copyof</strong></span><span class="attributeUsage">(optional)</span><span class="attributeDesc">Points to an element of which the current element is a copy.</span>
Value conforms to <a class="link_odd_classSpec" href="{{ site.baseurl }}/{{ page.version }}/data-types/data.uri.html">data.URI</a>.
<span class="attributeClasses"><a class="link_odd" href="{{ site.baseurl }}/{{ page.version }}/attribute-classes/att.common.anl.html">att.common.anl</a></span></div>
<div class="attributeDef"><span class="attribute"><strong>@corresp</strong></span><span class="attributeUsage">(optional)</span><span class="attributeDesc">Used to point to other elements that correspond to this one in a generic
fashion.</span>
One or more values from <a class="link_odd_classSpec" href="{{ site.baseurl }}/{{ page.version }}/data-types/data.uri.html">data.URI</a>, separated by spaces.
<span class="attributeClasses"><a class="link_odd" href="{{ site.baseurl }}/{{ page.version }}/attribute-classes/att.common.anl.html">att.common.anl</a></span></div>
<div class="attributeDef"><span class="attribute"><strong>@next</strong></span><span class="attributeUsage">(optional)</span><span class="attributeDesc">Used to point to the next event(s) in a user-defined collection.</span>
One or more values from <a class="link_odd_classSpec" href="{{ site.baseurl }}/{{ page.version }}/data-types/data.uri.html">data.URI</a>, separated by spaces.
<span class="attributeClasses"><a class="link_odd" href="{{ site.baseurl }}/{{ page.version }}/attribute-classes/att.common.anl.html">att.common.anl</a></span></div>
<div class="attributeDef"><span class="attribute"><strong>@prev</strong></span><span class="attributeUsage">(optional)</span><span class="attributeDesc">Points to the previous event(s) in a user-defined collection.</span>
One or more values from <a class="link_odd_classSpec" href="{{ site.baseurl }}/{{ page.version }}/data-types/data.uri.html">data.URI</a>, separated by spaces.
<span class="attributeClasses"><a class="link_odd" href="{{ site.baseurl }}/{{ page.version }}/attribute-classes/att.common.anl.html">att.common.anl</a></span></div>
<div class="attributeDef"><span class="attribute"><strong>@sameas</strong></span><span class="attributeUsage">(optional)</span><span class="attributeDesc">Points to an element that is the same as the current element but is not a literal
copy of the current element.</span>
One or more values from <a class="link_odd_classSpec" href="{{ site.baseurl }}/{{ page.version }}/data-types/data.uri.html">data.URI</a>, separated by spaces.
<span class="attributeClasses"><a class="link_odd" href="{{ site.baseurl }}/{{ page.version }}/attribute-classes/att.common.anl.html">att.common.anl</a></span></div>
<div class="attributeDef"><span class="attribute"><strong>@synch</strong></span><span class="attributeUsage">(optional)</span><span class="attributeDesc">Points to elements that are synchronous with the current element.</span>
One or more values from <a class="link_odd_classSpec" href="{{ site.baseurl }}/{{ page.version }}/data-types/data.uri.html">data.URI</a>, separated by spaces.
<span class="attributeClasses"><a class="link_odd" href="{{ site.baseurl }}/{{ page.version }}/attribute-classes/att.common.anl.html">att.common.anl</a></span></div>
<div class="attributeDef"><span class="attribute"><strong>@when</strong></span><span class="attributeUsage">(optional)</span><span class="attributeDesc">Indicates the point of occurrence of this feature along a time line. Its value must
be the ID of a <a class="link_odd_elementSpec" href="{{ site.baseurl }}/{{ page.version }}/elements/when.html">when</a> element elsewhere in the document.</span>
Value conforms to <a class="link_odd_classSpec" href="{{ site.baseurl }}/{{ page.version }}/data-types/data.uri.html">data.URI</a>.
<span class="attributeClasses"><a class="link_odd" href="{{ site.baseurl }}/{{ page.version }}/attribute-classes/att.alignment.html">att.alignment</a></span></div>
</td>
</tr>
<tr>
<td class="wovenodd-col1"><strong>Declaration</strong></td>
Expand Down
6 changes: 5 additions & 1 deletion v3/attribute-classes/att.accid.ges.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ title: "att.accid.ges"
</tr>
<tr>
<td class="wovenodd-col1"><strong>Attributes</strong></td>
<td class="wovenodd-col2"></td>
<td class="wovenodd-col2">
<div class="attributeDef"><span class="attribute"><strong>@accid.ges</strong></span><span class="attributeUsage">(optional)</span><span class="attributeDesc">Records the performed pitch inflection.</span>
Value conforms to <a class="link_odd_classSpec" href="{{ site.baseurl }}/{{ page.version }}/data-types/data.accidental.implicit.html">data.ACCIDENTAL.IMPLICIT</a>.
<span class="attributeClasses"><a class="link_odd" href="{{ site.baseurl }}/{{ page.version }}/attribute-classes/att.accidental.performed.html">att.accidental.performed</a></span></div>
</td>
</tr>
<tr>
<td class="wovenodd-col1"><strong>Declaration</strong></td>
Expand Down
41 changes: 40 additions & 1 deletion v3/attribute-classes/att.accid.log.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,46 @@ title: "att.accid.log"
</tr>
<tr>
<td class="wovenodd-col1"><strong>Attributes</strong></td>
<td class="wovenodd-col2"></td>
<td class="wovenodd-col2">
<div class="attributeDef"><span class="attribute"><strong>@accid</strong></span><span class="attributeUsage">(optional)</span><span class="attributeDesc">Captures a written accidental.</span>
Value conforms to <a class="link_odd_classSpec" href="{{ site.baseurl }}/{{ page.version }}/data-types/data.accidental.explicit.html">data.ACCIDENTAL.EXPLICIT</a>.
<span class="attributeClasses"><a class="link_odd" href="{{ site.baseurl }}/{{ page.version }}/attribute-classes/att.accidental.html">att.accidental</a></span></div>
<div class="attributeDef"><span class="attribute"><strong>@evaluate</strong></span><span class="attributeUsage">(optional)</span><span class="attributeDesc">Specifies the intended meaning when a participant in a relationship is itself a
pointer.</span>
Allowed values are:
"<span style="font-weight: 500;">all</span>" <i>(If an element pointed to is itself a pointer, then the target of that pointer
will be taken, and so on, until an element is found which is not a pointer.)</i>, "<span style="font-weight: 500;">one</span>" <i>(If an element pointed to is itself a pointer, then its target (whether a pointer
or not) is taken as the target of this pointer.)</i>, "<span style="font-weight: 500;">none</span>" <i>(No further evaluation of targets is carried out beyond that needed to find the
element(s) specified in plist or target attribute.)</i><span class="attributeClasses"><a class="link_odd" href="{{ site.baseurl }}/{{ page.version }}/attribute-classes/att.targeteval.html">att.targeteval</a></span></div>
<div class="attributeDef"><span class="attribute"><strong>@func</strong></span><span class="attributeUsage">(optional)</span><span class="attributeDesc">Records the function of an accidental.</span>
Allowed values are:
"<span style="font-weight: 500;">caution</span>" <i>(Cautionary accidental.)</i>, "<span style="font-weight: 500;">edit</span>" <i>(Editorial accidental.)</i><span class="attributeClasses"><a class="link_odd" href="{{ site.baseurl }}/{{ page.version }}/attribute-classes/att.accid.log.html">att.accid.log</a></span></div>
<div class="attributeDef"><span class="attribute"><strong>@layer</strong></span><span class="attributeUsage">(optional)</span><span class="attributeDesc">Identifies the layer to which a feature applies.</span>
One or more values of datatype <span style="font-weight: 500;">positiveInteger</span>, separated by spaces.
<span class="attributeClasses"><a class="link_odd" href="{{ site.baseurl }}/{{ page.version }}/attribute-classes/att.layerident.html">att.layerident</a></span></div>
<div class="attributeDef"><span class="attribute"><strong>@plist</strong></span><span class="attributeUsage">(optional)</span><span class="attributeDesc">Contains a space separated list of references that identify active participants in
a
collection/relationship, such as notes under a phrase mark; that is, the entities
pointed "from".</span>
One or more values from <a class="link_odd_classSpec" href="{{ site.baseurl }}/{{ page.version }}/data-types/data.uri.html">data.URI</a>, separated by spaces.
<span class="attributeClasses"><a class="link_odd" href="{{ site.baseurl }}/{{ page.version }}/attribute-classes/att.plist.html">att.plist</a></span></div>
<div class="attributeDef"><span class="attribute"><strong>@staff</strong></span><span class="attributeUsage">(optional)</span><span class="attributeDesc">Signifies the staff on which a notated event occurs or to which a control event
applies. Mandatory when applicable.</span>
One or more values of datatype <span style="font-weight: 500;">positiveInteger</span>, separated by spaces.
<span class="attributeClasses"><a class="link_odd" href="{{ site.baseurl }}/{{ page.version }}/attribute-classes/att.staffident.html">att.staffident</a></span></div>
<div class="attributeDef"><span class="attribute"><strong>@tstamp</strong></span><span class="attributeUsage">(optional)</span><span class="attributeDesc">Encodes the onset time in terms of musical time, i.e.,
beats[.fractional_beat_part].</span>
Value conforms to <a class="link_odd_classSpec" href="{{ site.baseurl }}/{{ page.version }}/data-types/data.beat.html">data.BEAT</a>.
<span class="attributeClasses"><a class="link_odd" href="{{ site.baseurl }}/{{ page.version }}/attribute-classes/att.timestamp.musical.html">att.timestamp.musical</a></span></div>
<div class="attributeDef"><span class="attribute"><strong>@tstamp.ges</strong></span><span class="attributeUsage">(optional)</span><span class="attributeDesc">Captures performed onset time in several forms; that is, ppq (MIDI clicks and
MusicXML 'divisions'), Humdrum **recip values, beats, seconds, or mensural duration
values.</span>
Value conforms to <a class="link_odd_classSpec" href="{{ site.baseurl }}/{{ page.version }}/data-types/data.duration.gestural.html">data.DURATION.gestural</a>.
<span class="attributeClasses"><a class="link_odd" href="{{ site.baseurl }}/{{ page.version }}/attribute-classes/att.timestamp.performed.html">att.timestamp.performed</a></span></div>
<div class="attributeDef"><span class="attribute"><strong>@tstamp.real</strong></span><span class="attributeUsage">(optional)</span><span class="attributeDesc">Used to record the onset time in terms of ISO time.</span>
Value conforms to <a class="link_odd_classSpec" href="{{ site.baseurl }}/{{ page.version }}/data-types/data.isotime.html">data.ISOTIME</a>.
<span class="attributeClasses"><a class="link_odd" href="{{ site.baseurl }}/{{ page.version }}/attribute-classes/att.timestamp.performed.html">att.timestamp.performed</a></span></div>
</td>
</tr>
<tr>
<td class="wovenodd-col1"><strong>Declaration</strong></td>
Expand Down
Loading

0 comments on commit fec1694

Please sign in to comment.