File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply locked New topic
Author

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:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:xalan="http://xml.apache.org/xslt">
<xsl utput method="xml" encoding="UTF-8" indent="yes" xalan:indent-amount="2"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<NewTOInfo>
<FileLocation>
<xsl:value-of select="/TCNewTOInfo/LocationShippedTo"/>
</FileLocation>
<FileName>
<xsl:value-of select="/TCNewTOInfo/TOName"/>
</FileName>
<timeStamp>
<xsl:value-of select="/TCNewTOInfo/Time_Of_Activity"/>
</timeStamp>
</NewTOInfo>
</xsl:template>
</xsl:stylesheet>
Thank in advance!!!
Russ
:roll:
Russ Ray
Ranch Hand

Joined: Feb 11, 2003
Posts: 52
you may close this topic.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why TransformerException?