Could anyone plz help me with these questions? I found that from various mock exams.
1.How many Itemname elts will be outputed when this style sheet is applied? The instant doc. :
The output is 5.But I would say it's 3 is there anyone to explain how 5 is correct? 2.How many elts will be outputed when this style sheet is applied? The instant Doc.
The output is 7. Plz explain that. Iam not sure how it is!
3. whether comments can be nested or not?
<!-- Iam fine so far "[ <!-- But not now -->] " oops --> wellformed or not? 4. In "Redefine" if the invoking schema overrides the imported one then the new definition get replaced or reflected everywhere (ie. old one get replaced)
My question is:
Shall we override the element which is set to "restriction|extension|all" using redefine? Is it possible?
5.How binary data can be added to XML documents ? 6. here is the MYDTD.DTD : ( whizlabs)
The Answer is " YES"
I said "NO" Why : First of all the root node should be the Doctype elt ? here it's "x". Do anyone explain me how this is a valid document ? Thanks Shakthy
Joined: Dec 10, 2001
Answer for Question 1
In this key returns all the matching nodes but only the first node is selected. If the first node returned from key() is the current node then count is 1. For e.g.
The above node is first in the returned values so count(.|itself) is 1. But for this node
The first node selected through key is from supplier "vinay". So the count becomes 2 (current node + the first occurance) that's why this node is skipped.
This node is also skipped for the same reason. 2 nodes are skipped so the answer is 5(totally there are 7 nodes) [ December 24, 2002: Message edited by: Gobiraj Vadivelrajan ]
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Joined: Nov 12, 2002
Thanks Guys, What abt question : 4 & 6. Sorry 2 more questions : 1.If multiple declaration has been declared for the same elt. then which one get selected.As per mock exam "last" one get declared bcoz non-validating parsers do like that. Is this correct? 2. What if there is 2 attlist ? then i think second declaration get merged with the first one.Am i correct or not? Is there any special cases in this? 3.Might be simple : "Number("99 abcd")" what is the o/p? True or false ?
Joined: Jul 09, 2001
Shakthy, 6) It's a valid document. You said -
the root node should be the Doctype elt.
It's x - The DTD syntax doesn’t have a special construct which says that a particular element is the root element and the order of the element definitions in the DTD can be totally arbitrary. x is defined as - <!ELEMENT x Any> and the content model which x actually uses is (y,test). Cheers, Dan