|
76 | 76 | <product id="appliance" series="pas" family="linux" rank="04150" idabbrev="app"/> |
77 | 77 | <product id="cloudnative" series="pas" family="cn" rank="00030" idabbrev="cn" /> |
78 | 78 | <product id="container" series="pas" family="linux" rank="04130" idabbrev="cont" /> |
79 | | - <product id="compliance" series="pas" family="linux" rank="" idabbrev="comp" /> |
| 79 | + <product id="compliance" series="pas" family="linux" rank="04130" idabbrev="comp" /> |
80 | 80 | <product id="liberty" series="pas" family="linux" rank="00060" idabbrev="lib" /> |
81 | 81 | <product id="releasenotes" series="rn" family="linux" idabbrev="rn"/> |
82 | 82 | <product id="sbp" series="sbp" family="linux" /> |
|
485 | 485 |
|
486 | 486 | <xsl:template name="docset-without-builddocs"> |
487 | 487 | <resources> |
488 | | - <xsl:apply-templates select="external[link[not(starts-with(language/url/@href, 'https://'))]]" mode="builddocs" /> |
| 488 | + <git remote="https://TODO" /> |
| 489 | + <xsl:apply-templates select="external[link[not(starts-with(language/url/@href, 'https://'))]]" |
| 490 | + mode="builddocs" /> |
489 | 491 | </resources> |
490 | 492 | </xsl:template> |
491 | 493 |
|
492 | 494 |
|
493 | 495 | <xsl:template match="docset/external" mode="builddocs"> |
494 | 496 | <locale lang="en-us"> |
495 | | - <xsl:apply-templates select="link[not(starts-with(language/url/@href, 'https://'))]" mode="builddocs" /> |
| 497 | + <branch>main</branch> |
| 498 | + <xsl:apply-templates select="link[not(starts-with(language/url/@href, 'https://'))]" mode="builddocs" /> |
496 | 499 | </locale> |
497 | 500 | <xsl:if test="link[not(starts-with(language/url/@href, 'https://')) and @lang != 'en-us']"> |
498 | 501 | <xsl:message>TODO: Found non-English links in docset/external</xsl:message> |
|
525 | 528 | </xsl:template> |
526 | 529 |
|
527 | 530 | <xsl:template match="link" mode="builddocs"> |
528 | | - <deliverable type="prebuilt" category="{@category}"> |
| 531 | + <xsl:variable name="href" select="language[@lang='en-us']/url/@href"/> |
| 532 | + <!-- Extract product ID from URL like /product/docset/... --> |
| 533 | + <xsl:variable name="pid" select="substring-before(substring-after($href, '/'), '/')"/> |
| 534 | + |
| 535 | + <xsl:variable name="abbrev" select="$config/product[@id=$pid]/@idabbrev"/> |
| 536 | + |
| 537 | + <xsl:variable name="product.idabbrev"> |
| 538 | + <xsl:choose> |
| 539 | + <xsl:when test="string($abbrev) != ''"> |
| 540 | + <xsl:value-of select="$abbrev"/> |
| 541 | + </xsl:when> |
| 542 | + <xsl:otherwise> |
| 543 | + <xsl:value-of select="$pid"/> |
| 544 | + </xsl:otherwise> |
| 545 | + </xsl:choose> |
| 546 | + </xsl:variable> |
| 547 | + |
| 548 | + <xsl:variable name="filename"> |
| 549 | + <xsl:call-template name="substring-after-last"> |
| 550 | + <xsl:with-param name="string" select="$href"/> |
| 551 | + <xsl:with-param name="char" select="'/'"/> |
| 552 | + </xsl:call-template> |
| 553 | + </xsl:variable> |
| 554 | + |
| 555 | + <xsl:variable name="doc"> |
| 556 | + <xsl:choose> |
| 557 | + <xsl:when test="contains($filename, '.')"> |
| 558 | + <xsl:value-of select="substring-before($filename, '.')"/> |
| 559 | + </xsl:when> |
| 560 | + <xsl:otherwise> |
| 561 | + <xsl:value-of select="$filename"/> |
| 562 | + </xsl:otherwise> |
| 563 | + </xsl:choose> |
| 564 | + </xsl:variable> |
| 565 | + |
| 566 | + <xsl:variable name="id"> |
| 567 | + <xsl:call-template name="generate.id"> |
| 568 | + <xsl:with-param name="product.idabbrev" select="$product.idabbrev"/> |
| 569 | + <xsl:with-param name="docset" select="ancestor::docset/@setid"/> |
| 570 | + <xsl:with-param name="dc" select="$doc"/> |
| 571 | + </xsl:call-template> |
| 572 | + </xsl:variable> |
| 573 | + |
| 574 | + <deliverable id="{$id}" type="prebuilt" category="{@category}"> |
529 | 575 | <xsl:apply-templates mode="builddocs" /> |
530 | 576 | </deliverable> |
531 | 577 | </xsl:template> |
532 | 578 |
|
533 | 579 | <xsl:template match="docset/external/link/language" mode="builddocs"> |
534 | 580 | <prebuilt> |
535 | 581 | <title><xsl:value-of select="normalize-space(@title)"/></title> |
| 582 | + <xsl:copy-of select="url"/> |
536 | 583 | <descriptions> |
537 | 584 | <desc lang="en-us"> |
538 | 585 | <p><xsl:comment>TODO</xsl:comment></p> |
539 | 586 | </desc> |
540 | 587 | </descriptions> |
541 | | - <xsl:copy-of select="url"/> |
542 | 588 | </prebuilt> |
543 | 589 | </xsl:template> |
544 | 590 |
|
|
0 commit comments