[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

document() call clashes with DOCTYPE declaration?

Subject: document() call clashes with DOCTYPE declaration?
From: Greg Faron <gfaron@xxxxxxxxxxxxxxxxxx>
Date: Thu, 02 May 2002 16:28:14 -0600
msxsl4.0
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 &amp; 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 &copy; 2002 John Wiley &amp; Sons, Inc.</CRLN>
          <CRNM>John Wiley &amp; 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 &copy; 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.