0% found this document useful (0 votes)
12 views10 pages

UTF-8 and XSLT Student List Example

The document discusses Unicode Transformation Format (UTF), specifically UTF-8, which is a variable-length character encoding preferred for e-mail and web pages. It includes examples of XML data representing student information and an XSLT stylesheet for transforming that XML into an HTML table. The XSLT template generates a student list with first names, last names, and nicknames displayed in a structured format.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views10 pages

UTF-8 and XSLT Student List Example

The document discusses Unicode Transformation Format (UTF), specifically UTF-8, which is a variable-length character encoding preferred for e-mail and web pages. It includes examples of XML data representing student information and an XSLT stylesheet for transforming that XML into an HTML table. The XSLT template generates a student list with first names, last names, and nicknames displayed in a structured format.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

(Unicode Transformation Format).

UTF- A variable-length character encoding (1 to 4 bytes long). UTF-8 is backwards com


8 and the preferred encoding for e-mail and web pages.
s
A URI — short for “Uniform Resource Identifier” — is a sequence of
characters that distinguishes one resource from another.
<class>

<student>

<firstname>A</firstname>

<lastname>B</lastname>

<age>20</age>

</student>

</class>
XLST
<?xml-stylesheet type = "text/xsl" href = "[Link]"?>

<class>

<student>

<firstname>Graham</firstname>

<lastname>Bell</lastname>

<nickname>Garry</nickname>

</student>

<student>

<firstname>Albert</firstname>

<lastname>Einstein</lastname>

<nickname>Ally</nickname>

</student>

<student>

<firstname>Thomas</firstname>

<lastname>Edison</lastname>

<nickname>Eddy</nickname>

</student>

</class>
<xsl:stylesheet version = "1.0"

xmlns:xsl = "[Link]

<xsl:template match = "/class">

<html>

<body>

<h2>Student List</h2>

<table border = "1">

<tr bgcolor="lightgreen">

<th>First Name</th>

<th>Last Name</th>

<th>Nick Name</th>

</tr>

<xsl:for-each select = "student">

<tr>

<td><xsl:value-of select = "firstname"/></td>

<td><xsl:value-of select = "lastname"/></td>

<td><xsl:value-of select = "nickname"/></td>

</tr>

</xsl:for-each>

</table>

</body>

</html>

</xsl:template>

</xsl:stylesheet>

You might also like