I am trying to perform an XSL Transformation. But an attribute replacement doesn't work. I have this XSL:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="UTF-8"
doctype-public="-//WAPFORUM//DTD WML 1.1//EN"
doctype-system="http://www.wapforum.org/DTD/wml_1.1.xml"/>
<xsl:template match="/">
<wml xml:lang="da">
<card id="FrontPage" title="{head/title}">
Why doesn't the title get inserted?
<p id="changed">The server processed this Jan 1st. 2009.</p>
</card></wml>
</xsl:template></xsl:stylesheet>
And the XML that will be transformed is an XHTML 1.0 Transitional document. The document naturally contains a html/head/title element. I want the text content of the title element inserted into the title attribute of the card element:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>DMI - The weather on Faroe Islands</title>
(...)
I use PHP 5.2.0 and libxslt version 1.1.19.