January 2002
Intermediate to advanced
480 pages
11h 5m
English
Returning to the XML document instance in Listing 2.1, you’ll notice that the <invoice> element contains two attributes; num and invoiceDate. To recap, the element looks like this:
<invoice num="2317" invoiceDate="07-09-01"> <!-- ...other XML data --> </invoice>
In this next style sheet, you would like to retrieve and display these attribute values in the browser window. Listing 2.5 shows the style sheet.
<?xml version=”1.0” ?> <xsl:stylesheet version=”1.0” xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”> <xsl:output method=”html” /> <!-- Root template --> <xsl:template match=”/”> <HTML> <HEAD> ... |
Read now
Unlock full access