I have solved the same problem moths ago.

I supose you have dom and xslt/dom in the xml and xslt vars.

I developed a managedbean based on dom4j.

Move the code you youe to ooad xml and xslt to that bean and make a
getTransformedData() method like this

public String getTransformedData() {
 // load the transformer using JAXP
       TransformerFactory factory = TransformerFactory.newInstance();
       Transformer transformer = factory.newTransformer(
           new StreamSource( stylesheet )
       );

       // now lets style the given document
       DocumentSource source = new DocumentSource( document );
       DocumentResult result = new DocumentResult();
       transformer.transform( source, result );

       // return the transformed document
       Document transformedDoc = result.getDocument();
       return transformedDoc.asXML();
}


where document and stylesheet are your old xml and xslt.


then replace your tag with a simple

<h:outputText value="#{transformerBean.tansformedData}" ecape="false" />



2007/5/15, Kevin Gutch <[EMAIL PROTECTED]>:
Hi,

I have an existing application that I am completely migrating to JSF.
Everything seems fine but I am trying to figure out what to do with an
area of the app where I use
<x:transform xml="${xml}" xslt="${xslt}" />. This does not want to seem
to work with JSF. Should it? If not what are my alternatives?

Thanks

Kevin




--
::SammyRulez::
http://www.kyub.com/blog/
-----------------------------------------------------------------
La programmazione รจ per un terzo interpretazione e per due terzi ispirazione.
E per un terzo mistificazione

Reply via email to