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 ?