Changeset 3f2c36d for BOOK


Ignore:
Timestamp:
Apr 24, 2011, 2:16:17 PM (14 years ago)
Author:
Joe Ciccone <jciccone@…>
Children:
268f64e
Parents:
8823a97
Message:

Add an inline element of c:emphasis.

Location:
BOOK
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • BOOK/schema/clfs/0.1/rng/clfs.rnc

    r8823a97 r3f2c36d  
    4444
    4545clfs.inline =
    46   (clfs.inline.literal |
     46  (clfs.inline.emphasis |
     47   clfs.inline.literal |
    4748   clfs.inline.replaceable |
    4849   clfs.inline.application |
     
    5657  clfs.attrib.bits,
    5758  clfs.attrib.multilib
     59
     60clfs.inline.emphasis =
     61  element c:emphasis {
     62    clfs.inline.common.attrib,
     63    clfs.inline
     64  }
    5865
    5966clfs.inline.literal =
  • BOOK/schema/clfs/0.1/rng/clfs.rng

    r8823a97 r3f2c36d  
    9494    <zeroOrMore>
    9595      <choice>
     96        <ref name="clfs.inline.emphasis"/>
    9697        <ref name="clfs.inline.literal"/>
    9798        <ref name="clfs.inline.replaceable"/>
     
    108109    <ref name="clfs.attrib.bits"/>
    109110    <ref name="clfs.attrib.multilib"/>
     111  </define>
     112  <define name="clfs.inline.emphasis">
     113    <element name="c:emphasis">
     114      <ref name="clfs.inline.common.attrib"/>
     115      <ref name="clfs.inline"/>
     116    </element>
    110117  </define>
    111118  <define name="clfs.inline.literal">
  • BOOK/stylesheets/clfs-profile.xsl

    r8823a97 r3f2c36d  
    718718  </xsl:template>
    719719 
     720  <xsl:template match="c:emphasis" mode="filter-bits-32">
     721    <xsl:variable name="ismultilib">
     722      <xsl:choose>
     723        <xsl:when test="contains($clfs.multilib, ',')">
     724          <xsl:text>true</xsl:text>
     725        </xsl:when>
     726        <xsl:otherwise>
     727          <xsl:text>false</xsl:text>
     728        </xsl:otherwise>
     729      </xsl:choose>
     730    </xsl:variable>
     731    <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
     732      <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
     733        <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',32,')">
     734          <xsl:element name="emphasis">
     735            <xsl:apply-templates select="node()" mode="filter-bits-32" />
     736          </xsl:element>
     737        </xsl:if>
     738      </xsl:if>
     739    </xsl:if>
     740  </xsl:template>
     741 
    720742  <xsl:template match="c:literal" mode="filter-bits-32">
    721743    <xsl:variable name="ismultilib">
     
    954976  </xsl:template>
    955977 
     978  <xsl:template match="c:emphasis" mode="filter-bits-n32">
     979    <xsl:variable name="ismultilib">
     980      <xsl:choose>
     981        <xsl:when test="contains($clfs.multilib, ',')">
     982          <xsl:text>true</xsl:text>
     983        </xsl:when>
     984        <xsl:otherwise>
     985          <xsl:text>false</xsl:text>
     986        </xsl:otherwise>
     987      </xsl:choose>
     988    </xsl:variable>
     989    <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
     990      <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
     991        <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',n32,')">
     992          <xsl:element name="emphasis">
     993            <xsl:apply-templates select="node()" mode="filter-bits-n32" />
     994          </xsl:element>
     995        </xsl:if>
     996      </xsl:if>
     997    </xsl:if>
     998  </xsl:template>
     999 
    9561000  <xsl:template match="c:literal" mode="filter-bits-n32">
    9571001    <xsl:variable name="ismultilib">
     
    11901234  </xsl:template>
    11911235 
     1236  <xsl:template match="c:emphasis" mode="filter-bits-64">
     1237    <xsl:variable name="ismultilib">
     1238      <xsl:choose>
     1239        <xsl:when test="contains($clfs.multilib, ',')">
     1240          <xsl:text>true</xsl:text>
     1241        </xsl:when>
     1242        <xsl:otherwise>
     1243          <xsl:text>false</xsl:text>
     1244        </xsl:otherwise>
     1245      </xsl:choose>
     1246    </xsl:variable>
     1247    <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',',@c:arch,','), concat(',', $clfs.arch, ','))">
     1248      <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',',@c:multilib,','), concat(',', $ismultilib, ','))">
     1249        <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',',@c:bits,','), ',64,')">
     1250          <xsl:element name="emphasis">
     1251            <xsl:apply-templates select="node()" mode="filter-bits-64" />
     1252          </xsl:element>
     1253        </xsl:if>
     1254      </xsl:if>
     1255    </xsl:if>
     1256  </xsl:template>
     1257 
    11921258  <xsl:template match="c:literal" mode="filter-bits-64">
    11931259    <xsl:variable name="ismultilib">
Note: See TracChangeset for help on using the changeset viewer.