Re: "Protocol scheme 'c' is not supported ..."

Robin Berjon <[email protected]>
Newsgroups gmane.comp.lang.perl.xml
Message-ID <[email protected]>
On Oct 1, 2009, at 22:02 , Mabry, F. DR EECS wrote:
> 	><!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> 	>===============================================^
> 	> ...
> I believe that you should NOT have the "log4j:" preceding the name  
> ("configuration" in this case).

No, that's perfect well-formed XML. The name that follows "DOCTYPE"  
has to match the qualified name of the root element when DTD  
validation is being performed (it doesn't need to match if you're only  
looking for well-formedness). The above is fine, it's just a sorry  
state of affairs.

>> From the w3c xml document
> 	<?xml version="1.0"?>
> 	<!DOCTYPE greeting SYSTEM "hello.dtd">
> 	<greeting>Hello, world!</greeting>
>
> Note: the "greeting" on line 2 matches the element name on line 3.   
> The DTD definition predates the namespace recommendation.  The  
> "log4j:" is a reference to the identified namespace within the XML  
> content.  I think this is the source of the problem.

DTDs don't understand namespaces so they don't care where or whether  
it was declared. See:

test.xml:
<?xml version="1.0"?>
<!DOCTYPE foo:dahut>
<foo:dahut xmlns:foo="daaaaaaaaaahuuuuuut!!!"/>

bast [12:19] tmp $ xmllint --noout test.xml
bast [12:19] tmp $

-- 
Robin Berjon - http://berjon.com/



_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.