DOCTYPE not allowed in content,
Posted: Wed May 08, 2024 1:06 am
Hey, thanks for looking!
I have some lovely MIL-STD-40051 xml that is DTD 6.5 compliant.
I usually work in Arbortext but I'm trying Oxygen again.
I have 200+ individual xml documents, and a "wrapper" file that references them all as entities for publication.
XML from the wrapper:
I'll spare you the list, all the separate documents are declared.
In Arbortext, each document is imported by reference:
When I try to validate in Oxygen Developer, it stops at the first entity reference, &goooo1;
reporting a fatal error as identified by Xerxes,
A DOCTYPE is not allowed in content.
The error is coming from the doctype in the first file being referenced as an entity.
And it's legit, every one of those ~150 XML documents has a DOCTYPE declaration.
Arbortext does not report any of this as an error and will happily generate a PDF from the "wrapper" document using the xsl style sheets provided with the DTD. I've been working with AT since version 5. I keep trying to cut over to oxygen, but the learning curve is kind of steep and I keep getting frustrated.
There is probably some simple solution, but I cannot for the life of me find it.
The other issue I am seeing is that when oxygen validates individual documents, it flags references to other documents as a validation error.
A generic link to another document <xref wpid="m00001"> should go to XML document m00001 when published, but does not go anywhere when considering the file by itself, and that is OK.
I did figure out how to ignore that validation error (I think).
Any tips on how to get Oxygen to check that would be swell, too.
Thanks in advance for any help.
Dan
I have some lovely MIL-STD-40051 xml that is DTD 6.5 compliant.
I usually work in Arbortext but I'm trying Oxygen again.
I have 200+ individual xml documents, and a "wrapper" file that references them all as entities for publication.
XML from the wrapper:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE production PUBLIC "-//USA-DOD//DTD -1/2C TM Assembly REV C 6.5 20200930//EN" "../40051c_6_5/40051c_6_5.dtd" [
<!ENTITY g00001 SYSTEM "../xmlfiles/g00001.xml">
<!ENTITY g00003 SYSTEM "../xmlfiles/g00003.xml">
<!ENTITY g00006 SYSTEM "../xmlfiles/g00006.xml">
<!ENTITY o00001 SYSTEM "../xmlfiles/o00001.xml">
<!ENTITY o00002 SYSTEM "../xmlfiles/o00002.xml">
<!ENTITY o00003 SYSTEM "../xmlfiles/o00003.xml">
<!ENTITY o00004 SYSTEM "../xmlfiles/o00004.xml">
<!ENTITY o00005 SYSTEM "../xmlfiles/o00005.xml">
<!ENTITY o00006 SYSTEM "../xmlfiles/o00006.xml">
In Arbortext, each document is imported by reference:
Code: Select all
<!-- gim -->
<!-- <!ELEMENT gim (titlepg, ((ginfowp, (bdar-geninfowp | (descwp+, thrywp*) | dmwr_introwp)) | (softginfowp, softsumwp, softeffectwp*, softdiffversionwp*) | (genmaint_ginfowp, descwp) | (pm-ginfowp) | (pms-ginfowp)))> -->
<gim chap-toc="no" chngno="0" revno="0"><titlepg maintlvl="operator">
<name>BIG GREEN TRUCK</name>
</titlepg>
<!-- Intro and theory of operation g00001 -->&g00001;
<!-- Equipment Description and Data g00006 -->&g00006;
<!-- Theory of Operation g00003 -->&g00003;
</gim>
<!-- opim -->
<!-- <!ELEMENT opim (titlepg, ((ctrlindwp+, opusualwp+, opunuwp+, emergencywp*, stowagewp*, eqploadwp*) | dmwr_operationalreqwp*))> -->
<opim chap-toc="no" chngno="0" revno="0"><titlepg maintlvl="operator">
<name>BIG GREEN TRUCK</name>
</titlepg>
<!-- Chapter 2 - Operator Instructions -->
<!-- DESCRIPTION AND USE OF OPERATOR CONTROLS AND INDICATORS per 40051-->
<!-- instrument panel -->&o00001;
<!-- aux panel -->&o00059;
<!-- center console -->&o00091;
<!-- steering col -->&o00092;
<!-- floor -->&o00093;
<!-- seat -->&o00095;
<!-- door -->&o00094;
When I try to validate in Oxygen Developer, it stops at the first entity reference, &goooo1;
reporting a fatal error as identified by Xerxes,
A DOCTYPE is not allowed in content.
The error is coming from the doctype in the first file being referenced as an entity.
And it's legit, every one of those ~150 XML documents has a DOCTYPE declaration.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ginfowp PUBLIC "-//USA-DOD//DTD -1/2C TM Assembly REV C 6.5 20200930//EN" "../40051c_6_5/40051c_6_5.dtd">
<ginfowp wpno="g00001">
Arbortext does not report any of this as an error and will happily generate a PDF from the "wrapper" document using the xsl style sheets provided with the DTD. I've been working with AT since version 5. I keep trying to cut over to oxygen, but the learning curve is kind of steep and I keep getting frustrated.
There is probably some simple solution, but I cannot for the life of me find it.
The other issue I am seeing is that when oxygen validates individual documents, it flags references to other documents as a validation error.
A generic link to another document <xref wpid="m00001"> should go to XML document m00001 when published, but does not go anywhere when considering the file by itself, and that is OK.
I did figure out how to ignore that validation error (I think).
Any tips on how to get Oxygen to check that would be swell, too.
Thanks in advance for any help.
Dan