Parser Error Content Error In The External Subset
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up XML Content error in external subset / Extra content at the end of the document up vote 1 down vote favorite I have XML with external DTD: XML: Chevrolet Camaro Zluta 2003 YFA205AF7780R 1 Opel Manta Cerna 1895 YFA404AE67POL 1 Milan Soustal 5% DTD: Im getting Content error in external subset when i try to validate XML and Extra content at the end of the document error when validating DTD. Thanks for help! xml dtd share|improve this question edited Mar 4 '14 at 15:32 helderdarocha 14.5k31535 asked Mar 4 '14 at 15:13 user3379599 62 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote Your DTD is incorrect because you didn't specify the name of the attributes: The syntax for declaring attributes required that you provide the attribute name:
Subject: Re: [xml] Running into "Content error in the external subset" with a schema Date: Thu, 14 Apr 2005 10:31:03 +0200 Hi, On Wed, 2005-04-13 at 21:41 -0700, Randy J. Ray wrote: I cannot find any real documentation of what this error message actually indicates. I have a schema, and several documents that conform to it. But when I try to do XSLT procession with either xsltproc or the Perl bindings, I get the following: wcrs.cst: /CallSearchEngine.xsd:2: parser error : Content error in the external subset http://stackoverflow.com/questions/22175774/xml-content-error-in-external-subset-extra-content-at-the-end-of-the-document schema and the file. There are actually seven files, but all of them report the same error. This is just the shortest of them. Note that the schema itself has been checked out through XMLSpy, and otherwise appears to be in fine shape. All help appreciated. This is occurring with both of these version pairs (libxml2/libxslt): 2.6.16 / 1.1.11 2.6.11 / 1.1.10 With the https://mail.gnome.org/archives/xml/2005-April/msg00071.html processor expects a DTD - not a XML Schema - to be found at the given location; thus it barks, since the file is not a DTD. From http://www.w3.org/TR/2004/REC-xml-20040204/: "[Definition: The XML document type declaration contains or points to markup declarations that provide a grammar for a class of documents. This grammar is known as a document type definition, or _DTD_. The document type declaration can point to an external subset (a special kind of external entity) containing markup declarations, or can contain the markup declarations directly in an internal subset, or can do both. The DTD for a document consists of both subsets taken together.]" Regards, Kasimier References: [xml] Running into "Content error in the external subset" with a schema From: Randy J. Ray [Date Prev][Date Next] [Thread Prev][Thread Next] [Thread Index] [Date Index] [Author Index] The GNOME Project About Us Get Involved Teams Support GNOME Contact Us The GNOME Foundation Resources Developer Center Documentation Wiki Mailing Lists IRC Channels Bug Tracker Development Code Build Tool News Press Releases Latest Release Planet GNOME Development News Identi.ca Twitter Copyright © 2005 - 2013 The GNOME Project. Optimised for standards. Hosted by Red Hat. Powered by MailMan, Python and GNU.
user Active bugs Resolved bugs Rejected bugs Report a new bug This queue is for https://rt.cpan.org/Ticket/Display.html?id=95782 tickets about the XML-LibXML CPAN distribution. Report information The Basics Id: 95782 Status: new Priority: 0/ Queue: XML-LibXML People Owner: Nobody in particular Requestors: bitcard.10.drkshadow [...] spamgourmet.com Cc: AdminCc: Bug Information Severity: (no value) Broken in: 1.90 2.0014 Fixed in: (no value) Attachments spam-test.nzb Mon May 19 12:01:46 2014 (284b) parser error by bitcard.10.drkshadow [...] spamgourmet.com History Show all quoted text — Show full headers # MonMay1912:01:462014 bitcard.10.drkshadow [...] spamgourmet.com - Ticket created Subject: .dtd:1: parser error : Content error in the external subset Download (untitled) / with headers text/plain 904b When parsing an NZB file, the referenced DTD is loaded despite being parser error content told to not load them: my $xml = XML::LibXML->new(); $xml->load_ext_dtd(0); $xml->load_xml(IO => \*FILE); ========= http://www.newzbin.com/DTD/nzb/nzb-1.0.dtd:1: parser error : Content error in the external subset ^ The error is the same with load_ext_dtd(1): my $xml = XML::LibXML->new(); $xml->load_ext_dtd(1); $xml->load_xml(IO => \*SUBJECTFILE); ========= http://www.newzbin.com/DTD/nzb/nzb-1.0.dtd:1: parser error : Content error in the external subset ^ The problem goes away, however, if you use an undocumented libxml feature: my $xml = XML::LibXML->new(); $xml->load_xml(IO => \*SUBJECTFILE, load_ext_dtd => 0); I say undocumented, as the documentation states, "LibXML options are global [...] They can either be set using $parser->option(...), or XML::LibXML->option(...)," and "$parser->load_ext_dtd(1);". Subject: spam-test.nzb Download spam-test.nzb application/x-nzb 284b Message body not shown because it is not plain text. This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure. Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com. Time to display: 0.112915 »|« RT 4.0.18 Copyright 1996-2013 Best Practical Solutions, LLC.