Loading attribute in XPATH, problem

Posted by Nguyen Quoc Hung on Stack Overflow See other posts from Stack Overflow or by Nguyen Quoc Hung
Published on 2009-04-12T09:07:08Z Indexed on 2010/05/11 4:04 UTC
Read the original article Hit count: 255

Filed under:
|
|
|

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

© Stack Overflow or respective owner

Related posts about xpath

Related posts about xsl