Skip to content

Commit

Permalink
adds a desc prefix to desc .txts (music-encoding#105)
Browse files Browse the repository at this point in the history
this tries to avoid the forbidden "con.txt" filename on Windows -> it will be desc_con.txt now. This hasn't been tested locally yet, though.
  • Loading branch information
kepper committed Jun 1, 2019
1 parent dc763ff commit ec01bae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions _includes/desc-item
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
{% endif %}
</div>
<div class="tile-subtitle text-gray">
{% assign file = include.version | append:'/desc/' | append:include.elem | append:'.txt' | downcase %}
{% assign file = include.version | append:'/desc/desc_' | append:include.elem | append:'.txt' | downcase %}
{% if include.att %}
{% assign file = include.version | append:'/desc/' | append:include.att | append:'.txt' | downcase %}
{% assign file = include.version | append:'/desc/desc_' | append:include.att | append:'.txt' | downcase %}
{% endif %}
{% include {{ file | replace: ':', '---' }} %}</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions tools/extractGuidelines.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@
<xsl:variable name="object" select="."/>

<!-- create desc snippet in _includes for inclusion in guidelines -->
<xsl:variable name="path" select="$includes.folder || 'desc/' || @ident || '.txt'" as="xs:string"/>
<xsl:variable name="path" select="$includes.folder || 'desc/desc_' || @ident || '.txt'" as="xs:string"/>
<xsl:result-document href="{lower-case($path)}" omit-xml-declaration="yes">
<xsl:apply-templates select="./tei:desc/node()" mode="plain"/>
</xsl:result-document>

<!-- create desc snippets in _includes for all directly defined attributes -->
<xsl:for-each select=".//tei:attDef">
<xsl:variable name="path" select="$includes.folder || 'desc/' || $object/@ident || '/' || replace(@ident,':','---') || '.txt'" as="xs:string"/>
<xsl:variable name="path" select="$includes.folder || 'desc/' || $object/@ident || '/desc_' || replace(@ident,':','---') || '.txt'" as="xs:string"/>
<xsl:result-document href="{lower-case($path)}" omit-xml-declaration="yes">
<xsl:apply-templates select="./tei:desc/node()" mode="plain"/>
</xsl:result-document>
Expand Down

0 comments on commit ec01bae

Please sign in to comment.