References from object treated as local, break pdf
See original GitHub issueExpected Behavior
I’ve got the following object element:
<object data="https://www.youtube.com/embed/BaUjhYw8IK4" width="640" height="480" props="kc">
<desc>Sample video</desc>
</object>
For HTML, I expect this to render proprely as <object>
, which it does in 2.5 and 3.0. For PDF, I expect to at least get a PDF, whether or not any video link appears.
Actual Behavior
- In DITA-OT 2.5.4 this generates errors in the
copy-html
step:[copy] Failed to copy https://www.youtube.com/embed/BaUjhYw8IK4 to C:\DCS\2.5.4\test\object\outot25\https:\www.youtube.com\embed\BaUjhYw8IK4 due to java.io.FileNotFoundException C:\DCS\2.5.4\test\object\outot25\https:\www.youtube.com\embed\BaUjhYw8IK4 (The filename, directory name, or volume label syntax is incorrect.)
- In DITA-OT 3.0, the HTML5 build begins generating errors in
gen-list
and actually writes the full linked file into the log, beginning with:
[gen-list] Processing https://www.youtube.com/embed/BaUjhYw8IK4
[gen-list] Warning at xsl:stylesheet on line 6 column 31 of utils.xsl:
[gen-list] Stylesheet module classpath:///utils.xsl is included or imported more than once. This is
[gen-list] permitted, but may lead to errors or unexpected behavior
[gen-list] <html lang="en" dir="ltr" data-cast-api-enabled="true"><head><meta name="viewport" content="width=device-width, initial-scale=1"/>.....
- In DITA-OT 2.5.4, for PDF, I just don’t get any output for the
<object>
which is probably expected? But I also get the errors incopy-html
step. - In DITA-OT 3.0 I get a build failure from
preprocess2
duringtopic-reader
:
topic-reader:
[topic-reader] Using Xerces grammar pool for DTD and schema caching.
[topic-reader] Reading file:/C:/Users/IBM_AD~1/AppData/Local/Temp/temp20171204114654541/3c1800f39f5b7298def0161594fc05a5c1b1c37f.ditamap
[topic-reader] Processing file:/C:/DCS/2.5.3/test/object/objecttopic.dita to file:/C:/Users/IBM_AD~1/AppData/Local/Temp/temp20171204114654541/301cafc00339e9b3edf1b835f7da0f7852dfb307.dita
[topic-reader] Processing https://www.youtube.com/embed/BaUjhYw8IK4 to file:/C:/Users/IBM_AD~1/AppData/Local/Temp/temp20171204114654541/44100a95ff76fdda357167ae391ab249a6fdecfb
[topic-reader] Warning at xsl:stylesheet on line 6 column 31 of utils.xsl:
[topic-reader] Stylesheet module classpath:///utils.xsl is included or imported more than once. This is
[topic-reader] permitted, but may lead to errors or unexpected behavior
Error: java.nio.file.InvalidPathException: Illegal char <:> at index 5: https:\www.youtube.com\embed\BaUjhYw8IK4
Possible Solution
The workaround is to use @datakeyref
, and on the key definition set scope="external"
. But, we shouldn’t be crashing (and I’ve got a lot of objects coded like this in older material). Not sure of the code solution.
Steps to Reproduce
Samples attached - build to html5
or pdf
to reproduce. Samples include the broken <object>
as well as one that uses keys to get better results:
object.zip
Environment
- DITA-OT version: 2.5.4, 3.0
- Operating system and version: Windows 7
- How did you run DITA-OT?
dita
command - Transformation type:
html5
,pdf
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Objects With Fields Treated by Reference (OOP-style) - R
Computations with objects from reference classes invoke methods on them and extract or set their fields, using the `$` operator in R. The...
Read more >Java Where do Local variables,Object references,instance ...
Local variable d (allocated on stack) contains a reference to an object of class Duck . In general objects are allocated on the...
Read more >basic-legal-citation.pdf - Law.Cornell.Edu
and, in states where one exists, a local citation guide. ... While the principal citation reference works still treat the citation of electronically ......
Read more >Manipulating documents - Learn web development | MDN
You can use this object to return and manipulate information on the HTML and CSS that comprises the document, for example get a...
Read more >Understanding JSON Schema
JSON Schema is a powerful tool for validating the structure of JSON data. However, learning to use it by reading its.
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 FreeTop 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
Top GitHub Comments
Offtopic The followng Ant snippet downloads the YouTube teaser image. Maybe this helps someone, who wants to use it as a placeholder in PDF:
Fixed with #3306