Re: bug in url.e
Loïc Le Guyader <[email protected]> Sat, 16 Dec 2006 15:42:35 +0100
| Newsgroups | gmane.comp.lang.eiffel.smalleiffel |
|---|---|
| Message-ID | <[email protected]> |
--IS0zKkzwUGydFO0o
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
When I compile it now, I get a warning:
****** Warning: The "feature" clause declares a narrower client
list than the conforming parent(s) for HTTP_PROTOCOL.`is_connected'.
This can lead to catcalls! The final export list is {URL} .
The source lines involved by the message are the following:
Line 5 column 9 in PROTOCOL (/home/loic/se/lib/net/protocol.e):
feature {ANY}
^
Line 14 column 9 in HTTP_PROTOCOL (/home/loic/se/lib/net/protocols/http_protocol.e):
feature {URL}
^
Line 15 column 2 in HTTP_PROTOCOL (/home/loic/se/lib/net/protocols/http_protocol.e):
is_connected: BOOLEAN
^
------
****** 1 warning.
And when I launch it, it seems to go further than before.
It's the dtd validation which fail doesn't work. I made a local version
of the program, so you can test even behind a proxy. In order to do
that, put testlocalxml.e, remote.xml and tribune-1.0.dtd in the same
directory, then do "se c testlocalxml.e" and then ./a.out
Cheers.
--
--IS0zKkzwUGydFO0o
Content-Type: application/xml
Content-Disposition: attachment; filename="remote.xml"
Content-Transfer-Encoding: quoted-printable
<?xml version=3D"1.0" encoding=3D"UTF-8"?>=0A<!DOCTYPE board SYSTEM "./trib=
une-1.0.dtd">=0A<board>=0A<post time=3D"20061216150803" id=3D"19141">=0A <i=
nfo>ua</info>=0A <message>plop</message>=0A <login>Anonymous</login>=0A</po=
st>=0A</board>=0A
--IS0zKkzwUGydFO0o
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="testlocalxml.e"
class TESTLOCALXML
inherit
XML_CALLBACKS
creation
make
feature
parser:XML_PARSER
nb_node: INTEGER
file: TEXT_FILE_READ
make is
do
create parser.make
create file.make
file.connect_to("./remote.xml")
if file.is_connected then
load(file)
file.disconnect
io.put_string("nb node: " + nb_node.to_string + "%N")
end
end
load (stream: INPUT_STREAM) is
do
parser.connect_to(stream)
parser.parse(Current)
end
open_node (node_name: STRING; line, column: INTEGER) is
do
nb_node := nb_node + 1
current_node := node_name
end
current_node: STRING
close_node (node_name: STRING; line, column: INTEGER) is
do
end
open_close_node (node_name: STRING; line, column: INTEGER) is
do
open_node(node_name, line, column)
close_node(node_name, line, column)
end
with_attribute (attribute_name, attribute_value: STRING; line, column: INTEGER) is
do
end
data (a_data: STRING; line, column: INTEGER) is
do
end
xml_header (line, column: INTEGER) is
do
end
entity (a_entity: STRING; line, column: INTEGER): STRING is
do
Result := a_entity
end
at_error: BOOLEAN
parse_error(line, column: INTEGER) is
do
at_error := True
io.put_string("Error in parsing%N")
end
end
--IS0zKkzwUGydFO0o
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="tribune-1.0.dtd"
<!--
phplop-tribune.dtd 1.0 2003/05/21
by Christophe Couronne - <[email protected]>
Inpired of
Dacode dtd
written by Arnaud willem - <[email protected]>
itself based on :
RSS DTD originally created by
Lars Marius Garshol - [email protected].
-->
<!ELEMENT board (post*)>
<!ATTLIST board site CDATA #REQUIRED>
<!ELEMENT post (info,message,login)>
<!ATTLIST post
time CDATA #REQUIRED
id CDATA #REQUIRED>
<!ELEMENT message (#PCDATA|a|u|b|s|tt|i)*>
<!ELEMENT info (#PCDATA)>
<!ELEMENT login (#PCDATA)>
<!ELEMENT s (#PCDATA|a|b|u|tt|i|s)*>
<!ELEMENT b (#PCDATA|a|b|u|tt|i|s)*>
<!ELEMENT u (#PCDATA|a|b|u|tt|i|s)*>
<!ELEMENT tt (#PCDATA|a|b|u|tt|i|s)*>
<!ELEMENT i (#PCDATA|a|b|u|tt|i|s)*>
<!ELEMENT a (#PCDATA)>
<!ATTLIST a href CDATA #REQUIRED>
--IS0zKkzwUGydFO0o--