DITA OT 2.2.1 upgrade problems - dita-ot

I'm upgrading from version 1.2.2 of DITA-OT to 2.2.1, and I'm having a couple of issues regarding PDF output with fop:
1 - The TOC keeps printing the page numbers in roman numerals, instead of arabic.
Where can I change the output format?
2 - When trying to set a PDF background image for a fo:block-container or a fo:table, the output is the following:
[fop] [ERROR] Image not available.
URI: Customization/OpenTopic/common/artwork/cover.pdf.
Reason: org.apache.xmlgraphics.image.loader.ImageException: The file format is not supported.
No ImagePreloader found for Customization/OpenTopic/common/artwork/cover.pdf (See position 1:-1)
For example, the block-container definition is the following:
<fo:block-container absolute-position="fixed" left="12mm" top="0mm" background-repeat="no-repeat">
<xsl:attribute name="background-image">
<xsl:value-of select=""url(&apos;Customization/OpenTopic/common/artwork/cover""/>
<xsl:value-of select="$cover"/>
<xsl:value-of select="".pdf&apos;)""/>
</xsl:attribute>-->
<fo:block/>

Many things have changed, since 1.2.2. If possible, generate a a new PDF-plugin using the dita-generator, this is probably faster than trying to fix your old plugin.
Generate a new plugin.
Publish your content with the new plugin.
If it succeeds, copy a single template from the old plugin to the new plugin and test again.
Repeat 3. until you're done.

There is an Apache FOP plugin which adds support for using PDF images:
https://xmlgraphics.apache.org/fop/fop-pdf-images.html

Related

How to download normal word export not grid layout export from Jasper soft v6.3.1

I am using Jasper soft 6.3.1 and Jasperserver 6.3.0.
I am generating a report book using Jasper.
When I export report book into .docx report, this word file contains grid. Its not like normal document.
How I can download docx like normal ms word document?
Is there any alternative?
Do I need to go for Aspose.com solution, if yes, then how ?
Jasper will always export an docx-output in a table/grid structure. Unfortunately there is no other way.
You can achieve your requirements using Aspose.Words for JasperReports. The output document will be according to the elements of your report. Please read the documentation of Aspose.Words for JasperReports. I work with Aspose as Developer evangelist.
Yes, you will need to use a 3rd party library to achieve this. Aspose.Words or any other similar library would do the trick but I strongly suggest that you first take a look at this library that allows you to create a template in MS Word, with all the necessary formatting and placehoders for the data. At runtime this template is filled with data. You can then choose the output format in .docx, .pdf or .xps format.
// Instancing report engine, by assigning the data source
DocumentGenerator dg = new DocumentGenerator(DataAccess.GetOrderById(7));
// Generating report by specifying the report template and the resulting report (as file paths)
dg.GenerateDocument("example.docx", "example_output.docx");

How can you debug a DITA transformation?

I know XSLT in general can be debugged, but how exactly would one go about debugging a DITA transformation, considering its modular XSLT structure and the fact that stylesheets are pointed to by the catalog.xml file?
I want to be able to step through the code during runtime, and be able to set break points, etc.
If you are using the Oxygen editor, you can debug Toolkit transforms using the technique described here (from the Oxygen 14.2 documentation):
Debugging PDF Transformations
To debug a DITA PDF transformation scenario using the XSLT Debugger follow these steps:
Go to Options > Preferences > XML > XML Catalog, click Add and select the file located at [Oxygen Install Directory]\ frameworks\dita\DITA-OT\plugins\org.dita.pdf2\cfg\catalog.xml;
Open the map in the DITA Maps Manager and create a DITA Map PDF transformation scenario;
Edit the scenario, go to the Parameters tab and change the value of the clean.temp parameter to no;
Run the transformation scenario;
Open in Oxygen XML the stage1.xml file located in the temporary directory and format and indent it;
Create a transformation scenario for this XML file by associating the topic2fo_shell.xsl stylesheet located at OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/org.dita.pdf2/xsl/fo/topic2fo_shell_fop.xsl;
In the transformation scenario edit the Parameters list and set the parameter locale with the value en_GB and the parameter customizationDir.url to point either to your customization directory or to the default DITA OT customization directory. It's value should have an URL syntax like:file://c:/path/to/OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/org.dita.pdf2/cfg.
Debug the transformation scenario.
I found this topic by searching for "debug toolkit" in the Oxygen online help.
These instructions are specifically for PDF, but you should be able to adapt these instructions to HTML-based transforms as well.
There is always the good old trick of adding print statements around in the code, which is xslt translates to <xsl:message>. Here is a snippet from my frontmatter transformation:
<!--
<xsl:message>createFrontMatter_1.0</xsl:message>
<xsl:message>artworkPrefix=<xsl:copy-of select="$artworkPrefix"/></xsl:message>
<xsl:message>customizationDir.url=<xsl:value-of select="$customizationDir.url"/></xsl:message>
<xsl:message>imageLogoPath=<xsl:value-of select="$imageLogoPath"/></xsl:message>
<xsl:message>imageNotePath=<xsl:value-of select="$imageNotePath"/></xsl:message>
<xsl:message>imageWatermarkPath=<xsl:value-of select="$imageWatermarkPath"/></xsl:message>
<xsl:message>page-width=<xsl:value-of select="$page-width"/></xsl:message>
<xsl:message>page-height=<xsl:value-of select="$page-height"/></xsl:message>
-->
If I uncomment this, I get a nice debugging block of text in the output log, showing the various values for the settings I use.

