From owner-svn-doc-head@freebsd.org Thu Sep 8 14:40:05 2016 Return-Path: Delivered-To: svn-doc-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF89EBD1839; Thu, 8 Sep 2016 14:40:04 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0BA918F; Thu, 8 Sep 2016 14:40:04 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u88Ee41e076005; Thu, 8 Sep 2016 14:40:04 GMT (envelope-from gabor@FreeBSD.org) Received: (from gabor@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u88Ee4kO076004; Thu, 8 Sep 2016 14:40:04 GMT (envelope-from gabor@FreeBSD.org) Message-Id: <201609081440.u88Ee4kO076004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gabor set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan Date: Thu, 8 Sep 2016 14:40:04 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r49372 - head/en_US.ISO8859-1/books/fdp-primer/xml-primer X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2016 14:40:05 -0000 Author: gabor Date: Thu Sep 8 14:40:03 2016 New Revision: 49372 URL: https://svnweb.freebsd.org/changeset/doc/49372 Log: - Update and simplify section on comments according to the XML standard (this section still reflected some old SGML constructs). PR: 204885 Submitted by: Andreas Perstinger Modified: head/en_US.ISO8859-1/books/fdp-primer/xml-primer/chapter.xml Modified: head/en_US.ISO8859-1/books/fdp-primer/xml-primer/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/fdp-primer/xml-primer/chapter.xml Thu Sep 8 14:31:17 2016 (r49371) +++ head/en_US.ISO8859-1/books/fdp-primer/xml-primer/chapter.xml Thu Sep 8 14:40:03 2016 (r49372) @@ -717,56 +717,40 @@ example.xml:5: element head: validity er Comments - Comments are an XML construct, and are - normally only valid inside a DTD. However, - as shows, it is possible - to use XML syntax within the document. - - The delimiter for XML comments is the string - --. The first occurrence of - this string opens a comment, and the second closes it. + An XML document may contain comments. + They may appear anywhere as long as they are not inside tags. + They are even allowed in some locations inside the + DTD (e.g., between entity + declarations). + + XML comments start with the string + <!-- and end with the + string -->. + + Here are some examples of valid XML + comments: - <acronym>XML</acronym> Generic Comment + <acronym>XML</acronym> Generic Comments <!-- This is inside the comment --> -<!-- This is another comment --> +<!--This is another comment--> -<!-- This is one way - of doing multiline comments --> +<!-- This is how you + write multiline comments --> -<!-- This is another way of -- - -- doing multiline comments --> +<p>A simple <!-- Comment inside an element's content --> paragraph.</p> - XHTML users may be familiar with different - rules for comments. In particular, it is often believed that - the string <!-- opens a comment, and it is - only closed by -->. - - This is not correct. Many web browsers - have broken XHTML parsers, and will accept - incorrect input as valid. However, the XML - parsers used by the Documentation Project are more strict, and - will reject documents with that error. + XML comments may contain any strings + except --: - Erroneous <acronym>XML</acronym> Comments - - <!-- This is in the comment -- - - THIS IS OUTSIDE THE COMMENT! - - -- back inside the comment --> - - The XML parser will treat this as - though it were actually: - - <!THIS IS OUTSIDE THE COMMENT> + Erroneous <acronym>XML</acronym> Comment - That is not valid XML, and may give - confusing error messages. + <!-- This comment--is wrong -->