xml-xalan-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thorsten.scherler....@juntadeandalucia.es>
Subject transformer.setParameter using xml as object WITHOUT DOM
Date Tue, 09 Sep 2008 10:47:06 GMT
Hi all,

I need to re-factor some code that uses a transformation where I pass a
snippet of xml to a xsl stylesheet. 

The code is in Apache Forrest especially in the dispatcher. I have a
configuration file (structurer) that can provide custom xml for a
contract as properties. 

<forrest:contract name="siteinfo-meta">
  <forrest:property name="custom">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>

A contract is a simple xsl stylesheet that picks up the properties via a

<xsl:stylesheet version="1.1"

 <xsl:param name="custom" />
 <xsl:copy-of select="$custom/*"/>

In the java code I am doing right now something like:
DocumentBuilder builder =

I came up with this code since I did not found any other way to pass xml
as parameter to the transformation.

It seems that if the Object is not of type org.w3c.dom.Document I cannot
treat it as xml directly. I tried with a SAX source but that did not

Is there a way to pass xml as parameter to a xsl stylesheet without
using DOM?

TIA for any information.

Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions

View raw message