summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMax Schumacher <maximilianbschumacher@gmail.com>2020-10-20 12:43:13 +0200
committerGitHub <noreply@github.com>2020-10-20 12:43:13 +0200
commit8bf25eedeedf3ebff9f26ac7ec2b9fc037ebb4dd (patch)
treebb8ed5d23e37f786e0562ce750f0c0b45fe54eb5
parentf10bce2eb17fcc1c9fe0b10cb6764e64d99df615 (diff)
parent423f47f399bd218d4a71736b7ba904e61d865551 (diff)
Merge pull request #4031 from kmubiin/review-xml-en
[xml/en] copy edit and fix code typo
-rw-r--r--xml.html.markdown13
1 files changed, 9 insertions, 4 deletions
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
-<!-- Declaring a DTD externally: -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bookstore SYSTEM "Bookstore.dtd">
<!-- Declares that bookstore is our root element and 'Bookstore.dtd' is the path
@@ -114,8 +115,11 @@ A XML document is *well-formed* if it is syntactically correct. However, it is p
<price>30.00</price>
</book>
</bookstore>
+```
-<!-- The DTD file: -->
+The DTD file (Bookstore.dtd):
+
+```
<!ELEMENT bookstore (book+)>
<!-- The bookstore element may contain one or more child book elements. -->
<!ELEMENT book (title, price)>
@@ -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. -->
<!ELEMENT price (#PCDATA)>
-]>
+```
-<!-- The DTD could be declared inside the XML file itself.-->
+The DTD could be declared inside the XML file itself:
+```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bookstore [