[xsl] How to disable/turn off the inclusion of DTD in html/xhtml to xml

Subject: [xsl] How to disable/turn off the inclusion of DTD in html/xhtml to xml
From: Jack Bush <netbeansfan@xxxxxxxxxxxx>
Date: Wed, 21 Jul 2010 06:22:07 -0700 (PDT)
Hi All,
 
I wondering whether it is possible to disable/turn off the inclusion
of the 
following DTD when converting html/xhtml to xml using Saxon 9.1
builder with 
TagSoup parser:

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
Saxon 9.1 XSLT 2.0 process has not had any issue opening these converted xml
files individually. However, the following error has to cause grievances
during 
transformation process where it appears that XSLT processor is not
able to pick 
up the local DTD file supplied by Apache Resolver through
Catalog.xml:
 
Parse catalog: ///e:/catalog.xml
Loading catalog:
///e:/catalog.xml
Default BASE: file:/e:/catalog.xml
xml:base: file:///E:/
BASE STR: file:///E:/
override: no
OVERRIDE: no
public: -//W3C//DTD XHTML 1.0
Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
PUBLIC: -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
system:
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
xhtml1-transitional.dtd
SYSTEM:
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
file:/E:/xhtml1-transitional.dtd
system: xhtml1-transitional.dtd
xhtml1-transitional.dtd
SYSTEM: xhtml1-transitional.dtd
file:/E:/xhtml1-transitional.dtd
uri: corporationStyleSheet.xsl
corporationStyleSheet.xsl
URI: corporationStyleSheet.xsl
file:/E:/corporationStyleSheet.xsl
(reset) xml:base: file:/e:/catalog.xml
BASE
STR: file:/e:/catalog.xml
resolveSystem(http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd)
Resolved system: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
file:/E:/xhtml1-transitional.dtd
resolveSystem(file:/E:/xhtml-lat1.ent)
resolvePublic(-//W3C//ENTITIES Latin 1 for XHTML//EN,file:/E:/xhtml-lat1.ent)
resolveSystem(file:/E:/tmp/xhtml-symbol.ent)
resolvePublic(-//W3C//ENTITIES
Symbols for XHTML//EN,file:/E:/xhtml-symbol.ent)
resolveSystem(file:/E:/tmp/xhtml-special.ent)
resolvePublic(-//W3C//ENTITIES
Special for XHTML//EN,file:/E:/xhtml-special.ent)
Recoverable error on line 10
FODC0002: java.io.IOException: Server returned HTTP response code: 503 for
URL:
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
Exception in
thread "main" java.lang.IllegalStateException: Root element not set
at
org.jdom.Document.getContent(Document.java:408)
at
org.jdom.output.XMLOutputter.output(XMLOutputter.java:369)
at
org.jdom.output.XMLOutputter.output(XMLOutputter.java:203)
at
CorporationBean.java:275)
 
Subsequent tests on the same stylesheet but
different xml files that do not have 

the above entity DTD reference have
worked. In fact, the FODC0002 error broke 
transformation when either the main
or secondary xml files which references this 

DTD entry.
 
It is not
necessary to include entity reference as the data has already been 
supplied
so I would like to get rid of it altogether, if possible.
 
I have been trying
as best with no avail or response from anyone.

Any assistance would be much
appreciated.
Thanks in advance,
Jack

Current Thread