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

Cannot use the same mark for pushbefore and pushafter conactions #4467

Open
jlacour31 opened this issue Apr 26, 2024 · 0 comments
Open

Cannot use the same mark for pushbefore and pushafter conactions #4467

jlacour31 opened this issue Apr 26, 2024 · 0 comments

Comments

@jlacour31
Copy link

jlacour31 commented Apr 26, 2024

Expected Behavior

The HTML5 output is correctly generated with both before and after conactions.

Actual Behavior

The transformations fails and the console indicates there's no target for 'pushafter' action:

==> Resolve conref push
Reading file:/C:/Users/julien/AppData/Local/Temp/temp20240426111821537/267c226167d04ee45119184331635a2e4c53ef88.dita
Error: file:/D:/test/topics/source.dita:13:35: [DOTJ039E] There is no target specified for the conref push action 'pushafter'. Specify a @conref target and set the 'mark' @conaction on the element that precedes the current element.

If I duplicate the the transformation succeeds:

<step conaction="mark" conref="../reusable/target.dita#target/second">
  <cmd/>
</step>

But still this is quite odd. I don't think the specification mentions you need two marks if you use two actions.

Steps to Reproduce

  1. Download sample.zip
  2. Unzip it and transform it using the following command: dita -v -f html5 -i D:\path\to\book.ditamap -o D:\path\to\out\html5

Stack Trace

D:\dita-ot-4.2.2\plugins\org.dita.base\build_preprocess2.xml:256: java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 20
        at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:582)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:440)
        at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:106)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
        at jdk.internal.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at org.apache.tools.ant.Target.execute(Target.java:449)
        at org.apache.tools.ant.Target.performTasks(Target.java:470)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1374)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
        at org.dita.dost.invoker.Main.runBuild(Main.java:853)
        at org.dita.dost.invoker.Main.startAnt(Main.java:240)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
Caused by: D:\dita-ot-4.2.2\plugins\org.dita.base\build_preprocess2.xml:256: java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 20
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:109)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at org.apache.tools.ant.Target.execute(Target.java:449)
        at org.apache.tools.ant.Target.performTasks(Target.java:470)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
        ... 17 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 20
        at java.xml/com.sun.xml.internal.stream.writers.XMLDOMWriterImpl.writeStartElement(XMLDOMWriterImpl.java:599)
        at org.dita.dost.reader.ConrefPushReader.putElement(ConrefPushReader.java:245)
        at org.dita.dost.reader.ConrefPushReader.startElement(ConrefPushReader.java:166)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
        at org.ditang.relaxng.defaults.RelaxNGDefaultsComponent.startElement(RelaxNGDefaultsComponent.java:220)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.ditang.relaxng.defaults.RelaxDefaultsParserConfiguration.parse(RelaxDefaultsParserConfiguration.java:112)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at org.dita.dost.store.StreamStore.transform(StreamStore.java:139)
        at org.dita.dost.reader.ConrefPushReader.read(ConrefPushReader.java:90)
        at org.dita.dost.module.ConrefPushModule.execute(ConrefPushModule.java:45)
        at org.dita.dost.ant.ExtensibleAntInvoker.execute(ExtensibleAntInvoker.java:210)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
        at jdk.internal.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        ... 24 more

Environment

  • DITA-OT version: 4.2.2
  • Operating system and version: Windows
  • How did you run DITA-OT? dita command
  • Transformation type: HTML5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants