• > or >

    From Richard Tobin@21:1/5 to manfred.lotz@arcor.de on Mon Jan 30 21:07:14 2017
    In article <20170130213323.44a3c525@arcor.com>,
    Manfred Lotz <manfred.lotz@arcor.de> wrote:
    Hi there,
    Let us assume I have the following document t.xml

    <?xml version="1.0" encoding="utf-8"?>
    <entry>
    bla --> more bla
    </entry>


    Running xmllint t.xml gives a "corrected' output with &gt;. instead of
    .

    However, xmllint doesn't return a non zero return code which means
    (if I understand xmllint correctly) that from xmllint's point of view
    the document is well formed.

    Question: Is the above document really well formed? Or is it required
    to have &gt; instead of '>'?

    It's well formed.

    There is one circumstance in which you must use &gt; (or a character
    reference) instead of >, and that's when it's part of the sequence ]]>
    and that sequence is not marking the end of a CDATA section. You're
    unlikely to run into this in real life, but many programs always
    output &gt; anyway.

    -- Richard

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Manfred Lotz@21:1/5 to All on Mon Jan 30 21:33:23 2017
    Hi there,
    Let us assume I have the following document t.xml

    <?xml version="1.0" encoding="utf-8"?>
    <entry>
    bla --> more bla
    </entry>


    Running xmllint t.xml gives a "corrected' output with &gt;. instead of
    .

    However, xmllint doesn't return a non zero return code which means
    (if I understand xmllint correctly) that from xmllint's point of view
    the document is well formed.

    Question: Is the above document really well formed? Or is it required
    to have &gt; instead of '>'?

    --
    Manfred

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Manfred Lotz@21:1/5 to Richard Tobin on Tue Jan 31 17:41:13 2017
    On Mon, 30 Jan 2017 21:07:14 +0000 (UTC)
    richard@cogsci.ed.ac.uk (Richard Tobin) wrote:

    In article <20170130213323.44a3c525@arcor.com>,
    Manfred Lotz <manfred.lotz@arcor.de> wrote:
    Hi there,
    Let us assume I have the following document t.xml

    <?xml version="1.0" encoding="utf-8"?>
    <entry>
    bla --> more bla
    </entry>


    Running xmllint t.xml gives a "corrected' output with &gt;. instead
    of
    .

    However, xmllint doesn't return a non zero return code which means
    (if I understand xmllint correctly) that from xmllint's point of view
    the document is well formed.

    Question: Is the above document really well formed? Or is it required
    to have &gt; instead of '>'?

    It's well formed.


    Thanks. I thought it is but wasn't 100% sure.

    There is one circumstance in which you must use &gt; (or a character reference) instead of >, and that's when it's part of the sequence ]]>
    and that sequence is not marking the end of a CDATA section. You're
    unlikely to run into this in real life, but many programs always
    output &gt; anyway.


    Yes, that's an unlikely case in "normal life".

    Thanks again, Manfred

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Flynn@21:1/5 to Manfred Lotz on Sun Feb 5 15:02:21 2017
    On 01/31/2017 04:41 PM, Manfred Lotz wrote:
    On Mon, 30 Jan 2017 21:07:14 +0000 (UTC)
    richard@cogsci.ed.ac.uk (Richard Tobin) wrote:

    In article <20170130213323.44a3c525@arcor.com>,
    Manfred Lotz <manfred.lotz@arcor.de> wrote:
    Hi there,
    Let us assume I have the following document t.xml

    <?xml version="1.0" encoding="utf-8"?>
    <entry>
    bla --> more bla
    </entry>


    Running xmllint t.xml gives a "corrected' output with &gt;. instead
    of
    .

    However, xmllint doesn't return a non zero return code which means
    (if I understand xmllint correctly) that from xmllint's point of view
    the document is well formed.

    Question: Is the above document really well formed? Or is it required
    to have &gt; instead of '>'?

    It's well formed.


    Thanks. I thought it is but wasn't 100% sure.

    There is one circumstance in which you must use &gt; (or a character
    reference) instead of >, and that's when it's part of the sequence ]]>
    and that sequence is not marking the end of a CDATA section. You're
    unlikely to run into this in real life, but many programs always
    output &gt; anyway.


    Yes, that's an unlikely case in "normal life".

    It's really only a consideration for dweebs like me who actually write documentation *about* XML, so we have to be able to show stuff verbatim
    that would normally be seen as markup to act on :-)

    ///Peter

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)