Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

need answers

 
Larry Gao
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic