I use it for both (although I'm thinking I shouldn't).  I am using the DOM2DOM sample as a test base.  I'll attach it in case you are missing it.
 
Bryan Mulvihill
Software Developer
AMCon Research Inc., Ottawa, Ontario, Canada
http://www.amconresearch.com
----- Original Message -----
Sent: Friday, August 03, 2001 4:33 PM
Subject: RE: stylesheet requires attribute: version

Hi Bryan,
 
Do you build tree for input document or stylesheet? In both cases stylesheet text would be helpful to find the problem. Can you send it or part of it?
 
Thanks,
Dmitry
-----Original Message-----
From: Bryan Mulvihill [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 13:30
To: [EMAIL PROTECTED]
Subject: stylesheet requires attribute: version

I am trying to use Xalan with a parser that extends Xerces (sort of).  It builds a DOM tree, but when that tree is submitted to a transformer, it throws an exception saying:
 
"stylesheet requires attribute: version; Missing or incorrect XSLT Namespace."
 
although the version is set explicitly.
 
What does Xalan expect from a stylesheet before it can use it?
 
Attached is the stack trace.  Any help would be much appreciated.
<?xml version="1.0"?> 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
  <xsl:output method="xml" indent="yes"/>

<xsl:template match="Class">
<BirdInfo>
	<xsl:apply-templates select="Order"/>
</BirdInfo>
</xsl:template>

<xsl:template match="Order">
Order is:  <xsl:value-of select="@Name"/>
	<xsl:apply-templates select="Family"/><xsl:text>
</xsl:text>
</xsl:template>

<xsl:template match="Family">
	Family is:  <xsl:value-of select="@Name"/>
	<xsl:apply-templates select="Species | SubFamily | text()"/>
</xsl:template>

<xsl:template match="SubFamily">
		SubFamily is <xsl:value-of select="@Name"/>
    <xsl:apply-templates select="Species | text()"/>
</xsl:template>

<xsl:template match="Species">
	<xsl:choose>
	  <xsl:when test="name(..)='SubFamily'">
		<xsl:text>	</xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text><xsl:value-of select="@Scientific_Name"/>
	  </xsl:when>
	  <xsl:otherwise>
		<xsl:value-of select="."/><xsl:text> </xsl:text><xsl:value-of select="@Scientific_Name"/>
	  </xsl:otherwise>
	</xsl:choose>
</xsl:template>

</xsl:stylesheet>

Reply via email to