From 423f47f399bd218d4a71736b7ba904e61d865551 Mon Sep 17 00:00:00 2001 From: Mubiin Kimura Date: Fri, 2 Oct 2020 21:43:32 +0000 Subject: [xml/en] copy edit and fix code typo under well-formedness and validation, the first line of comment within code blocks should be written as text paragraph instead, otherwise anyone who simply copy-paste the code will not be able to preview the result, the original code block is now separated into three parts, each preceded by a single line of text paragraph for clarity, also the external dtd file had a typo in last commit (60a1a43) that should have been removed at the end --- xml.html.markdown | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'xml.html.markdown') diff --git a/xml.html.markdown b/xml.html.markdown index b4b54330..2a258d94 100644 --- a/xml.html.markdown +++ b/xml.html.markdown @@ -100,8 +100,9 @@ This is what makes XML versatile. It is human readable too. The following docume A XML document is *well-formed* if it is syntactically correct. However, it is possible to add more constraints to the document, using Document Type Definitions (DTDs). A document whose elements are attributes are declared in a DTD and which follows the grammar specified in that DTD is called *valid* with respect to that DTD, in addition to being well-formed. +Declaring a DTD externally: + ```xml - +The DTD file (Bookstore.dtd): + +``` @@ -128,10 +132,11 @@ A XML document is *well-formed* if it is syntactically correct. However, it is p only contain text which is read by the parser and must not contain children. Compare with CDATA, or character data. --> -]> +``` - +The DTD could be declared inside the XML file itself: +```xml