Changeset 99513 in vbox for trunk/doc/manual/docbook-refentry-to-C-help.xsl
- Timestamp:
- Apr 21, 2023 9:59:02 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 157010
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/docbook-refentry-to-C-help.xsl
r99118 r99513 149 149 <!-- Then comes the description and other refsect1 --> 150 150 <xsl:for-each select="./refsect1"> 151 <!-- assertions --> 151 152 <xsl:if test="name(*[1]) != 'title'"><xsl:message terminate="yes"><xsl:call-template name="error-prefix"/>Expected title as the first element in refsect1.</xsl:message></xsl:if> 152 153 <xsl:if test="text()"><xsl:message terminate="yes"><xsl:call-template name="error-prefix"/>No text supported in refsect1.</xsl:message></xsl:if> 154 <xsl:if test="not(@id)"><xsl:message terminate="yes"><xsl:call-template name="error-prefix"/>refsect1 must have an @id attribute.</xsl:message></xsl:if> 155 <xsl:if test="not(starts-with(@id, concat(../@id, '-')))"><xsl:message terminate="yes"><xsl:call-template name="error-prefix"/>Wrong @id refsect1 prefix: '<xsl:value-of select="@id"/>', expected it to start with '<xsl:value-of select="../@id"/>-'</xsl:message></xsl:if> 156 157 <!-- .... --> 153 158 <xsl:if test="not(./remark[@role='help-skip'])"> 154 159 <xsl:variable name="sTitle"> … … 321 326 <xsl:if test="text()"><xsl:message terminate="yes"><xsl:call-template name="error-prefix"/>refsect2 shouldn't contain text</xsl:message></xsl:if> 322 327 <xsl:if test="count(./title) != 1"><xsl:message terminate="yes"><xsl:call-template name="error-prefix"/>refsect2 requires a title (<xsl:value-of select="ancestor-or-self::*[@id][1]/@id"/>)</xsl:message></xsl:if> 328 <xsl:if test="not(@id)"><xsl:message terminate="yes"><xsl:call-template name="error-prefix"/>refsect2 must have an @id attribute.</xsl:message></xsl:if> 329 <xsl:if test="not(starts-with(@id, concat(../../@id, '-')))"><xsl:message terminate="yes"><xsl:call-template name="error-prefix"/>Wrong @id refsect2 prefix: '<xsl:value-of select="@id"/>', expected it to start with '<xsl:value-of select="../../@id"/>-'</xsl:message></xsl:if> 323 330 324 331 <!-- title / command synopsis - sets the scope. --> … … 731 738 <xsl:template name="calc-scope-refsect1"> 732 739 <xsl:choose> 733 <xsl:when test=" title[text() = 'Description']">740 <xsl:when test="contains(@id, '-description') or title[text() = 'Description']"> 734 741 <xsl:text>RTMSGREFENTRYSTR_SCOPE_GLOBAL</xsl:text> 735 742 </xsl:when> 736 <xsl:when test=" @idor remark[@role='help-scope']">743 <xsl:when test="(@id and not(contains(@id, '-see-also')) and not(contains(@id, '-examples'))) or remark[@role='help-scope']"> 737 744 <xsl:call-template name="calc-scope-from-remark-or-id"/> 738 745 </xsl:when> … … 746 753 <xsl:template name="calc-scope-refsect2"> 747 754 <xsl:choose> 748 <xsl:when test=" @idor remark[@role='help-scope']">755 <xsl:when test="(@id and not(contains(@id, '-see-also')) and not(contains(@id, '-examples'))) or remark[@role='help-scope']"> 749 756 <xsl:call-template name="calc-scope-from-remark-or-id"/> 750 757 </xsl:when>
Note:
See TracChangeset
for help on using the changeset viewer.