The XSLT specification requires Saxon to output this warning, but you can suppress it by setting the -novw flag on the command line or the equivalent configuration option in the TransformerFactory - look through the list of FeatureKeys supported.
 
Michael Kay
http://www.saxonica.com/


From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of ???
Sent: 11 September 2007 07:59
To: saxon-help@lists.sourceforge.net
Subject: [saxon] Run an XSLT 1.0 stylesheet with an XSLT 2.0 processor

 
Use package saxon8.jar

import net.sf.saxon.TransformerFactoryImpl;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.dom.DOMSource;
 
  Document docSource = input("xslt.xsl");
  DOMSource source = new DOMSource(docSource);
   
 TransformerFactory fac = new TransformerFactoryImpl();
 Transformer transformer = fac.newTransformer(source);
 

xslt.xsl like this:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  version="1.0">
……
……
</xsl:stylesheet>
 
the problem is:
the xlst processor is 2.0, but the xslt stylesheet is 1.0 ( version="1.0").
there is a warning:
Warning: at xsl:stylesheet of :
  Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
 
However,
I don't want to  change version="1.0"  to version="2.0"
How to solve the warning?