That simply means there's still a bug in Xalan-J concerning SAX handling.
XLTC is probably sending and empty string instead of null to the
Element.setAttributeNS() method. The problem: SAX uses empty strings for
"no namespace", while the W3C DOM uses null. The XSLT implementations
have to convert between the two concepts.

SAXON had the same problem and older Xalan-J (non-XSLTC) versions, too.
Batik recently fixed something that avoids the error but that fix will
only be available after the next release. There's nothing FOP can do
here.

As a work-around, you can try to use the latest Batik Trunk (from
Subversion) which contains a fix. Better would be to alert the Xalan-J
people that they still have a problem in their XSLTC.

On 15.09.2006 21:04:31 Thurgood, Eric wrote:
> Hello,
> 
> I'm attempting to improve the transform performance by using a XSLTC to
> compile my stylesheets. However, when using the compiled stylesheets, I
> get the 'The attribute "width" of the element <rect> is required' error
> in the FOP output, and the SVG graphics are missing from the resulting
> PDFs. If I switch back to using the non-compiled version of the
> stylesheets, the SVG graphics work fine.
> 
> I'm using Xalan Java version 2.7.0 and Xerces-J version 2.7.1.
> 
> The code in question looks like this when not using XSLTC:
> 
> System.setProperty("javax.xml.transform.TransformerFactory",
> "org.apache.xalan.processor.TransformerFactoryImpl");    
>       
> TransformerFactory tf = null;
> tf = TransformerFactory.newInstance();
> 
> Templates _xslTemplates = tf.newTemplates(new StreamSource(new
> File("<path to xsl file>"));
> 
> 
> And like this when using XSLTC:
> 
> System.setProperty("javax.xml.transform.TransformerFactory","org.apache.
> xalan.xsltc.trax.TransformerFactoryImpl");  
>     
> TransformerFactory tf = null;
> tf = TransformerFactory.newInstance();
> tf.setAttribute("translet-name", "MasterXSL");
> tf.setAttribute("package-name", "com.foo.bar.xsltc");
> tf.setAttribute("generate-translet", Boolean.TRUE);
> tf.setAttribute("destination-directory", "C:\\temp\\xsltc");
> 
> Templates _xslTemplates = tf.newTemplates(new StreamSource(new
> File("<path to xsl file>"));
> 
> 
> Has anyone else seen this behavior? If so, are there any workarounds?
> 
> Thanks,
> Eric 


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to