
Hi, I'm having some problems with creating a custom DTD. I've been trying to follow the directions at http://www.docbook.org/tdg/en/html/ch05.html without success. Can someone please give me some feedback on what I have done so far? Thanks, Geoff In Oxygen6 I have added my catalog file and unchecked the Use default catalog check box. When I validate my custom dtd I get the error: ====================================================== F|White spaces are required between publicId and systemId|utas-itr-docbook.dtd|38:1 ========================================================= My custom dtd is D:/Documents/Documentation/single-source/utas-itr-docbook.dtd: ======================================================= <?xml version="1.0" encoding="UTF-8"?> <!-- -//UTAS-ITR//DTD DocBook V4.3-Based Subset V1.0//EN --> <!-- ====================================================== overrides start here --> <!-- remove msgset only ===================================================== --> <!ENTITY % compound.class "Procedure|SideBar|qandaset|task"> <!ENTITY % msgset.content.module "IGNORE"> <!ENTITY % ebnf.block.hook "IGNORE"> <!-- remove some computer inlines =============================================== --> <!-- classname, methodname, interfacename, exceptionname, ooclass, oointerface, ooexception --> <!-- hardware, interface, medialabel, structfield, structname, token --> <!ENTITY % tech.char.class "action|application |command|computeroutput |database|email|envar|errorcode|errorname|errortype|errortext|filename |function|guibutton|guiicon|guilabel|guimenu|guimenuitem |guisubmenu|keycap |keycode|keycombo|keysym|literal|code|constant|markup |menuchoice|mousebutton|option|optional|parameter |prompt|property|replaceable|returnvalue|sgmltag |symbol|systemitem|uri|type|userinput|varname"> <!ENTITY % classname.module "IGNORE"> <!ENTITY % methodname.module "IGNORE"> <!ENTITY % interfacename.module "IGNORE"> <!ENTITY % exceptionname.module "IGNORE"> <!ENTITY % ooclass.module "IGNORE"> <!ENTITY % oointerface.module "IGNORE"> <!ENTITY % ooexception.module "IGNORE"> <!ENTITY % hardware.module "IGNORE"> <!ENTITY % interface.module "IGNORE"> <!ENTITY % medialabel.module "IGNORE"> <!ENTITY % structfield.module "IGNORE"> <!ENTITY % structname.module "IGNORE"> <!ENTITY % token.module "IGNORE"> <!--====================================================== overrides finish here --> <!--<!ENTITY % orig-docbook SYSTEM "../docbook-dtd-4.3/docbookx.dtd">--> <!ENTITY % orig-docbook PUBLIC "-//OASIS//DTD DocBook V4.3//EN"> %orig-docbook; <!--====================================================== new stuff starts here --> <!--==================================================== new stuff finishes here --> ================================================================== My catalog file is D:/Documents/Documentation/single-source/itr-catalog.xml: ===================================================== <?xml version='1.0'?> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <group prefer="public" xml:base="../docbook-dtd-4.3/"> <public publicId="-//OASIS//DTD DocBook XML V4.3//EN" uri="docbookx.dtd"/> <system systemId="http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" uri="docbookx.dtd"/> </group> <group prefer="public" xml:base="/"> <public publicId="-//UTAS-ITR/DTD DocBook V4.3-Based Subset V1.0//EN" uri="utas-itr-docbook.dtd"/> <system systemId="file:///d:/documents/documentation/single-source/utas-itr-docbook.dtd" uri="utas-itr-docbook.dtd"/> </group> </catalog> ======================================================== Working on WinXP I have this directory structure for my projects: ======================================================= D:. +---Documents | +---Documentation | | +---CommonServices | | | \---ImageSource | | +---CourseUnit | | | +---html-output | | | +---htmlhelp-output | | | +---ImageSource | | | +---javahelp-output | | | +---rtf_sample | | | \---schemas | | | +---Client_XML | | | \---DB_XML | | +---docbook-dtd-4.3 | | | \---ent | | +---docbook-xsl-1.68.1 | | | +---common | | | +---doc | | | | +---common | | | | +---fo | | | | +---html | | | | +---lib | | | | +---pi | | | | \---template | | | +---docsrc | | | | +---common | | | | +---fo | | | | +---html | | | | +---pi | | | | \---template | | | +---eclipse | | | +---extensions | | | | +---saxon643 | | | | | \---com | | | | | \---nwalsh | | | | | \---saxon | | | | \---xalan2 | | | | \---com | | | | \---nwalsh | | | | \---xalan | | | +---fo | | | +---html | | | +---htmlhelp | | | +---images | | | | \---callouts | | | +---javahelp | | | +---lib | | | +---manpages | | | +---params | | | +---profiling | | | +---template | | | \---xhtml | | +---Fees | | | \---ImageSource | | +---Glossary | | | +---html-output | | | \---htmlhelp-output | | +---HESA | | | \---ImageSource | | +---single-source | | | +---images | | | | +---admon | | | | \---callouts | | | \---ImageSource | | +---Standards | | | +---html-output | | | +---htmlhelp-output | | | \---ImageSource | | +---testing | | \---zzRemoved ================================================ ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/

