When building the Nodes xmlSourceDoc and xslSourceDoc, be sure that
you've turned on namespace awareness in the parser.  If you're building
these Nodes manually, be sure you use the namespace-aware DOM L2 calls.

Gary

> -----Original Message-----
> From: Sundeep Dhillon [mailto:[EMAIL PROTECTED] 
> Sent: Friday, December 14, 2001 7:39 AM
> To: '[EMAIL PROTECTED]'
> Subject: FW: transformation xsl probelms
> 
> 
> 
> > i am trying to transform a stylesheet, but an exception is being 
> > thrown any can one help.
> > 
> > here is my code:
> > 
> > StreamResult result = new StreamResult(output); TransformerFactory 
> > factory = TransformerFactory.newInstance(); DOMSource 
> xmlSource = new 
> > DOMSource(xmlSourceDoc); DOMSource xslSource = new 
> > DOMSource(xslSourceDoc);
> >     
> > Transformer transformer = factory.newTransformer(xslSource); // 
> > exception here
> > 
> > transformer.transform(xmlSource,result);
> > 
> > //output of stylesheet document
> > <?xml version="1.0"?>
> > <xsl:stylesheet version="1.0" 
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
> > 
> > 
> > //exception
> > javax.xml.transform.TransformerConfigurationException:
> > javax.xml.transform.TransformerConfigurationException:
> > javax.xml.transform.TransformerException:
> > javax.xml.transform.TransformerException: stylesheet requires 
> > attribute: version
> >         at 
> > 
> org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(Trans
> > form
> > erFactoryImpl.java:767)
> >         at
> > 
> weblogic.xml.jaxp.RegistrySAXTransformerFactory.newTransformer
> (RegistrySAX
> > TransformerFactory.java:216)
> >         at 
> com.levelseas.core.util.XsltUtil.process(XsltUtil.java:28)
> > 
> 
> 
> **********************************************************************
> This email and any files transmitted with it are confidential 
> and intended solely for the use of the individual or entity 
> to whom they are addressed. If you have received this email 
> in error please notify the system manager.
> 
> This footnote also confirms that this email message has been 
> swept by MIMEsweeper at LevelSeas for the presence of 
> computer viruses.
> 
> **********************************************************************
> 

Reply via email to