Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge changes from a11y to main #3

Open
wants to merge 48 commits into
base: a11y
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
acaf056
Merge pull request #1 from transpect/a11y
polypunkt Oct 21, 2024
c8c46d5
reverted changes from a11y branch
polypunkt Oct 21, 2024
a1a60c7
merged a11y branch to main (adding paragraph tagging mainly)
polypunkt Oct 21, 2024
ba0182a
remove parameter duplicates from merge
mkraetke Oct 21, 2024
835c7e0
corrected legend structuring
polypunkt Oct 22, 2024
1751283
para structuring splittet in seperate <text>
fr4nze Oct 23, 2024
7028f7c
omit punctuation before hebrew, https://redmine.le-tex.de/issues/17708
polypunkt Oct 28, 2024
e2ab99d
map <url/> to <bibliosouce/> in references
mkraetke Nov 7, 2024
60305b5
processed pagebreak, https://redmine.le-tex.de/issues/17778
polypunkt Nov 12, 2024
edf7fcb
better para tagging fpr a11y
polypunkt Nov 12, 2024
cf64b9f
create tpBMTitle and number also if language is set, https://redmine.…
polypunkt Nov 12, 2024
bd76bb4
add underline, https://redmine.le-tex.de/issues/17777
polypunkt Nov 13, 2024
3476bbf
minor: removed debug comment
polypunkt Nov 18, 2024
212ee77
consider katexmap, https://redmine.le-tex.de/issues/17852
polypunkt Nov 25, 2024
e6394dc
handle figure-alt text
fr4nze Nov 27, 2024
508fc7c
move variables to shared-variables.xsl
mkraetke Dec 6, 2024
d957afb
https://redmine.le-tex.de/issues/17953
mkraetke Dec 7, 2024
5d53fed
add hub with inserted metadate instead of meta file
polypunkt Dec 9, 2024
ac51d42
https://redmine.le-tex.de/issues/17881 repair static index
mkraetke Dec 10, 2024
5cb7810
add main for main lang
fr4nze Dec 11, 2024
76f7bdb
dissolve info/biblioset if elements are handled before (to prevent em…
fr4nze Dec 11, 2024
bd6667a
replaced no longer available hub:heading-general-main-regex
polypunkt Dec 12, 2024
43cfa2f
https://redmine.le-tex.de/issues/17908 dialogue
mkraetke Dec 12, 2024
49d7042
dissolve links with spaces (would cause problems in a11y PDFs), https…
polypunkt Dec 16, 2024
828d2a8
tag paras in bibitem, https://redmine.le-tex.de/issues/17969#note-1
polypunkt Dec 16, 2024
4afb613
don't dissolve titleabbrev (if needed, better add to project)
fr4nze Dec 16, 2024
e68a8c3
add function to override newpage creation. don't create newpage at sp…
fr4nze Dec 17, 2024
ddfb887
ally struct for tpQuoteText
fr4nze Dec 18, 2024
5f478fb
add makro slash also before lower case letters, https://redmine.le-te…
polypunkt Dec 20, 2024
97a5b47
restored former behaviour of slash insertion
polypunkt Dec 23, 2024
7133e7a
corrected slash regex
polypunkt Jan 6, 2025
2ee1a97
add var expand-lang-from-style to prevent lang extraction from style
fr4nze Jan 7, 2025
9200b86
move style definition to shared variables, replace ts prefix
mkraetke Jan 9, 2025
336a081
https://redmine.le-tex.de/issues/17908 rewrite dialogue handling for …
mkraetke Jan 13, 2025
c64069d
https://redmine.le-tex.de/issues/17908 minor fixes to maintain compat…
mkraetke Jan 14, 2025
94cf6b8
https://redmine.le-tex.de/issues/17908 markup speaker only if delimit…
mkraetke Jan 14, 2025
2c57f83
https://redmine.le-tex.de/issues/16237 process other markup in no-hyp…
mkraetke Jan 14, 2025
20b983b
https://redmine.le-tex.de/issues/17908 make code more concise, fix is…
mkraetke Jan 14, 2025
5115cad
figure filename fixed when inline markup is used
fr4nze Jan 16, 2025
c246a04
consider bold/italic phrases generated by style name for index term i…
polypunkt Jan 17, 2025
db4df45
corrected former commit
polypunkt Jan 17, 2025
4354b12
added italic to previous commit and restored hyphenation behaviour
polypunkt Jan 17, 2025
faa7f24
https://redmine.le-tex.de/issues/17908 fix issue where speaker was fo…
mkraetke Jan 20, 2025
202331b
https://redmine.le-tex.de/issues/17908 make dialogue regex more flexible
mkraetke Jan 21, 2025
0ae1b95
handle paras with pi in index, assume that tabs divides indexterm and…
fr4nze Jan 23, 2025
e337648
https://redmine.le-tex.de/issues/17908 tr:insert-delimiter() as function
mkraetke Jan 23, 2025
2d7ea50
revert last change, maybe specifiy allowed PIs in the future?
fr4nze Jan 23, 2025
a62dd9f
remove obsolete message from 2d7ea50758315b54c12843f2aadd7b6c8257a9d6
mkraetke Jan 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
https://redmine.le-tex.de/issues/17908 fix issue where speaker was fo…
…rmatted, make dialogue regex more flexible
  • Loading branch information
mkraetke committed Jan 20, 2025
commit faa7f2437bf11d26792721a0385d521dc326e8f4
54 changes: 31 additions & 23 deletions evolve-hub/driver-docx.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -164,19 +164,18 @@
</xsl:copy>
</xsl:template>

<xsl:template match="*[not(self::blockquote)][para[matches(@role, concat($hub:blockquote-role-regex,'|',$hub:blockquote-source-role-regex))]]"
<xsl:template match="*[not(self::blockquote)][para[matches(@role, concat($hub:blockquote-role-regex,'|',$hub:blockquote-source-role-regex), 'i')]]"
name="build-blockquotes"
mode="hub:blockquotes" xmlns="http://docbook.org/ns/docbook">
<xsl:param name="wrapper-element-name" select="name()" as="xs:string" tunnel="no"/>
<xsl:element name="{$wrapper-element-name}">
<xsl:apply-templates select="@*" mode="#current"/>
<xsl:for-each-group select="*|processing-instruction()" group-adjacent="self::para[matches(@role, concat($hub:blockquote-role-regex,'|',$hub:blockquote-source-role-regex))]
or
self::processing-instruction()[preceding-sibling::*[1][self::para[matches(@role, concat($hub:blockquote-role-regex,'|',$hub:blockquote-source-role-regex))]]
and
following-sibling::*[1][self::para[matches(@role, concat($hub:blockquote-role-regex,'|',$hub:blockquote-source-role-regex))]]]">


<xsl:for-each-group select="*|processing-instruction()"
group-adjacent="self::para[matches(@role, concat($hub:blockquote-role-regex,'|',$hub:blockquote-source-role-regex), 'i')]
or
self::processing-instruction()[preceding-sibling::*[1][self::para[matches(@role, concat($hub:blockquote-role-regex,'|',$hub:blockquote-source-role-regex), 'i')]]
and
following-sibling::*[1][self::para[matches(@role, concat($hub:blockquote-role-regex,'|',$hub:blockquote-source-role-regex), 'i')]]]">
<!-- all blockquote paras -->
<xsl:choose>
<xsl:when test="current-grouping-key()">
Expand All @@ -185,14 +184,14 @@
= substring(preceding-sibling::*[1][self::para]/@role, 1, 6))]
[normalize-space()]
or
self::para[matches(@role,$hub:blockquote-role-regex)]
[preceding-sibling::*[1][self::para[matches(@role,$hub:blockquote-source-role-regex)]]]
self::para[matches(@role,$hub:blockquote-role-regex, 'i')]
[preceding-sibling::*[1][self::para[matches(@role, $hub:blockquote-source-role-regex, 'i')]]]
]">
<xsl:variable name="blockquote-source" as="element(dbk:para)*" select="current-group()[matches(@role, $hub:blockquote-source-role-regex)]"/>
<xsl:variable name="blockquote-source" as="element(dbk:para)*" select="current-group()[matches(@role, $hub:blockquote-source-role-regex, 'i')]"/>
<!-- splitted in different blockquote-types: '^([a-z]{1,3}motto|[a-z]{1,3}dialogue|[a-z]{1,3}quotation)$' -->
<xsl:element name="blockquote">
<xsl:apply-templates select="current-group()[matches(@role, $hub:blockquote-role-regex)][1]/@role" mode="#current"/>
<xsl:if test="current-group()[1]/preceding-sibling::*[1]/self::para[matches(@role, $hub:blockquote-heading-role-regex)]">
<xsl:apply-templates select="current-group()[matches(@role, $hub:blockquote-role-regex, 'i')][1]/@role" mode="#current"/>
<xsl:if test="current-group()[1]/preceding-sibling::*[1]/self::para[matches(@role, $hub:blockquote-heading-role-regex, 'i')]">
<title>
<xsl:apply-templates select="current-group()[1]/preceding-sibling::node()[1]/node()" mode="#current"/>
</title>
Expand All @@ -202,7 +201,7 @@
<xsl:apply-templates select="$blockquote-source/@*, $blockquote-source/node()" mode="#current"/>
</attribution>
</xsl:if>
<xsl:apply-templates select="current-group()[not(matches(@role, $hub:blockquote-source-role-regex))]
<xsl:apply-templates select="current-group()[not(matches(@role, $hub:blockquote-source-role-regex, 'i'))]
[normalize-space() or processing-instruction()]" mode="#current"/>
</xsl:element>
</xsl:for-each-group>
Expand Down Expand Up @@ -1096,15 +1095,18 @@
* dialogue
* -->

