File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Product and Other Certifications and the fly likes Mock Test 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 Test Questions" Watch "Mock Test Questions" New topic

Mock Test Questions

Ranch Hand

Joined: Jan 15, 2001
Posts: 162
During my recent revision for IBM 141 XML, I noted a few questions, of which I was not sure. I will be much obliged if you could help me finding the right answers to these questions.
Question One:
Which is the valid attribute declaration when attribute values can contain "external entity reference" reference?
1)< !attlist myelement myattribute="myentity">
2)< !attlist myelement myattribute="&myentity;">
Answer One:
I think 1.
Question 2:
When is a multistep XSL transformation step preferable?
1)When processing logic is highly modular
2)When processing logic is highly interrelated
3)When XML documents are extremely large
4)When XML documents are extremely small 5)None of the above
Answer Two:
I think 3.
Question Three:
Consider an application that transforms XML data into various target XML vocabularies. In this application there is a need to regularly update the transformations due to frequent changes in the target XML vocabularies. In this case, which of the following approaches is BEST suited for re-purposing the XML data?
a) Program the transformations via the DOM.
b) Employ highly parameterized XSL style sheets.
c) Use an HTML/CSS syntax that is common to all browsers.
d) Use an XML DTD to model the transformation.

Answer Three:
I think answer should be a.
Question Four:
To which of the following formats can XML Signature be applied?
a) Binary encoded data (e.g., GIFs, JPEGs)
b) XSLT transform nodes
c) GetDocumentFragment() nodes
d) Character encoded data (HTML)
Answer Four:
Answer is a and d.
Question Five:
what is true about xsl:variable and xsl param
1)The xsl:variable is limited to a single style sheet.
2)The scope of the xsl:variable has no defined limit.
3)The scope of the xsl:variable is limited to the entire style sheet.
4)None of the above
Answer Five:
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1183
About one -
First, the ATTLIST's syntax is wrong in the two options.
The specification says -
Well-formedness constraint: No External Entity References
Attribute values cannot contain direct or indirect entity references to external entities.
Well-formedness constraint: Parsed Entity
An entity reference must not contain the name of an unparsed entity. Unparsed entities may be referred to only in attribute values declared to be of type ENTITY or ENTITIES.

I think the fist constraint refers to external parsed entities when speaking about external entities.
Unparsed entity, in the second constraint, must mean 'external unparsed entity'.
So, an attribute can refer to an external unparsed entity in the following way -
The DTD will have -
<!ATTLIST myelement myattribute ENTITY #IMPLIED>
<!ENTITY e SYSTEM "...e.gif" NOTATION ..>
In the XML instance -
<myelement myattribute="e"/>
I hope it helps,
[ October 12, 2002: Message edited by: Dan Drillich ]

William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
I agree. Here's the link:
subject: Mock Test Questions
It's not a secret anymore!