This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Product and Other Certifications and the fly likes need answers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "need answers" Watch "need answers" New topic
Author

need answers

Larry Gao
Greenhorn

Joined: Nov 16, 2001
Posts: 16
I'll take the new test soon. plz help on the following qs.
1. Which of the following would be the BEST real-world strategy for generating test cases for an XML system?


a) Ensure that test documents contain an instance of all elements in all possible contexts.

b) Use XML instances that conform to the DTD.

c) Use only samples of actual data to test the XML system.

d) Use test cases that generate all data-driven error conditions detected in the system.
C or B ?
2. 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.
A ?
3. Consider the following example:

<xsd:element name="Price">
<xsd:complexType>
<xsd:attribute name="currency" type="xsd:string"/>
</xsd:complexType>
</xsd:element>

The "currency" attribute declaration is equivalent to which of the following DTD declarations?


a) < !ATTLIST Price currency CDATA #REQUIRED>

b) < !ATTLIST Price currency CDATA #FIXED>

c) < !ATTLIST Price currency CDATA #IMPLIED>

d) < !ATTLIST Price currency PCDATA #IMPLIED>

C ?
4. 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)
a and d ?
5. Which of the following XML technologies can be used to easily determine locations of XML constructs in an XML document?


a) XML Information Set

b) DTD or XML Schema

c) XPath

d) DOM2
e) XPointer

Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
B and C ?
6. Wherever a pants element is allowed in an XML Schema, the XML Schema must also allow a jeans or a shorts element. Which of the following satisfies this requirement?


a) <xs:element name = "pants" type = "pantDetails" />
<xs:element name = "jeans" type = "pantDetails" substitutionGroup = "pants" />
<xs:element name = "shorts" type = "pantDetails" substitutionGroup = "pants" />

b)
<xs:element name = "pants" type = "pantDetails" abstract="true" />
<xs:element name = "jeans" type = "pantDetails" substitutionGroup = "pants" />
<xs:element name = "shorts" type = "pantDetails" substitutionGroup = "pants" />

c)
<xs:element name = "pants" type = "pantDetails" />
<xs:element name = "jeans" type = "pantDetails" />
<xs:element name = "shorts" type = "pantDetails" />

d)
<xs:element name = "pants" type = "pantDetails" abstract="true" />
<xs:element name = "jeans" substitutionGroup = "pants" />
<xs:element name = "shorts" substitutionGroup = "pants" />

B ?
7. An XPath expression returns "hello" in a text node when the expression is processed on an XML document. The XML document is well-formed and valid, but does not contain "hello". Which of the following BEST explains the situation?


a) The axis is incorrectly specified.

b) The XSLT processor resolved the entity references.
c) An incorrect relative location path is specified with respect to the current context node.

d) There is a missing "/" at the end of the location path.

e) There is a missing "@" somewhere in the location path
B ?
Louis Fegun
Ranch Hand

Joined: Aug 18, 2001
Posts: 60
Originally posted by Larry Gao:
I'll take the new test soon. plz help on the following qs.
1. Which of the following would be the BEST real-world strategy for generating test cases for an XML system?


a) Ensure that test documents contain an instance of all elements in all possible contexts.

b) Use XML instances that conform to the DTD.

c) Use only samples of actual data to test the XML system.

d) Use test cases that generate all data-driven error conditions detected in the system.
ans: c - test objective is to subject the application to sample real life situation.
2. 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.
b is the best answer to me. DOM is not specified to transformations.
3. Consider the following example:

<xsd:element name="Price">
<xsd:complexType>
<xsd:attribute name="currency" type="xsd:string"/>
</xsd:complexType>
</xsd:element>

The "currency" attribute declaration is equivalent to which of the following DTD declarations?


a) < !ATTLIST Price currency CDATA #REQUIRED>

b) < !ATTLIST Price currency CDATA #FIXED>

c) < !ATTLIST Price currency CDATA #IMPLIED>

d) < !ATTLIST Price currency PCDATA #IMPLIED>

C ?
ans = c
4. 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)
a and d ?
ans= a, d
5. Which of the following XML technologies can be used to easily determine locations of XML constructs in an XML document?


a) XML Information Set

b) DTD or XML Schema

c) XPath

d) DOM2
e) XPointer

Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
B and C ?
ans = c, e
6. Wherever a pants element is allowed in an XML Schema, the XML Schema must also allow a jeans or a shorts element. Which of the following satisfies this requirement?


a) <xs:element name = "pants" type = "pantDetails" />
<xs:element name = "jeans" type = "pantDetails" substitutionGroup = "pants" />
<xs:element name = "shorts" type = "pantDetails" substitutionGroup = "pants" />

b)
<xs:element name = "pants" type = "pantDetails" abstract="true" />
<xs:element name = "jeans" type = "pantDetails" substitutionGroup = "pants" />
<xs:element name = "shorts" type = "pantDetails" substitutionGroup = "pants" />

c)
<xs:element name = "pants" type = "pantDetails" />
<xs:element name = "jeans" type = "pantDetails" />
<xs:element name = "shorts" type = "pantDetails" />

d)
<xs:element name = "pants" type = "pantDetails" abstract="true" />
<xs:element name = "jeans" substitutionGroup = "pants" />
<xs:element name = "shorts" substitutionGroup = "pants" />

B ?
ans = b
7. An XPath expression returns "hello" in a text node when the expression is processed on an XML document. The XML document is well-formed and valid, but does not contain "hello". Which of the following BEST explains the situation?


a) The axis is incorrectly specified.

b) The XSLT processor resolved the entity references.
c) An incorrect relative location path is specified with respect to the current context node.

d) There is a missing "/" at the end of the location path.

e) There is a missing "@" somewhere in the location path
B ?

ans=b
ALL TH EBEST IN YOUR EXAMS....LET'S HAVE MORE QUESTIONS.
Louis.
[ January 09, 2002: Message edited by: Louis Fegun ]
Harry Singh
Ranch Hand

Joined: May 02, 2001
Posts: 124
Good questions!! IN reference to question 1, can i ask what is the least best method among them for generating test cases!! abother way to put the same question? can u guys lemme know as i am confused between option (1) and (4). Another question is:
Use of multiple XSL transformations steps is advisable when :
1) Processing of the document is comprised of a few operations that interact heavily
2)Processing of the document is comprised of multiple operations that must be easily reconfigurable.
3)docs to be processed are large.
4) All processing must be done on a single processor.
Thanks in advance
harry
Niharika Srivastav
Ranch Hand

Joined: Dec 12, 2001
Posts: 32
Hi
The answer to Q1 should be 'D'
Use test cases that generate all data-driven error conditions in the system.
This seems to be the best strategy for testing.
Regards,
Niharika
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need answers
 
Similar Threads
schema allowing elements to appear in any order
Viktor answer for IBM 141 (question 20)
Questions clarification
clarification for mock test Shashanks
Why the answer is c),not a)