aspose file tools*
The moose likes Product and Other Certifications and the fly likes MOCK QUESTIONS !! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "MOCK QUESTIONS !!" Watch "MOCK QUESTIONS !!" New topic
Author

MOCK QUESTIONS !!

Jaysakthy Muthuvelu
Ranch Hand

Joined: Nov 12, 2002
Posts: 35
Hi there,

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






[/CODE]
Gobiraj Vadivelrajan
Greenhorn

Joined: Dec 10, 2001
Posts: 29
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 ]
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1180
2) Please look at -
http://www.coderanch.com/t/125230/XML/Xpath
3) Comments can't be nested. Even -- is not allowed inside a comment.
5) Please read at -
http://www.ibiblio.org/xml/books/bible2/chapters/ch24.html and search for 'Binary types'.
Cheers,
Dan


William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Jaysakthy Muthuvelu
Ranch Hand

Joined: Nov 12, 2002
Posts: 35
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 ?

Thanks,
Shakthy.
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1180
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
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1180
4) Based on -
http://www.brics.dk/~amoeller/XML/schemas/xmlschema-inclusion.html
redefine is equivalent to include and in addition allows to redefine/override locally any element.
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1180
2b) The case of multiple element declarations is very straight forward - it's not allowed.
It gets more interesting with multiple declarations for entities and attributes. In these cases the first declaration is binding.
Please look at -
http://www.coderanch.com/t/146681/po/certification/Internal-DTD-External-DTD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MOCK QUESTIONS !!