The paragraph styles in WordProcessingML have paragraph properties (w:pPr element) and range properties (w:rPr element). The font of a paragraph style is stored in the range properties (w:rPr/w:rFonts/@w:ascii element), as shown in the following snapshot from XML Notepad:
The way to extract font name from paragraph style based on the style name is very similar to the character style case: define an xsl:key definition that matches paragraph style (w:type = 'paragraph') with the given name and extract the font name.
<xsl:key name="parafont" match="w:rFonts/@w:ascii" →
use="ancestor::w:style[@w:type = 'paragraph']/@w:styleId" />
No comments:
Post a Comment