Getting olink working in DocBook 5
Posted: Thu Sep 22, 2016 9:32 pm
Hi,
I have an evaluation copy of XML Author and I'm trying to get olink working but I'm getting the error "F [Saxon6.5.5] A DOCTYPE is not allowed in content." in target.db.
Here are the custom parameters in my xsl:
Here is the target.db (which is generated automatically):
Here is olinkdb.xml:
Here is my main document, manual.xml:
Here is the included document, second.xml:
And here is the bibliography, bib.xml:
I have an evaluation copy of XML Author and I'm trying to get olink working but I'm getting the error "F [Saxon6.5.5] A DOCTYPE is not allowed in content." in target.db.
Here are the custom parameters in my xsl:
Code: Select all
bibliography.collection '${cfdu}/jabref.xml'
bibliography.numbered '1'
collect.xref.targets 'yes'
html.ext 'xhtml'
section.autolabel '1'
section.label.includes.component.label '1'
target.database.document '${cfdu}/olinkdb.xml'
targets.filename '${pd}/target.db'
Code: Select all
<!DOCTYPE div
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<div element="book" href="#manual" number="" targetptr="manual">
<ttl>Manual</ttl>
<xreftext>Manual</xreftext>
<div element="chapter" href="#secondCh" number="1" targetptr="secondCh">
<ttl>Second</ttl>
<xreftext>Chapter 1, <em xmlns="http://www.w3.org/1999/xhtml">Second</em></xreftext>
</div>
<div element="bibliography" href="#bib" number="" targetptr="bib">
<ttl>Bibliography</ttl>
<xreftext>Bibliography</xreftext>
<obj element="bibliomixed" href="#Duan2016" number="" targetptr="Duan2016">
<ttl>???TITLE???</ttl>
<xreftext>1</xreftext>
</obj>
<obj element="bibliomixed" href="#Pierce2016" number="" targetptr="Pierce2016">
<ttl>???TITLE???</ttl>
<xreftext>2</xreftext>
</obj>
</div>
</div>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE targetset SYSTEM "file:/C:/Program%20Files/Oxygen%20XML%20Author%2018/frameworks/docbook/xsl/common/targetdatabase.dtd" [
<!ENTITY manualTargets SYSTEM "file:/S:/Examples/WordReplacement/DocBook/target.db">
]>
<targetset>
<targetsetinfo> Description of this target database document. </targetsetinfo>
<!-- Site map for generating relative paths between documents -->
<sitemap>
<dir name="out">
<dir name="xhtml">
<document targetdoc="manual" baseuri="manual.xhtml">&manualTargets;</document>
</dir>
</dir>
</sitemap>
</targetset>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://docbook.org/xml/5.0/rng/docbookxi.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://docbook.org/xml/5.0/rng/docbook.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<book xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:id="manual">
<info>
<title>Manual</title>
<author>
<orgname>Musculoskeletal Research Laboratories</orgname>
<address>
<street>50 S. Central Campus Drive</street>
<city>Salt Lake City</city>
<state>Utah</state>
<postcode>84112</postcode>
</address>
</author>
</info>
<!--<xi:include href="first.xml"/>-->
<xi:include href="second.xml"/>
<xi:include href="bib.xml"/>
</book>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://docbook.org/xml/5.0/rng/docbook.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://docbook.org/xml/5.0/rng/docbook.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0" xml:id="secondCh">
<title>Second</title>
<para>Here is a citation reference <olink targetdoc="bib" targetptr="Duan2016"/></para>
</chapter>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://docbook.org/xml/5.0/rng/docbook.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://docbook.org/xml/5.0/rng/docbook.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<bibliography xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="bib">
<bibliomixed xml:id="Duan2016"></bibliomixed>
<bibliomixed xml:id="Pierce2016"></bibliomixed>
</bibliography>