[xsl] <xsl:element> Problem

Subject: [xsl] <xsl:element> Problem
From: "Dev Chandramani" <devc33@xxxxxxxxxxx>
Date: Fri, 7 Sep 2001 12:54:38 +0100

I am fairly new to XSL so my apologies if I am missing something obvious.
I am trying to use XSL to output XML - sounds simple enough.

My example XML input document is :

	<?xml version="1.0"?>


And my XSL stylesheet is :

	<?xml version='1.0'?>
	<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";

	<xsl:strip-space elements = "*" />
	<xsl:output method="text" indent="no" encoding="utf-8"/>

	<xsl:template match="/">

	<xsl:for-each select="//num">

		<xsl:element name="new-num"><xsl:value-of select="."/></xsl:element>
		<xsl:text>&#xa;</xsl:text>	<!-- output new line -->




So what I expect the output to be like would be :


But instead I'm getting :


So it seems the <new-num> tags aren't being correctly outputted.
Even if I change the line that outputs the tags to be the following :

	<new-num><xsl:value-of select="."/></new-num>

I stil get the incorrect output.

I am using the xalan and xerces jar files from xalan version 2.2.D9 and jdk
Any help would be greatly appreciated.

Thanks in advance.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread