I10-002 Free Dumps Study Materials
Question 2: Push the Exhibit Button to load the referenced "XML Document".
[XML Document]
<root><data>lmnop</data></root>
Assume that the "XML document" is changed to the "Results XML Document." Select which XSLT style
sheet correctly performs the transformation.
Note that the XSLT processor can output transformation results as a document.
[Results XML Document]
<lmnop/>
Or
<lmnop></lmnop>
A. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match= " / " >
<xsl:apply-templates select= " root/data " />
</xsl:template>
<xsl:template match= " data " >
<xsl:element name="<xsl:value-of select='.'/>"/>
</xsl:template>
</xsl:stylesheet>
B. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match= " / " >
<xsl:apply-templates select= " root/data " />
</xsl:template>
<xsl:template match= " data " >
<xsl:element name="{ . }"/>
</xsl:template>
</xsl:stylesheet>
C. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match= " / " >
<xsl:apply-templates select= " root/data " />
</xsl:template>
<xsl:template match= " data " >
<xsl:element name="."/>
</xsl:template>
</xsl:stylesheet>
D. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match= " / " >
<xsl:apply-templates select= " root/data " />
</xsl:template>
<xsl:template match= " data " >
<xsl:text disable-output-escaping="no"><</xsl:text>
<xsl:value-of select="."/>
<xsl:text disable-output-escaping="no">/></xsl:text>
</xsl:template>
</xsl:stylesheet>
Correct Answer: B