EE 1x plugin wont parse nested plugin tags

I wrote a simple and short expressionengine 1x plugin which works well for what I needed.
It is working fine with the following code:
{exp:iv_simple_rss_parser feed="http://imccomunicacion.tumblr.com/rss" strip_tags="yes"}
Title {title}
{exp:word_limit total="20"}{description}{/exp:word_limit}
{link}
{/exp:iv_simple_rss_parser}
I needed to limit the {description} var so I wanted to use the word_limit plugin, like you can see. The fact is that all works ok but the description tag is no limited by word_limit.
It seems that EE is not parsing that nested plugin, it just ignores it, like it was not there.
How can I make EE to parse the word_limit plugin when it is inside of my plugin??
Thanks!
This is because the inner-most plugin tag parses first, and at that point, {description} doesn't exist yet. You can reverse the parse order by adding parse="inward" to your outer plugin tag:
{exp:iv_simple_rss_parser feed="http://imccomunicacion.tumblr.com/rss" strip_tags="yes" parse="inward"}
Title {title}
{exp:word_limit total="20"}{description}{/exp:word_limit}
{link}
{/exp:iv_simple_rss_parser}

Raw HTML in body text after importing content using transmorgrifier

I'm using a transmorgrifier recipe to import some data from drupal into a Plone 4.1 based buildout. The buildout is based on https://github.com/claytron/drupal-plone-transmogrifier, (mostly I updated it to use plone 4.1 instead of 4.0). The import works, I successfully imported data from a drupal site into my plone site. The only issue is that the html tags from the imported html show as the literal tags.
If, after the successful import, I manually go to each item and select 'edit' then click 'save' then the html is interpreted properly, but that would be a lot of editing and saving in order to fix my problem.
see screenshot of freshly imported content with html tags showing.
The blueprint doing the actual import of the field is (I believe) the one shown below:
[text_mimetype]
blueprint = collective.transmogrifier.sections.inserter
key = string:_text_mimetype
value = string:text/html
I experimented with using text/structured instead of text/html in the blueprint but that gave the same result:
What I need is either an additional blueprint that causes the html to be interpreted or a hints on how to ensure that my html gets interpreted at import.
The full list of blueprints used in my pipeline are shown here:
https://github.com/claytron/drupal-plone-transmogrifier/blob/master/src/my.migration/my/migration/config/base.cfg
Ran into the same problem when migrating content using wsapi4plone.core.
Solution: Pin zope.contenttype to version 3.5.5 (the default in the upcoming 4.1.1)
Cause: PLIP #9938 - http://dev.plone.org/plone/ticket/9938 as per esteele.
If it works under Plone 4.0 but not under Plone 4.1, then I'm guessing it has to do with the "factor custom output transformations out of the editors" PLIP that was merged as a part of the Plone 4.1. I would look into the changes from that PLIP and see how the pipeline needs to be adjusted.
Actually that section only insert a value "text/html" in the key "_text_mimetype"
The real encapsulation is done here:
[mimetype_encapsulator]
data-key = text
mimetype = python:item.get('_%s_mimetype' % key)
# replace the data in-place
field = key
condition = mimetype
more info: http://pypi.python.org/pypi/plone.app.transmogrifier#mime-encapsulator-section
Anyway i've experimented that it's not strictly mandatory to encapsulate the html text, it works also with a simple string.
Bye, Giacomo

Richfaces drag and drop object not defined?

Mozilla is spitting out
DnD is not defined
errors on all of my rich:dragSupport and rich:dropSupport tags. When I check out the generated javascript the DnD object is where it should be and things look ok. Any ideas on why my DnD object is not defined? Has anyone come accross gotchas with using richfaces dnd?
We are using Richfaces 3.2.1 (drag and drop started in 3.0.0 acording to docs)
An example of how we are using this:
<a4j:outputPanel><rich:panel>
<rich:dropSupport dropListener="#{myBean.dropAction}>
<a4j:actionParam value="#{someData}" name="paramData" />
</rich:dropSupport>
<a4j:repeat value="#{myBean.list}" var="item">
<a4j:outputPanel>
<rich:panel>
<rich:dragSupport dragValue="#{someOtherData}">
<a4j:actionparam value="#{someOtherOtherData}" name="secondParam" />
<h:outputText value="#{item.name}"></h:outputText>
</rich:dragSupport>
</rich:panel>
</a4j:outputPanel>
</a4j:repeat>
</rich:panel></a4j:outputPanel>
My Problem: typo in naming of JBoss portlet deployment xml files
Other things to check (from week of research):
Are you deploying the necessary richfaces jar files?
Do you have other js scripts that are causing namespace issues like jQuery or prototype?
It's an old thread, but my answer is: Inside tag < rich:dragSupport/>, must be included < rich:dndParam>.
See http://livedemo.exadel.com/richfaces-demo/richfaces/dragSupport.jsf?tab=usage&cid=289435 for more information.
PD: Sorry for my rustic English, I'm from Argentina...