• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IBM 140 and 141 Sample tests

 
Viktor Stepanchuk
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, All,
I have been watching this forum only since mid-December, "successfully" missed free certification offer. Now I am studying XML and preparing for 141 exam which will be taken shortly after my next XML project.
My problem now is that I cannot get more than 87% score in 141 Sample test.
Obviously, either I do not have enough knowledge or I do not understand the questions.
I decided to put references to IBM XML Sample Tests on the Web:
Sample Test 140 Reference was removed from IBM site in January, therefore I keep it here with the original answers from IBM. Someone still may find it useful, I hope.
Sample Test 141 Reference is also being maintained. Warning: The answers provided by me can give only 87% score, that means that wrong answers are given to 7 questions!
A primary goal is to get an understanding and to stimulate a discussion why such and such answer is correct, especially when the indication of the BEST, WORST, MOST LIKELY or LEAST LIKELY is required. Everybody is encouraged to suggest improvements to this reference and to provide better answers and explanations.
I found this forum very useful and practical, thanks to mediators.
It is well known that the actual exam questions are not very close to the sample test questions, so no harm would be caused to the certification procedure, I hope.
I am targeting not yet certified audience as well as I probably would require assistance from certified ones, especially from those who scored 95%+ in 141 sample test.
Thanks,
Viktor,
SCJP2, CSTE
[ February 03, 2002: Message edited by: Mapraputa Is ]
 
Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Viktor, I edited your post only to replace HTML tags with UBB tags. In this forum HTML is turned off, so all HTML tags are shown instead of being interpeted. It makes more sense to use
[b]...[/b] instead of <b>...</b>
and
[url=http://someAdress]...[/url] instead of <a href>...
Sample Test 141 Reference - good job!
For those who want to discuss Q&A: maybe we should start a separate thread for each question. Then Viktor can add a link to a corresponding thread for each discussed question.
[ February 03, 2002: Message edited by: Mapraputa Is ]
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Viktor and Mapraputa,
very nice! I just posted some annotations...
Bye
Berny
 
Viktor Stepanchuk
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mapraputa, thanks a lot for the editing. When I finished posting the message, I realized those poorly formatted links... . Murphy's law, you know, I did not read the instructions..., sorry.
As for the thread management, you may use my messages in whatever way you find it useful. Well, I think the thread may "die" after 100% correctness is achieved, and this may happen soon, I hope... .
Berny, thanks a lot for the new suggestions, I really appreciate your fast feedback, attention and professionalism. That's what I really needed, another opinion. Zehr Gut!
Now the score is 94%, we have only 3 wrong answers left. I will post your improvements to the Reference as soon as possible.
I will also continue research.
Regards,
Viktor
[ February 03, 2002: Message edited by: Viktor Stepanchuk ]
 
Viktor Stepanchuk
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Status of the Sample Test 141 Reference on Feb. 03, 2002

1. Architecture:______all: 11 correct: 11 score: 100.0%
5. Testing & Tuning:__all: _6 correct: _5 score: _83.0%
Information Modeling:_all: 15 correct: 15 score: 100.0%
3. XML Processing:____all: 19 correct: 17 score: _89.0%
4. XML Rendering:_____all: _6 correct: _6 score: 100.0%
Any suggestions ?
Thanks,
Viktor
[ February 03, 2002: Message edited by: Viktor Stepanchuk ]
[ February 03, 2002: Message edited by: Viktor Stepanchuk ]
 
Niharika Srivastav
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q no 39
Which of the following statements are TRUE about error handling in SAX2?
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
a) Parsing errors are divided into two categories: errors and warnings. Yes, but actually into fatal errors, errors and warnings, see org.xml.sax.ErrorHandler interface
b) The default behaviors for warning() and error() callbacks is to do nothing. Yes, in org.xml.sax.helpers.DefaultHandler class, for instance
c) The ErrorHandler is registered with the ContentHandler via the setErrorHandler() method. No, ContentHandler does not have setErrorHandler() method
d) Parsing continues after an error occurs. Not always, cannot proceed if error is fatal
In my opinion, answers should be b and d because errors are divided into three categories: warnings, errors and fatal-errors and parsing continues after an error (not fatal-error) occurs.
Good Luck!
Niharika
 
Viktor Stepanchuk
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Niharika, good shot!!!
The Test says Yes, You are a real XML guru!
Now the score is 96% and only 2 answers are incorrect.
Current status:
1. Architecture:______all: 11 correct: 11 score: 100.0%
5. Testing & Tuning:__all: _6 correct: _5 score: _83.0%
Information Modeling:_all: 15 correct: 15 score: 100.0%
3. XML Processing:____all: 19 correct: 18 score: _94.0%
4. XML Rendering:_____all: _6 correct: _6 score: 100.0%
Any new suggestions ?
Thanks,
Viktor
 
John Lee
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
42. An XML-based employee records application is populated from a back-end relational database. Each employee has a unique numeric employee ID number that serves as the database key for that employee. The XML has an associated DTD. Validating the employee ID data would be:
Single Select - Please select the best answer (one and only one choice must be selected).
a) Handled by the parser associating the employee name to a unique ID attribute with the XML employee application providing the business logic or functionality.

b) Handled by the parser associating a unique ID element with the XML employee application providing the business logic or functionality.
c) Handled by the XML parser using a SAX parser and relying on event-handling to capture the value of a unique ID attribute and the XML employee application would deal with user interface and rendering issues.
d) Handled by the XML parser as a non-unique CDATA attribute, with verification, business logic and functionality being provided by the XML employee application.
e) Stored in an empID element, with a SAX parser capturing the element's character content and evaluating it, reporting the result to the XML employee application for further processing.
----------------------------
Correct answer is d). It is the way it works at micro level.
 
Viktor Stepanchuk
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Don!
Thank you for the correction. Your answer is perfectly correct.
In fact, I do not completely understand why the answer a) is not correct, and the importance of d) answer, and would appreciate detailed explanation.
Now the score is 98% and only ONE !!! answer is incorrect.
Current status of the test:
1. Architecture:______all: 11 correct: 11 score: 100.0%
5. Testing & Tuning:__all: _6 correct: _5 score: _83.0%
Information Modeling:_all: 15 correct: 15 score: 100.0%
3. XML Processing:___all: 19 correct: 19 score: 100.0%
4. XML Rendering:____all: _6 correct: _6 score: 100.0%
Any new suggestions ?
Thanks,
Viktor
 
John Lee
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
55. While analyzing an XSLT stylesheet for performance it was noticed that the following XSLT statement occurred
frequently:
<xsl:for-each select="//book[author='Smith']">
To improve the performance of the stylesheet, the XML developer's approach would be which of the following?
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
a)
<xsl:variable name="SmithBooks" select="//book[author='Smith']"/>
...
<xsl:for-each select="$SmithBooks"/>

b)
<xsl:key name="book-author" use="author"/>
...
<xsl:for-each select="key('book-author', 'Smith')"/>


c)
<xsl:variable name="books" select="//book"/>
...
<xsl:for-each select="$Books[author='Smith']"/>


d)
<xsl arameter name="books" select="//book"/>
...
<xsl:for-each select="$Books[author='Smith']"/>
------------------------------
Correct answer: a) and b).
This question is addressing performance. Performance-wise, c) and d) do not improve anything, even the syntax are correct.
Well, this is the last piece of the puzzle. Thanks for your effort to put all this together! Hope this will help.....
 
Viktor Stepanchuk
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don, You are the man! You are absolutely right!
Hip-Hip-Hurray!
Hip-Hip-Hurray!
Hip-Hip-Hurray!
A 100% correctness is finally achieved
A 100% correctness is finally achieved
A 100% correctness is finally achieved
Thanks a lot for your attention. I really appreciate that.
Your answer cannot be devaluated, as it puts the final touch
to the set of the correct answers.
You are the hero!
Later today I will probably correct the IBM Sample Test 141 Reference

However, I would like some clarifications/explanations to 42 and 55.
My questions are:
- Why 42 d) is better than 42 a)???
- In 55 b) the xsl:key tag must have 3 required attributes: name, match, use.
What can be suggested to improve the b) answer, i.e. what would be the absolutely correct match attribute for that answer???
It is not about the sample reference. It is finally over ... . I would like to really understand all that in details.
Thanks in advance.
Viktor
 
John Lee
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To my understanding, XML is processed in two steps: parser and application. Parsers do not deal with ID/IDREF/IDREFS, instead pass them on to applications. So parser probablly do not know what ID/IDREF/IDREFS are, other than some CDATA.
Thanks.
 
Viktor Stepanchuk
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don,
The answer to the question 42 is correct, it is proven by the sample test procedure, but I am not entirely convinced by your explanation.
In fact, XML file can be used as a storage in a filesystem (kind of "poor man solution", or "not so poor man solution" ... ).
Therefore, (IMHO) any decent validating parser must check for the ID uniqueness, not just CDATA as for the non-unique attributes.
Comments out of line:
That's why I think of that type of questions/answers as of ambiguous enough and implementation or mindset dependent. They just reflect the preferred practice of the issuer of this test (IBM) and probably may not be considered as the ultimate truth valid for all possible cases.
I have nothing against IBM approach in general (if one does not like it, he/she shouldn't take the test ) but in programming there always more than one way of doing things.
That's why I asked for the help in the reference sheet.
And I always keep in mind that communication has always been a problem. That is, what makes this test hard.
----------------
Any other suggestions???
Thanks, Viktor
[ March 05, 2002: Message edited by: Viktor Stepanchuk ]
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic