XML Session05.pps
XML Session05.pps
Objectives
Problem Statement:
Jim, the XML developer at CyberShoppe, has been asked to
display the product details for Cybershoppe in a browser in the
following format:
The price per unit, description, and quantity on hand for each
product should be displayed in teal, with a font size of 10 pts.
The product name should be displayed in red, with a font size of
20 pts. It should be displayed in bold.
All details should be displayed in the Arial font.
MSXML Parser
A template rule:
Describes how an XML element and its contents are converted
into a specific format for displaying in the browser.
Consists of two parts:
A pattern that identifies an XML element in an XML document.
An action or processing code that details the transformation and
rendering of the resulting element.
XSLT uses two main elements for creating template rules:
template
apply-templates
A template rule:
Describes how an XML element and its contents are converted
into a specific format for displaying in the browser.
Consists of two parts:
A pattern that identifies an XML element in an XML document.
An action or processing code that details the transformation and
rendering of the resulting element.
XSLT uses two main elements for creating template rules:
template Defines a template for the desired
apply-templates output.
Follows the syntax:
<xsl:template match="pattern">
[action to be taken]
</xsl:template>
A template rule:
Describes how an XML element and its contents are converted
into a specific format for displaying in the browser.
Consists of two parts:
A pattern that identifies an XML element in an XML document.
An action or processing code that details the transformation and
rendering of the resulting element.
XSLT uses two main elements for creating template rules:
template
apply-templates Instructs the XSLT processor to find an
appropriate template and perform the specified
tasks on selected elements.
Follows the syntax:
<xsl:apply‑templates
[select="pattern"]>
Problem Statement:
CyberShoppe needs to display product details, such as product
ID, name, and price per unit. The following figure depicts a
sample output.
Answer:
c. Use an XSLT style sheet to convert the incoming or outgoing
XML document into the format used within the departments.
Answer:
a. <?xml-stylesheet href=”Test.css”
type=”text/css”?>
Answer:
b. Statement A is False, and Statement B is True.
Answer:
d. xsl:choose
Answer:
c. Both, Statement A and Statement B, are True.