Dear Geoff, The error is not related to the XML catalog or the directory structure. It is a DTD validation error and it is caused by violating the rules of well-formed DTDs specified in the W3C XML 1.0 Recommendation. The error message is not very clear but if you click on the line with the error in the <oXygen/>'s Errors view the line that references the parameter entity *orig-docbook* is highlighted. The declaration of that entity violates the production rule 75 from the recommendation: http://www.w3.org/TR/REC-xml/#sec-external-ent That means you provided a public ID but not a system ID. It is not really your mistake because there are such wrong declarations on the website page that you referred. So instead of <!ENTITY % orig-docbook PUBLIC "-//OASIS//DTD DocBook V4.3//EN"> %orig-docbook; you need something like <!ENTITY % orig-docbook PUBLIC "-//OASIS//DTD DocBook V4.3//EN" "file:/D:/Documents/Documentation/single-source/put-the-name-here.dtd"> %orig-docbook; Or you need the other form of external entity declaration: <!ENTITY % orig-docbook SYSTEM "file:/D:/Documents/Documentation/single-source/put-the-name-here.dtd"> %orig-docbook; Excepting that you followed Norman Walsh's instructions correctly and you are on the right way to a working customization layer. I hope this helps, Sorin <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com/ lists@userdox.com wrote:
Hi,
I'm having some problems with creating a custom DTD. I've been trying to follow the directions at http://www.docbook.org/tdg/en/html/ch05.html without success. Can someone please give me some feedback on what I have done so far?
Thanks,
Geoff
In Oxygen6 I have added my catalog file and unchecked the Use default catalog check box.
When I validate my custom dtd I get the error: ====================================================== F|White spaces are required between publicId and systemId|utas-itr-docbook.dtd|38:1 =========================================================
My custom dtd is D:/Documents/Documentation/single-source/utas-itr-docbook.dtd: ======================================================= <?xml version="1.0" encoding="UTF-8"?> <!-- -//UTAS-ITR//DTD DocBook V4.3-Based Subset V1.0//EN --> <!-- ====================================================== overrides start here --> <!-- remove msgset only ===================================================== --> <!ENTITY % compound.class "Procedure|SideBar|qandaset|task"> <!ENTITY % msgset.content.module "IGNORE"> <!ENTITY % ebnf.block.hook "IGNORE">
<!-- remove some computer inlines =============================================== --> <!-- classname, methodname, interfacename, exceptionname, ooclass, oointerface, ooexception --> <!-- hardware, interface, medialabel, structfield, structname, token --> <!ENTITY % tech.char.class "action|application |command|computeroutput |database|email|envar|errorcode|errorname|errortype|errortext|filename |function|guibutton|guiicon|guilabel|guimenu|guimenuitem |guisubmenu|keycap |keycode|keycombo|keysym|literal|code|constant|markup |menuchoice|mousebutton|option|optional|parameter |prompt|property|replaceable|returnvalue|sgmltag |symbol|systemitem|uri|type|userinput|varname"> <!ENTITY % classname.module "IGNORE"> <!ENTITY % methodname.module "IGNORE"> <!ENTITY % interfacename.module "IGNORE"> <!ENTITY % exceptionname.module "IGNORE"> <!ENTITY % ooclass.module "IGNORE"> <!ENTITY % oointerface.module "IGNORE"> <!ENTITY % ooexception.module "IGNORE"> <!ENTITY % hardware.module "IGNORE"> <!ENTITY % interface.module "IGNORE"> <!ENTITY % medialabel.module "IGNORE"> <!ENTITY % structfield.module "IGNORE"> <!ENTITY % structname.module "IGNORE"> <!ENTITY % token.module "IGNORE">
<!--====================================================== overrides finish here --> <!--<!ENTITY % orig-docbook SYSTEM "../docbook-dtd-4.3/docbookx.dtd">--> <!ENTITY % orig-docbook PUBLIC "-//OASIS//DTD DocBook V4.3//EN"> %orig-docbook;
<!--====================================================== new stuff starts here -->
<!--==================================================== new stuff finishes here --> ==================================================================
My catalog file is D:/Documents/Documentation/single-source/itr-catalog.xml: ===================================================== <?xml version='1.0'?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <group prefer="public" xml:base="../docbook-dtd-4.3/"> <public publicId="-//OASIS//DTD DocBook XML V4.3//EN" uri="docbookx.dtd"/> <system systemId="http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" uri="docbookx.dtd"/> </group> <group prefer="public" xml:base="/"> <public publicId="-//UTAS-ITR/DTD DocBook V4.3-Based Subset V1.0//EN" uri="utas-itr-docbook.dtd"/> <system systemId="file:///d:/documents/documentation/single-source/utas-itr-docbook.dtd" uri="utas-itr-docbook.dtd"/> </group> </catalog> ========================================================
Working on WinXP I have this directory structure for my projects: ======================================================= D:. +---Documents | +---Documentation | | +---CommonServices | | | \---ImageSource | | +---CourseUnit | | | +---html-output | | | +---htmlhelp-output | | | +---ImageSource | | | +---javahelp-output | | | +---rtf_sample | | | \---schemas | | | +---Client_XML | | | \---DB_XML | | +---docbook-dtd-4.3 | | | \---ent | | +---docbook-xsl-1.68.1 | | | +---common | | | +---doc | | | | +---common | | | | +---fo | | | | +---html | | | | +---lib | | | | +---pi | | | | \---template | | | +---docsrc | | | | +---common | | | | +---fo | | | | +---html | | | | +---pi | | | | \---template | | | +---eclipse | | | +---extensions | | | | +---saxon643 | | | | | \---com | | | | | \---nwalsh | | | | | \---saxon | | | | \---xalan2 | | | | \---com | | | | \---nwalsh | | | | \---xalan | | | +---fo | | | +---html | | | +---htmlhelp | | | +---images | | | | \---callouts | | | +---javahelp | | | +---lib | | | +---manpages | | | +---params | | | +---profiling | | | +---template | | | \---xhtml | | +---Fees | | | \---ImageSource | | +---Glossary | | | +---html-output | | | \---htmlhelp-output | | +---HESA | | | \---ImageSource | | +---single-source | | | +---images | | | | +---admon | | | | \---callouts | | | \---ImageSource | | +---Standards | | | +---html-output | | | +---htmlhelp-output | | | \---ImageSource | | +---testing | | \---zzRemoved ================================================
------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
participants (2)
-
lists@userdox.com
-
Sorin Ristache