Skip to content

Commit 5d9687f

Browse files
committed
Adjust XSLT to content model changes
* <dc> is now a child element * Translated deliverables have <deliverable type="ref"> * Suppress builddocs/language/@default attribute
1 parent 348f68e commit 5d9687f

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

src/docbuild/config/xml/data/convert-v6-to-v7.xsl

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -457,30 +457,21 @@
457457

458458
<xsl:template match="docset/builddocs">
459459
<resources>
460-
<xsl:apply-templates/>
460+
<xsl:apply-templates />
461461
</resources>
462462
</xsl:template>
463463

464-
<xsl:template match="docset/builddocs/language">
465-
<xsl:variable name="pid" select="ancestor::product/@productid"/>
466-
<xsl:variable name="do_externals" select="$config[@id=$pid]/@externals"/>
467-
<xsl:variable name="current_lang" select="@lang"/>
468-
469-
<locale>
470-
<xsl:copy-of select="@lang" /><!-- no default attribute -->
464+
<!-- builddocs -->
465+
<xsl:template match="builddocs/language">
466+
<locale lang="{@lang}">
471467
<xsl:apply-templates />
472-
473-
<xsl:if test="$do_externals">
474-
<xsl:apply-templates select="../../external/link[language[@lang = $current_lang]]" mode="convert-to-prebuilt">
475-
<xsl:with-param name="lang" select="$current_lang"/>
476-
</xsl:apply-templates>
477-
</xsl:if>
478468
</locale>
479469
</xsl:template>
480470

481-
<xsl:template match="link/language/@default" />
471+
<xsl:template match="builddocs/language/@default" />
472+
482473

483-
<!-- deliverable -->
474+
<!-- regular <deliverable> -->
484475
<xsl:template match="language[@lang='en-us']/deliverable">
485476
<xsl:variable name="pid" select="ancestor::product/@productid"/>
486477
<xsl:variable name="abbrev" select="$config/product[@id=$pid]/@idabbrev"/>
@@ -495,10 +486,16 @@
495486

496487
<deliverable id="{$id}" type="dc">
497488
<xsl:copy-of select="@*"/>
498-
<xsl:apply-templates />
489+
<dc file="{normalize-space(dc/text())}">
490+
<xsl:apply-templates />
491+
</dc>
499492
</deliverable>
500493
</xsl:template>
501494

495+
<xsl:template match="dc|dc/text()" />
496+
497+
498+
<!-- translated <deliverable> -->
502499
<xsl:template match="language[@lang!='en-us']/deliverable">
503500
<xsl:variable name="pid" select="ancestor::product/@productid"/>
504501
<xsl:variable name="abbrev" select="$config/product[@id=$pid]/@idabbrev"/>
@@ -511,9 +508,12 @@
511508
</xsl:call-template>
512509
</xsl:variable>
513510

514-
<ref linkend="{$id}" />
511+
<deliverable type="ref">
512+
<ref linkend="{$id}" />
513+
</deliverable>
515514
</xsl:template>
516515

516+
517517
<!-- ref -->
518518
<xsl:template match="ref">
519519
<xsl:variable name="pid" select="@product"/>

0 commit comments

Comments
 (0)