Skip to content

Commit 171cb2b

Browse files
committed
Add uppercase/lowerccase entities for deliverable
Create id from lowercase value of "<dc>" without the DC- prefix.
1 parent 522ed1a commit 171cb2b

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
2323
Copyright (C) 2026 SUSE Linux GmbH
2424
-->
25+
<!DOCTYPE xsl:stylesheet [
26+
<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
27+
<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
28+
]>
2529
<xsl:stylesheet version="1.0"
2630
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2731
xmlns:xi="http://www.w3.org/2001/XInclude"
@@ -396,6 +400,22 @@
396400
</locale>
397401
</xsl:template>
398402

403+
404+
<!-- deliverable -->
405+
<xsl:template match="deliverable">
406+
<xsl:copy>
407+
<xsl:copy-of select="@*"/>
408+
<xsl:if test="../language/@lang='en-us'">
409+
<!-- Add id attribute only for English to keep it unique -->
410+
<xsl:attribute name="id">
411+
<xsl:value-of select=" substring-after(translate(dc, &uppercase;, &lowercase;), 'dc-')"/>
412+
</xsl:attribute>
413+
</xsl:if>
414+
<xsl:attribute name="type">dc</xsl:attribute>
415+
<xsl:apply-templates />
416+
</xsl:copy>
417+
</xsl:template>
418+
399419
<!-- ref -->
400420
<xsl:template match="ref">
401421
<ref>

0 commit comments

Comments
 (0)