Wednesday, October 28, 2009

Week 05

Qucik Questions

1. Yes. tthe prolog is missing.

Eg: <b>bold><b>


2. Different between well-formed and Valid XML

well-formed
well-formed XML is syntactically correct.
Not missing any closing tags and having your closing tags in the right order.
Generally Well-formed document cannot break any of the syntax rules.

Valid XML

Valid XML is XML that succeeds validation against a DTD. valid xml is always well-formed but well-formed xml is not always valid.
valid XML is semantically correct

3. Yes.
A comment allows people editing your XML to understand the different parts of the document. The comments are ignored by the browser or parser. So we can write any comment wht we want. It is really easy to unsderstand the code. So it wont give any confuse about coding.

<!DOCTYPE collegetextbook [
<!ELEMENT collegetextbook (titlepage,author,publisher,isbn,chapters )>
<!ELEMENT titlepage (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT publisher (#PCDATA)>
<!ELEMENT isbn (#PCDATA)>
<!ELEMENT chapters (#PCDATA)>
<!ATTLIST chapters chapterNo CDATA #REQUIRED>
]>

2. XML

1 comment:

  1. I didnt understand how to validate the xml document using dtd. so am still reserching on it.

    ReplyDelete