<xsl:template match="blockquote[para[matches(@role, $dialogue-role-regex)]]/para/text()[matches(., $dialogue-speaker-delimiter-regex)][1]" mode="hub:clean-hub">
<xsl:analyze-string select="." regex="{$dialogue-speaker-delimiter-regex}">
<xsl:matching-substring>
<delimiter char="{.}"/>
</xsl:matching-substring>
<xsl:non-matching-substring>
<xsl:value-of select="."/>
</xsl:non-matching-substring>
</xsl:analyze-string>
<xsl:template match="blockquote[para[matches(@role, $dialogue-role-regex)]]/para/node()[matches(., $dialogue-speaker-delimiter-regex)][1]" mode="hub:clean-hub">
<xsl:copy>
<xsl:apply-templates select="@*" mode="#current"/>
<xsl:analyze-string select="." regex="{$dialogue-speaker-delimiter-regex}">
<xsl:matching-substring>
<delimiter char="{.}"/>
</xsl:matching-substring>
<xsl:non-matching-substring>
<xsl:value-of select="."/>
</xsl:non-matching-substring>
</xsl:analyze-string>
</xsl:copy>
</xsl:template>

<xsl:template match="blockquote[para[matches(@role, $dialogue-role-regex)]]/para[delimiter[following-sibling::node()]]" mode="custom-1">
Expand All @@ -1125,6 +1127,12 @@
</xsl:copy>
</xsl:template>

