The content introduced by the coderef tag is not subject to topic-reader processing
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 455
- Forks
- 211
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 3
Description
Expected Behavior
The content introduced by the coderef tag was not added with the ITA -ot:x="3" ITA -ot:y="1" attribute during the preprocessing phase, causing me to report an error when converting the document using pdf2
Actual Behavior
001.dita
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic_union_01" >
<topic id="topic_union_01_1" >
<title></title>
<body>
</body>
</topic>
<coderef parse="xml" href="001-2.dita" />
</topic>
001-2.dita
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="topic-bbbbb">
<title>test</title>
<body>
<p>
<table>
<tgroup cols="8">
<colspec colname="col1" colwidth="0.05*"/>
<colspec colname="col2" colwidth="0.05*"/>
<colspec colname="col3" colwidth="0.09*"/>
<colspec colname="col4" colwidth="0.23*"/>
<colspec colname="col5" colwidth="0.17*"/>
<colspec colname="col6" colwidth="0.13*"/>
<colspec colname="col7" colwidth="0.18*"/>
<colspec colname="col8" colwidth="0.1*"/>
<tbody>
<row valign="middle">
<entry height="30" valign="middle" align="center">type</entry>
<entry valign="middle" align="center">1</entry>
<entry valign="middle" align="center">2</entry>
<entry valign="middle" align="center">3</entry>
<entry valign="middle" align="center">4</entry>
<entry valign="middle" align="center">5</entry>
<entry valign="middle" align="center">6</entry>
<entry valign="middle" align="center">7</entry>
</row>
</tbody>
</tgroup>
</table>
</p>
</body>
</topic>
Possible Solution
The 'topic-reader' step parses the file and generates the attributes dita-ot:x="3" dita-ot:y="1"
The 'preprocess2.topic-fragment' step processes the coderef tag and inserts the content into the destination location
Because the content is not processed by the topic-reader step, the content is missing some attributes
Do you run the topic-reader logic to supplement it while processing?
Steps to Reproduce
- Create 001.dita and 001-2.dita files
- Run the following commands to process the 001.dita and 001-2.dita files respectively
- In the temp directory, view the file changes
Copy of the error message, log file or stack trace
https://github.com/kafeim/error-file/blob/main/log.log
Environment
windows 11 java 17.0.7
- DITA-OT version: 4.2.4
- Operating system and version: windows
(Linux, macOS, Windows) - How did you run DITA-OT?
(ditacommand, Ant,startcmd, oXygen, other editor, CMS, etc.)
./bin/dita -i 001-2.dita
--format=pdf2
-o demo/out -d
--clean.temp no
-l demo/log.log
--temp demo/temp
-Dvalidate=false
- Transformation type: pdf2
(HTML5, PDF, custom, etc.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the topic-reader and preprocess2.topic-fragment steps, using the 001.dita and 001-2.dita examples and the provided pdf2 command. Compare the temporary files to see where dita-ot:x="3" and dita-ot:y="1" are absent from coderef content; done means the converted output includes the expected attributes and no longer reports the described error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, xml
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100