This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
document() call clashes with DOCTYPE declaration?
- From: Greg Faron <gfaron at integretechpub dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Thu, 02 May 2002 16:28:14 -0600
- Subject: [xsl] document() call clashes with DOCTYPE declaration?
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi all,
Short:
How does one "close" a DOCTYPE assignment tag?
Long version:
I'm running MSXSL4.0 (within XML Spy) and am trying to use document()
within the XSL to read in about 40 different files. Below is the first of
them in its entirety.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE JWSCHA SYSTEM "../../JWSCHA/jwscha.dtd">
<!-- Produced by Greg Faron of Integre Technical Publishing -->
<JWSCHA DTDVER="20010907v1.3" LANGUAGE="EN">
<JWSBHD>
<META>
<PINFO>
<PNM>John Wiley & Sons, Inc.</PNM>
<PLOC>New York</PLOC>
</PINFO>
<BINFO>
<BID>GREG_BID</BID>
<BTL LANGUAGE="EN">Functional Analysis</BTL>
<ISBN TYPE="TC">0471556041</ISBN>
<SUBG>
<SUBJ>GREG_SUBJ</SUBJ>
</SUBG>
</BINFO>
<PUBINFO>
<BOOKTYPE BOOKTYPE="SA"/>
<AUG>
<AU>
<FNMS>Peter D.</FNMS>
<SNM>Lax</SNM>
</AU>
</AUG>
</PUBINFO>
</META>
<CHACON LANGUAGE="EN">
<CHAINFO>
<CID>ch1</CID>
<FILEID>chap01</FILEID>
<CHATY CHATY="CH"/>
<FIGCT COUNT="0"/>
<TABCT COUNT="0"/>
<REFCT COUNT="0"/>
<PPCT COUNT="7"/>
<PPF FIRST="1"/>
<PPL LAST="7"/>
<SEQINBOK SEQNO="20"/>
<CRNG PUBL="YES">
<CRLN>Copyright © 2002 John Wiley & Sons, Inc.</CRLN>
<CRNM>John Wiley & Sons, Inc.</CRNM>
<CRYR YEAR="2002">2002</CRYR>
</CRNG>
</CHAINFO>
<TIG>
<CTL LANGUAGE="EN" CHALAB="1">Linear Spaces</CTL>
</TIG>
</CHACON>
</JWSBHD>
</JWSCHA>
I receive the following error:
XSL Transformation failed due to following error:
Error while parsing "file:///M:/books/wiley/lax/xml/c01.xml". A declaration
was not closed.
when I try to execute this call:
<xsl:template match="/">
<xsl:variable name="c01" select="document('c01.xml')/JWSCHA/JWSBHD/CHACON"/>
<xsl:value-of select="$c01/CHAINFO/SEQINBOK/@SEQNO"/>
</xsl:template>
matched against a dummy file with an empty root node.
Has anyone seen this before and know what to do about it? When I remove
the DOCTYPE line (and the © entity reference), it works fine. How do
you close a <!DOCTYPE> tag?
Greg Faron
Integre Technical Publishing Co.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list