Re: XM_EIFFEL_INPUT_STREAM

Colin Paul Adams <colin-vnRo6g/[email protected]>
Newsgroups gmane.comp.lang.eiffel.gobo.general
Message-ID <[email protected]>
>>>>> "Emmanuel" == Emmanuel Stapf [ES] <Emmanuel> writes:

    Emmanuel> Hi, I got surprised today by the positions returned by
    Emmanuel> the XM_EIFFEL_PARSER while scanning an XML document
    Emmanuel> which had a few strange characters at the beginning (I'm
    Emmanuel> not sure how we are supposed to call them, they tell the

BOM (byte encoding mark).

    Emmanuel> encoding used in the file). Anyway, the issue is that
    Emmanuel> `position' did not take into account those characters,
    Emmanuel> making `position' useless when you need to extract data
    Emmanuel> from the XML document.

    Emmanuel> Shouldn't position take those into account? If not,
    Emmanuel> shouldn't we have a query in XM_EIFFEL_PARSER or
    Emmanuel> XM_EIFFEL_INPUT_STREAM to get the starting offset in the
    Emmanuel> stream?

No it shouldn't - the BOM is not considered a part of the file.
An XML editor should display the first character after the BOM as at
line 1 column 1.
-- 
Colin Adams
Preston Lancashire


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.