<xsl:template match="blockquote[para[matches(@role, $dialogue-role-regex)]]/para/node()[1][self::phrase[delimiter]]" mode="custom-1">
<personname role="speaker">
<xsl:apply-templates mode="#current"/>
</personname>
</xsl:template>

<xsl:template match="blockquote[para[matches(@role, $dialogue-role-regex)]]/para/delimiter" mode="custom-1">
<xsl:value-of select="@char"/>
</xsl:template>
Expand Down
8 changes: 4 additions & 4 deletions xsl/shared-variables.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
select="'^toctitle$'"/>

<xsl:variable name="hub:blockquote-role-regex" as="xs:string"
select="'^[a-z]{1,3}_?(motto|dedication|epigraph|dialogue|quotation|verse|transcription|codeblock[a-z0-9]+)(_-_.+)?$'"/>
select="'^[a-z]{1,3}_?(motto|dedication|epigraph|dialogue[a-z]?(-action)?|quotation|verse|transcription|codeblock[a-z0-9]+)(_-_.+)?$'"/>

<xsl:variable name="hub:blockquote-source-role-regex" as="xs:string"
select="'^[a-z]{1,3}_?(motto|dedication|epigraph|dialogue|quotation|verse)-?source$'"/>
select="'^[a-z]{1,3}_?(motto|dedication|epigraph|dialogue[a-z]?|quotation|verse)-?source$'"/>

<xsl:variable name="hub:list-by-indent-exception-role-regex" as="xs:string"
select="'^[a-z]{1,3}_?(literature|body|dedication|motto|dialogue|quotation|figurecaption|figuresource|tablecaption|tablesource|formula|indexstatic|indexlist|codeblock[a-z0-9]+)'"/>
select="'^[a-z]{1,3}_?(literature|body|dedication|motto|dialogue[a-z]?(-action)?|quotation|figurecaption|figuresource|tablecaption|tablesource|formula|indexstatic|indexlist|codeblock[a-z0-9]+)'"/>

<xsl:variable name="tei:floatingTexts-role" as="xs:string" select="'^[a-z]{1,3}_?box(grey|border)$|^transcription$'"/>

Expand Down Expand Up @@ -126,7 +126,7 @@
select="'^[a-z]{1,3}codeblock[a-z0-9]+$'"/>

<xsl:variable name="dialogue-role-regex" as="xs:string"
select="'^[a-z]{1,3}dialogue(-action)?$'"/>
select="'^[a-z]{1,3}dialogue(-action)?[a-z]?$'"/>

<xsl:variable name="dialogue-action-role-regex" as="xs:string"
select="'^[a-z]+dialogue-action$'"/>
Expand Down