Re: [xml] xmllint - what does the error message "work/xslt/export_ifc.xml:2 : error: Content error in the external subset" mean?



On Tue, Aug 26, 2003 at 04:52:25PM +0200, EXTERN Chakirov Timour (TZ CIS; DS/ESQ3) wrote:
------------------------%<----------------------
user:group> xmllint --dtdvalid
"file:///home/user/etc/xml/edc/filelist/1.0/dtd/export_ifc.dtd" --noout
work/xslt/export_ifc.xml
work/xslt/export_ifc.xml:2: error: Content error in the external subset
<!DOCTYPE FILE-LIST PUBLIC "-//EDC//filelist 1.0//EN" "">
^
work/xslt/export_ifc.xml:2: error: Extra content at the end of the document
<!DOCTYPE FILE-LIST PUBLIC "-//EDC//filelist 1.0//EN" "">
^
------------------------%<----------------------
What does these error messages mean? 

Your XML element should have a system identifier not empty (second string
in the doctype). Actually you should use

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE FILE-LIST PUBLIC "-//EDC//filelist 1.0//EN"
   "file:///home/user/etc/xml/edc/filelist/1.0/dtd/export_ifc.dtd">
 ...

 and use xmllint --valid work/xslt/export_ifc.xml

Basically an empty string for the URI reference, means you want to use
the XML document as the DTD, and xmllint raises an error because 
<!DOCTYPE construct is a well formedness error if found in a DTD.

In a nutshell: never use "" for the system identifier !

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]