Skip to content

Commit 84d611a

Browse files
HTML: incremental build only provides warnings for current subtree
1 parent 9584426 commit 84d611a

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

xsl/pretext-html.xsl

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,21 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
319319
</xsl:call-template>
320320
</xsl:if>
321321
<!-- -->
322-
<xsl:apply-templates select="$original" mode="generic-warnings"/>
323-
<xsl:apply-templates select="$original" mode="element-deprecation-warnings"/>
324-
<xsl:apply-templates select="$original" mode="parameter-deprecation-warnings"/>
322+
<xsl:choose>
323+
<!-- If working on a subtree, only warn on that part. -->
324+
<!-- Not much speed difference, but helpful if author is focusing -->
325+
<!-- on a part of the work. -->
326+
<xsl:when test="$b-build-incremental and $b-subsetting">
327+
<xsl:apply-templates select="$pruning-tree" mode="generic-warnings"/>
328+
<xsl:apply-templates select="$pruning-tree" mode="element-deprecation-warnings"/>
329+
<xsl:apply-templates select="$pruning-tree" mode="parameter-deprecation-warnings"/>
330+
</xsl:when>
331+
<xsl:otherwise>
332+
<xsl:apply-templates select="$original" mode="generic-warnings"/>
333+
<xsl:apply-templates select="$original" mode="element-deprecation-warnings"/>
334+
<xsl:apply-templates select="$original" mode="parameter-deprecation-warnings"/>
335+
</xsl:otherwise>
336+
</xsl:choose>
325337
<!-- Usually no manifest is created -->
326338
<xsl:call-template name="runestone-manifest"/>
327339
<!-- A structured Table of Contents for a React app approach -->

0 commit comments

Comments
 (0)