This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes  Why TransformerException? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply locked New topic

Why TransformerException?

Russ Ray
Ranch Hand

Joined: Feb 11, 2003
Posts: 52
I am taking a simple XML file and transforming it into another XML file. It is very basic and very small. However, when I try to transform the XML, I get the following exception:
javax.xml.transform.TransformerException: stylesheet requires attribute: version
What what I see, I have the version in the xsl file. This is the simple file:
<?xml version="1.0" encoding="UTF-8"?>
<xsl utput method="xml" encoding="UTF-8" indent="yes" xalan:indent-amount="2"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<xsl:value-of select="/TCNewTOInfo/LocationShippedTo"/>
<xsl:value-of select="/TCNewTOInfo/TOName"/>
<xsl:value-of select="/TCNewTOInfo/Time_Of_Activity"/>
Thank in advance!!!
Russ Ray
Ranch Hand

Joined: Feb 11, 2003
Posts: 52
you may close this topic.
It is sorta covered in the JavaRanch Style Guide.
subject: Why TransformerException?
It's not a secret anymore!