Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException from pdf2 index-preprocess #275

Closed
jelovirt opened this issue Apr 24, 2012 · 5 comments
Closed

NullPointerException from pdf2 index-preprocess #275

jelovirt opened this issue Apr 24, 2012 · 5 comments

Comments

@jelovirt
Copy link
Member

Converted from SourceForge issue 1880125, submitted by craig_sandvik

DITA-OT 1.4.1 + FO Plug-in 1.4
Getting NullPointerException from indexterm with keyword or varname children. All three variations below provoke the NPE:

foo

foo

foo bar

I don't expect that keyword or varname should necessarily effect the index formatting, but they should not definitely not cause an NPE.

Stack trace is:
[index-preprocess] java.lang.NullPointerException
[index-preprocess] at java.util.StringTokenizer.(StringTokenizer.java:182)
[index-preprocess] at java.util.StringTokenizer.(StringTokenizer.java:204)
[index-preprocess] at com.idiominc.ws.opentopic.fo.index2.util.IndexStringProcessor.processIndexString(IndexStringProcessor.java:64)
[index-preprocess] at com.idiominc.ws.opentopic.fo.index2.IndexPreprocessor.processIndexString(IndexPreprocessor.java:329)
[index-preprocess] at com.idiominc.ws.opentopic.fo.index2.IndexPreprocessor.processIndexNode(IndexPreprocessor.java:223)
[index-preprocess] at com.idiominc.ws.opentopic.fo.index2.IndexPreprocessor.processCurrNode(IndexPreprocessor.java:148)
[index-preprocess] at com.idiominc.ws.opentopic.fo.index2.IndexPreprocessor.processCurrNode(IndexPreprocessor.java:163)
[index-preprocess] at com.idiominc.ws.opentopic.fo.index2.IndexPreprocessor.processCurrNode(IndexPreprocessor.java:163)
[index-preprocess] at com.idiominc.ws.opentopic.fo.index2.IndexPreprocessor.processCurrNode(IndexPreprocessor.java:163)
[index-preprocess] at com.idiominc.ws.opentopic.fo.index2.IndexPreprocessor.processCurrNode(IndexPreprocessor.java:163)
[index-preprocess] at com.idiominc.ws.opentopic.fo.index2.IndexPreprocessor.processCurrNode(IndexPreprocessor.java:163)
[index-preprocess] at com.idiominc.ws.opentopic.fo.index2.IndexPreprocessor.processCurrNode(IndexPreprocessor.java:163)
[index-preprocess] at com.idiominc.ws.opentopic.fo.index2.IndexPreprocessor.process(IndexPreprocessor.java:90)
[index-preprocess] at com.idiominc.ws.opentopic.fo.index2.IndexPreprocessorTask.execute(IndexPreprocessorTask.java:96)
[index-preprocess] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)

@jelovirt
Copy link
Member Author

Submitted by esroberts

We have just been bitten by this bug as well. Our writers have a need to use keywords inside of indexterms and this is preventing them from doing so. Is there any idea when this bug will get fixed?

@jelovirt
Copy link
Member Author

Submitted by craig_sandvik

I wonder if this may be fixed already in a later version, since Eric and I seem to be the only complainers.

For builds run on maps, you can workaround by editing fo/xsl/common/topicmerge.xsl. Add these lines:

<xsl:template match="*[ancestor::*[contains(@class, ' topic/indexterm ')]
                                   and not(contains(@class, ' topic/indexterm '))
                                   and not(contains(@class, ' topic/index-base '))
                                   and not(contains(@class, ' topic/index-see '))
                                   and not(contains(@class, ' topic/index-see-also '))
                                   and not(contains(@class, ' topic/index-sort-as '))
                                   ]">
   <xsl:apply-templates/> 
</xsl:template>

@jelovirt
Copy link
Member Author

Submitted by esroberts

Thanks, Craig. This fixes the issue for us.

@jelovirt
Copy link
Member Author

Submitted by robander

I'm going to close this as a duplicate of 2879663 -- both report the same problem, but the newer issue 2879663 is currently getting more attention so I'd rather keep that one open.

@jelovirt
Copy link
Member Author

Submitted by jelovirt

Duplicate of 3179018.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant