В моем xml, имеющем три раздела, все находятся в позиции h1, но я хочу, чтобы первый раздел был как позиция h1, а remaning должен быть h2-позициями, а мой xml-файлРазмер шрифта заголовка первого раздела нужно увеличить с помощью xslt
<section>
<title>DESCRIPTION</title>
<p>The A380 is available with two types of turbofan engines, the
Rolls-Royce Trent 900 (variants A380-841, −842 and −843F) or the Engine
Alliance GP7000 (A380-861 and −863F). Noise reduction was an important
requirement in the A380 design, and particularly affects engine design.</p>
<p>Landing gears<ul>
<li>
<p>Nose Landing Gear</p>
</li>
<li>
<p>Wing Landing Gear (Bogie Type, 4 Wheels - 4 Braked)</p>
</li>
<li>
<p>Body Landing Gear (Bogie Type, 6 Wheels - 4 Braked)</p>
</li>
</ul>
</p>
</section>
<section>
<title>Wing Landing Gear</title>
<p>Each wing landing gear has a leg assembly and
a four-wheel bogie beam. The WLG leg includes a Bogie Trim Actuator
(BTA) and an oleo-pneumatic shock absorber.</p>
</section>
<section>
<title>Body Landing Gear</title>
<p>The two body landing gears have a six-wheel bogie
beam and a leg assembly that includes an oleo- pneumatic shock absorber.
A two-piece drag-stay assembly mechanically locks the leg in the extended
position.</p>
<fig>
<title>Landing gear</title>
<image align="center" href="../ICN-HSXWB-A-791111-H-F0302-00001-A-001-01.tif"/>
</fig>
</section>
Im используя XSLT в качестве
<xsl:template match="*[contains(@class,' topic/section ')][@spectitle != ''
and not(*[contains(@class, ' topic/title ')])]"
mode="dita2xslfo:section-heading"
priority="10">
<fo:block xsl:use-attribute-sets="section.title">
<xsl:call-template name="commonattributes"/>
<xsl:variable name="spectitleValue" as="xs:string" select="string(@spectitle)"/>
<xsl:variable name="resolvedVariable">
<xsl:call-template name="insertVariable">
<xsl:with-param name="theVariableID" select="$spectitleValue"/>
</xsl:call-template>
</xsl:variable>
<xsl:sequence
select="if (not(normalize-space($resolvedVariable)))
then $spectitleValue
else $resolvedVariable"
/>
</fo:block>
<xsl:template match="*[contains(@class,' topic/section ')]">
<fo:block xsl:use-attribute-sets="section">
<xsl:call-template name="commonattributes"/>
<xsl:apply-templates select="." mode="dita2xslfo:section-heading"/>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
Пожалуйста, руководство меня об этом. Спасибо
Я не совсем понимаю, что вы имеете в виду под «Но я хочу, чтобы первый раздел сам шрифт на высоком уровне, чем другой заголовок раздела» и где проблема кроется. Ваш код 'содержит (@class, 'topic/section')' не имеет смысла, в вашем xml-атрибуте нет атрибута @class, а если есть, то почему он должен содержать ** пробел ** тема/раздел ** пробел * *? –
Пожалуйста, напишите [Минимальный, полный и проверенный пример] (https://stackoverflow.com/help/mcve) –
'содержит (@class, 'topic/section')' означает, что @BoopathyChandran использует DITA, и он разрабатывает таблицу стилей PDF-плагина. – tmakita