I'm wondering if anyone has come up with a solution to an
OpenOffice.org problem where it inconsistently styles lists. Here's a
relevant snippet of the OpenOffice.org Writer's 'content.xml' file:
<text:unordered-list text:style-name="L1">
<text:list-item>
<text:p text:style-name="P1">
Direct sale from wet or exchange inventory
</text:p>
</text:list-item>
<text:list-item>
<text:p text:style-name="P1">
Exchange delivery from wet or exchange inventory
</text:p>
</text:list-item>
<text:list-item>
<text:p text:style-name="P1">
Pipeline and truck transfers
</text:p>
</text:list-item>
<text:list-item>
<text:p text:style-name="P1">
Purchases or exchange receipts into wet inventory
</text:p>
</text:list-item>
<text:list-item>
<text:p text:style-name="P1">
Product, volume, price, tax, or freight adjustments
</text:p>
</text:list-item>
<text:list-item>
<text:p text:style-name="P1">
Outright reversal of a previously-billed invoice
</text:p>
</text:list-item>
<text:list-item>
<text:p text:style-name="P2">
Exchange settlements
</text:p>
</text:list-item>
</text:unordered-list>
NOTE: I did not specifically apply the style P2 to the last item, and
I can't seem to get rid of it.
Forrest appears to wrap the text for each list-item with <p></p>
tags, which doesn't seem to 'help', as seen in the
Forrest HTML Output:
<ul>
<li>
<p class="P1">Direct sale from wet or exchange inventory </p>
</li>
<li>
<p class="P1">Exchange delivery from wet or exchange inventory </p>
</li>
<li>
<p class="P1">Pipeline and truck transfers </p>
</li>
<li>
<p class="P1">Purchases or exchange receipts into wet inventory </p>
</li>
<li>
<p class="P1">Product, volume, price, tax, or freight adjustments </p>
</li>
<li>
<p class="P1">Outright reversal of a previously-billed invoice </p>
</li>
<li>
<p class="instruction">Exchange settlements </p>
</li>
</ul>
Although I want to use the 'class="instruction"' for other documents,
I tried commenting out the XSL in the two plugins files as follows,
but it didn't help:
<!--+
| special list format p2
|
| 0verwrites template in openoffice-common2forrest
| to allow for bulleted list item 'forrest: instructional
step' in oo to
| become a simple para with a class-attr in forrest (instruction)
| In order to do so, this template omits the <ul>-Element
| and bypasses the processing of the <li>-Element.
|
+-->
<!-- Commented out by CL 20060323
<xsl:template match="text:[EMAIL PROTECTED]:style-name='L2']">
<xsl:apply-templates select="text:list-item/text:p"/>
<xsl:apply-templates select="text:list-item/text:unordered-
list"/>
<xsl:apply-templates select="text:list-item/text:ordered-list"/>
</xsl:template>
-->
<!--+
| Instructional step
+-->
<!-- Commented out by CL 20060323
<xsl:template match="text:[EMAIL PROTECTED]:style-name='P2']">
<p class="instruction">
<xsl:apply-templates/>
</p>
</xsl:template>
-->
</xsl:stylesheet>
NOTE: The above change was made to both of the following files:
forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/
resources/stylesheets/openoffice-writer-to-forrest.xsl
forrest/trunk/build/plugins/
org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/
openoffice-writer-to-forrest.xsl
Any ideas?
Clay Leeds
[EMAIL PROTECTED]
My religion is simple. My religion is kindness.
-- HH Dalai Lama of Tibet