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

Fix small bugs in calculating correct relative URIs in chunks #408

Merged
merged 1 commit into from
Aug 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions properties.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
ext {
xslTNGtitle = 'DocBook xslTNG'
xslTNGbaseName = 'docbook-xslTNG'
xslTNGversion = '2.1.8'
guideVersion = '2.1.8'
xslTNGversion = '2.1.9'
guideVersion = '2.1.9'
guidePrerelease = false

docbookVersion = '5.2CR5'
Expand Down
16 changes: 15 additions & 1 deletion src/guide/xml/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ be of interest to users of the stylesheets. See the commits and pull requests on
<link xlink:href="https://github.com/docbook/xslTNG/">the repository</link> for
finer detail.</para>

<section xml:id="r219">
<info>
<title>Changes in version 2.1.9</title>
<productnumber>2.1.9</productnumber>
<date>2023-08-19</date>
</info>
<itemizedlist>
<listitem>
<para>Links added with <mode>m:head-additions</mode> were not being made relative
to the chunk base URI. Reworked <mode>m:html-body-script</mode> slightly so that
links there can also be made relative appropriately.</para>
</listitem>
</itemizedlist>
</section>

<section xml:id="r218">
<info>
<title>Changes in version 2.1.8</title>
Expand Down Expand Up @@ -60,7 +75,6 @@ finer detail.</para>
</listitem>
</itemizedlist>
</section>

<section xml:id="r217">
<info>
<title>Changes in version 2.1.7</title>
Expand Down
16 changes: 13 additions & 3 deletions src/main/xslt/modules/chunk-cleanup.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,10 @@
</xsl:if>

<xsl:sequence select="$scripts[not(@type) or contains(@type,'javascript')]"/>
<xsl:sequence select="$heads[position() gt 1]/node()"/>
<xsl:apply-templates select="$heads[position() gt 1]/node()">
<xsl:with-param name="rootbaseuri" select="$rbu"/>
<xsl:with-param name="chunkbaseuri" select="$cbu"/>
</xsl:apply-templates>
</head>
<body>
<xsl:variable name="class-list" as="xs:string*">
Expand Down Expand Up @@ -334,8 +337,15 @@
</nav>

<xsl:sequence select="$scripts[@type and not(contains(@type,'javascript'))]"/>

<xsl:apply-templates select="." mode="m:html-body-script">

<xsl:variable name="more-scripts" as="element()*">
<xsl:apply-templates select="." mode="m:html-body-script">
<xsl:with-param name="rootbaseuri" select="$rbu"/>
<xsl:with-param name="chunkbaseuri" select="$cbu"/>
</xsl:apply-templates>
</xsl:variable>

<xsl:apply-templates select="$more-scripts">
<xsl:with-param name="rootbaseuri" select="$rbu"/>
<xsl:with-param name="chunkbaseuri" select="$cbu"/>
</xsl:apply-templates>
Expand Down