Atempting to style a pseudo nested list in XSL-FO
I'm really starting to love XSL-FO and am sort of starting to begin to maybe get where I want to be in terms of styling these documents but I'm having a bit of a brain freeze with trying to emulate lists.
The XML I have to work with doesn't use DITA lists and we have had to fudge it to get it into XPP and then out to the web and now into SDL's LiveContent.
This is the markup I have for a list:
<p outputclass="LC NText"><b>[12]</b>   On 24 October 2006, following a second CMC on 23 October 2006, XXXXXX, by this stage legally represented, made its application for disclosure. The application requests disclosure of the following documents:</p>
<p outputclass="LC"><ph outputclass="NList1_num">(a)</ph><ph outputclass="NList1_text">the minute of the case review meeting;</ph></p>
<p outputclass="LC"><ph outputclass="NList1_num">(b)</ph><ph outputclass="NList1_text">Mr Mayock’s memo开发者_运维知识库randum regarding his review of the case;</ph></p>
<p outputclass="LC"><ph outputclass="NList1_num">(c)</ph><ph outputclass="NList1_text">Mr Priddis’ memorandum;</ph></p>
<p outputclass="LC"><ph outputclass="NList1_num">(d)</ph><ph outputclass="NList1_text">the final draft of the case closure letter to be sent by Mr Mayock;</ph></p>
<p outputclass="LC"><ph outputclass="NList1_num">(e)</ph><ph outputclass="NList1_text">the draft summary of final comments from interested parties received in connection with the OFT’s provisional decision to close its investigations.</ph></p>
I am needing to indent the outputclass="NList1_num" and outputclass="NList1_text" by a specific amount (we also have NList*_ where * is 2,3,4 etc for further indented nested lists).
I tried:
<xsl:template match="*[contains(@outputclass,'NList1_')]">
<fo:block text-indent="2em">
<fo:inline background-color="red">
<xsl:apply-templates/>
</fo:inline>
</fo:block>
</xsl:template>
but this displays it with the NList1_num indented on one line and the NList1_text with the same indent on the next line. I'm wanting them both on the same line as per a normal list.
I tried fo:inline but found that I couldn't apply an indent or margin to these and had to use fo:block instead.
Can someone please give me some ideas how to get these styled.
Many thanks (again).
Hedley Phillips
Suggested approach:
Create a small document, by hand, that contains the XSL-FO markup that you need. Make use of the available list constructs:
- fo:list-block
- fo:list-item
- fo:list-item-body
- fo:list-item-label
When you have something that works, start developing the stylesheet that produces the wanted markup.
精彩评论