This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

document() call clashes with DOCTYPE declaration?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]