Mercurial > dive4elements > gnv-client
diff gnv/src/main/java/de/intevation/gnv/util/XSLTransformer.java @ 690:254f062e334b
Added JavaDoc.
gnv/trunk@908 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 12 Apr 2010 16:45:16 +0000 |
parents | 57fa8019fbdc |
children | af22fa5567a6 |
line wrap: on
line diff
--- a/gnv/src/main/java/de/intevation/gnv/util/XSLTransformer.java Mon Apr 12 10:56:55 2010 +0000 +++ b/gnv/src/main/java/de/intevation/gnv/util/XSLTransformer.java Mon Apr 12 16:45:16 2010 +0000 @@ -24,8 +24,10 @@ import org.w3c.dom.Node; /** + * This xsl transformer is used to transform incoming xml documents with the + * help of templates into a html representation. + * * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> - * */ public class XSLTransformer { /** @@ -43,6 +45,17 @@ super(); } + /** + * Turns <i>toTransform</i> into another format using the template <i> + * templateFileName</i> with the <i>encoding</i>. The parameters added in + * {@link #addParameter(java.lang.String, java.lang.String)} are available + * in the transformer. + * + * @param toTransform The node to be transformed. + * @param encoding The encoding to be used. + * @param templateFileName The template used for transformation. + * @return the transformed document as string. + */ public String transform(Node toTransform, String encoding, String templateFileName) { String resultValue = null; @@ -79,6 +92,12 @@ } + /** + * Add a parameter that is required in the XSL sheet. + * + * @param name The name of the parameter. + * @param value The value of the parameter. + */ public void addParameter(String name, String value) { if (params == null) { params = new HashMap<String, String>(3); @@ -87,3 +106,4 @@ params.put(name, value); } } +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : \ No newline at end of file