Loading attribute in XPATH, problem
- by Nguyen Quoc Hung
I've got a question about loading attribute in XPATH.
I write short XML code to test:
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="testDate.xsl"?>
<element attribute="1/1/2100">
Hung
</element>
My XSL code:
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--Handle the document: set up HTML page-->
<xsl:template match="/">
<html>
<head>
</head>
<body>
This is a test
<xsl:value-of select="element@attribute"/>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Why it produces an error when loading the stylesheet? Would you please help me explain this? Thank you