[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Inserting ENTITYs without removing the DOCTYPE in Docbook files
Hello,
I am trying to resolve/replace the ENTITYs in my Docbook files without
removing the DOCTYPE declaration. I tried using XMLLINT:
xmllint --noent --dropdtd -o outfile.xml
infile.xml
but this removed the DOCTYPE line along with resolving the ENTITYs. So
if I don't use the --dropdtd then I get all of the ENTITYs brought in by the
ENTITY line in the DOCTYPE.
Here is the snippet of XML that I start with:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.docbook.org/xml/4.5/docbookx.dtd"[ <!ENTITY % my-defs SYSTEM "my-defs.mod"> %my-defs; ]> <chapter id="introduction-and-overview"> <title>Introduction and Overview</title> <section> <title>Introduction</title> <para> &CORP_NAME; Veneer Testers are high-speed, production-line testing machines for precision grading of wood veneer. The different models of &CORP_NAME; Veneer Testers measure different properties (or combinations of properties) of veneer in order to grade it. </para>
Here is what I am getting now with the --dropdtd
<?xml version="1.0" encoding="utf-8"?> <chapter id="introduction-and-overview"> <title>Introduction and Overview</title> <section> <title>Introduction</title> <para> Metriguard Veneer Testers are high-speed, production-line testing machines for precision grading of wood veneer. The different models of Metriguard Veneer Testers measure different properties (or combinations of properties) of veneer in order to grade it. </para> Here is what I want:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.docbook.org/xml/4.5/docbookx.dtd"[ <!ENTITY % my-defs SYSTEM "my-defs.mod"> %my-defs; ]> <chapter id="introduction-and-overview"> <title>Introduction and Overview</title> <section> <title>Introduction</title> <para> Metriguard Veneer Testers are high-speed, production-line testing machines for precision grading of wood veneer. The different models of Metriguard Veneer Testers measure different properties (or combinations of properties) of veneer in order to grade it. </para> My question is has anyone dealt with this before? and how?
Regards,
Dean Nelson |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]