Closed Bug 788487 Opened 12 years ago Closed 12 years ago

XSLT rendering error on SVG and xsl:call-template

Categories

(Firefox :: Untriaged, defect)

15 Branch
x86_64
Windows 7
defect
Not set
minor

Tracking

()

RESOLVED INVALID

People

(Reporter: razstorm, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0
Build ID: 20120824154833

Steps to reproduce:

When using the following XSL-Stylesheet (with any XML, the example does not need a special file) the element within an unnamed template will be rendered, but the element within a named template will not be renderend.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n1="urn:hl7-org:v3">
	<xsl:output method="html" omit-xml-declaration="yes" indent="yes" version="1.0" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>

	
	<xsl:template match="/">
		<html>
			<head>
				<title></title>
			</head>
			<body>
				<svg width="100px" height="100px" xmlns="http://www.w3.org/2000/svg">
				<g id="linechart">
				<text x="10" y="20" fill="black">Hello</text>
				<xsl:call-template name="xxx">
				</xsl:call-template>
				</g>
				</svg>
			</body>
		</html>
	</xsl:template>
	
	<xsl:template name="xxx">
		<text x="50" y="20" fill="black">World!</text>
	</xsl:template>
</xsl:stylesheet>


Actual results:

Output was: Hello


Expected results:

Output should have been: Hello World!
Severity: normal → minor
You need to add xmlns="http://www.w3.org/2000/svg" to the text element.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.