I have the following Files:
XHTML (test.xml):
============
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<img src="test.jpg"/>
</html>
XSL (test.xsl)
===========
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- (C) Bernhard Zwischenbrugger, Datenkueche -->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html" indent="no" encoding="ISO-8859-1"/>
<xsl:template match="/">
number of images:
<xsl:value-of select="count(//img)"/>
</xsl:template>
</xsl:stylesheet>
bash-2.03# sabcmd test.xsl test.xml
number of images:
0
-----------------------
I thought the number of images is "1".
If I replace
<html xmlns="http://www.w3.org/1999/xhtml">
with
<html>
there is no problem. (count=1)
The xhtml File is generated by tidy and there is no option to
generate an xhtml file without "xmlns".
Is this a Bug?
Is there a workaround?
-----------------------------------------------------
Bernhard Zwischenbrugger Datenk�che
Tel.: +43/1/944 57 64 Redaktionssystem
Mobil.: +43/699/1944 57 64 Web Content Management
-----------------------------------------------------
http://www.datenkueche.com