Gobo, XM_CALLBACKS on_content and special characters

"Neil Collier [ES]" <[email protected]>
Newsgroups gmane.comp.lang.eiffel.gobo.general
Message-ID <003501c557d8$4e6b8970$b60a000a@roystonvasey>
Hello,

I am using a descendent of XM_CALLBACKS to convert my XML document into
a HTML document.  Here is my code I am using to do this:

local
	retried: BOOLEAN
	l_string: STRING
	l_parser: XM_EIFFEL_PARSER
	l_html_filter: HTML_FILTER
do
	if not retried then
		l_string := a_doc.text.twin
		if not l_string.is_empty then

			create l_html_filter.make
			l_html_filter.set_filename (a_doc.name)
			l_html_filter.clear
			create l_parser.make
			l_parser.set_callbacks (l_html_filter)
			l_parser.set_string_mode_ascii
			l_parser.parse_from_string (l_string)
			check
				ok_parsing: l_parser.is_correct
			end
			Result := l_html_filter.output_string.twin
		end
	else
		...
	end
end

My question is, that when I have an XML document that contains escape
characters in the tag content, i.e.

<my_tag>if 4 &lt; 5</my_tag>

then what should I expect from Gobo in the 'on_content' callback of
XM_CALLBACKS?  I seem to be getting nothing (it aborts) and the only way
I have found to get it to work so far is also to escape the ampersand by
changing the above into:

<my_tag>if 4 &amp;lt; 5</my_tag>

Of course I don't want to this in all my documents.  Maybe I am doing
this all wrong anyway, in which case any suggestions are appreciated for
an improvement.

Thanks in advance,

Neil




To Post a message, send it to:   [email protected]
To Unsubscribe, send a blank message to: [email protected] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/gobo-eiffel/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
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.