• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

few questions

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted in Yahoo XML-CERT group.
1. In XML design, the more constraints you can impose on a document, the more
structured its content will be, and structure is a good objective:

A: True
B: False
answer is false why is it so?
4.Which of the following syntax is correct for a document type declaration?

A: <?DOCTYPE RootElemSYSTEM ExternalDTRef [InternalDTDDec1]>
B: <!DOCTYPE ElemSYSTEM ExternalDTRef [InternalDTDDec1]>
C: <!DOCTYPE RootElemSYSTEM ExternalDTRef [InternalDTDDec1]>
D: <?DOCTYPE ElemSYSTEM ExternalDTRef [InternalDTDDec1]>
C is the right answer but why B is wrong
6.The entities that are used to help modularize the structure of a DTD by
storing commonly used declaration components are called?
A: parameter entities
B: declared entities
C: invoked entities
D: general entities
No answer and I feel A is correct
 
Jayadev Pulaparty
Ranch Hand
Posts: 662
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shan,
If we look at the first question,
1. In XML design, the more constraints you can impose on a document, the more
structured its content will be, and structure is a good objective:
A: True
B: False
I think the first part of the question is correct, i.e., with more the constrains, the instance document will be better structured. But i feel the point here is if the document is tightly constrained by an external DTD, say, then the flexibility to change the DTD in the future is lost. I think that is not a good thing. I remember reading that when authors initially write DTDs for their XML instance documents, they try to be as liberal as possible to begin with (w.r.t flexibility of content defined by their DTD)so as to be able to incorporate any changes in the future. I think its something like placing an <xsd:any/> element as part of a complexType definition in a schema so that we are keeping the door open for the possibility of unknown additional content in the future. This is the best i can make out of this question.
For the second question, if you look here -
B: <!DOCTYPE ElemSYSTEM ExternalDTRef [InternalDTDDec1]>
C: <!DOCTYPE RootElemSYSTEM ExternalDTRef [InternalDTDDec1]>
If there is only one correct answer required, C is undoubtedly the candidate. Element is something more generic. It can be any element in the tree and a DOCTYPE is always associated to the root element of the document.
For the third one, parameter entities is the right choice.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic