DOMException when using two "ditavalref"'s on first level in map
See original GitHub issueReported here:
https://groups.yahoo.com/neo/groups/dita-users/conversations/messages/43072
I’m attaching a sample project:
There are two ditaval files referenced on the first DITA Map level like:
<map>
<ditavalref href="ditavals/AWS.ditaval"/>
<ditavalref href="ditavals/LINUX.ditaval"/>
I can reproduce problem with both DITA OT 2.x and 3.x:
BUILD FAILED
C:\Users\radu_coravu\Desktop\DITA OT newest\dita-ot-3.0.1\build.xml:45: The following error occurred while executing this line:
C:\Users\radu_coravu\Desktop\DITA OT newest\dita-ot-3.0.1\plugins\org.dita.base\build_preprocess2.xml:110: org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted.
at org.apache.xerces.dom.CoreDocumentImpl.insertBefore(Unknown Source)
at org.apache.xerces.dom.NodeImpl.appendChild(Unknown Source)
at org.dita.dost.module.filter.MapBranchFilterModule.splitBranches(MapBranchFilterModule.java:326)
at org.dita.dost.module.filter.MapBranchFilterModule.processMap(MapBranchFilterModule.java:111)
at org.dita.dost.module.filter.MapBranchFilterModule.execute(MapBranchFilterModule.java:78)
at org.dita.dost.ant.ExtensibleAntInvoker.execute(ExtensibleAntInvoker.java:163)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Multiple ditavalref elements as children of map in a root map
Using multiple instances of the ditavalref element as direct children of the map element in a root map is equivalent to setting multiple...
Read more >google maps two maps on same page [duplicate]
You can have as many maps on a page as you want, aslong as you don't use an ID more than once. You...
Read more >Understanding Map and Set Objects in JavaScript | DigitalOcean
We can demonstrate this by creating a map and using non-string values as keys, as well as setting two values to the same...
Read more >Map - JavaScript - MDN Web Docs - Mozilla
The Map object holds key-value pairs and remembers the original ... loop returns a 2-member array of [key, value] for each iteration.
Read more >Controlling Zoom and Pan | Maps JavaScript API
Users can zoom the map by clicking the zoom controls. They can also zoom and pan by using two-finger movements on the map...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Right, it is murky, and I’m not sure it can be fully handled (correctly) without larger changes to the processing pipeline.
Of course, using more than one
ditavalref
at the start of a map has other issues too. For example if you do it withbookmap
(using the proposed DITA 2.0 model), you can end up with two separate sequences of [front matter, chapters, back matter].I think the best fix here might be:
ditavalref
on the root map, you should take care; it may not be the most logical way to publish information anyway, due to the issues that can come upProblem can still be reproduced with latest DITA OT code.