KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > xml > crypto > dsig > spec > XSLTTransformParameterSpec


1 /*
2  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
3  */

4 /*
5  * $Id: XSLTTransformParameterSpec.java,v 1.4 2005/05/10 16:40:18 mullan Exp $
6  */

7 package javax.xml.crypto.dsig.spec;
8
9 import javax.xml.crypto.dsig.Transform;
10 import javax.xml.crypto.XMLStructure;
11
12 /**
13  * Parameters for the <a HREF="http://www.w3.org/TR/1999/REC-xslt-19991116">
14  * XSLT Transform Algorithm</a>.
15  * The parameters include a namespace-qualified stylesheet element.
16  *
17  * <p>An <code>XSLTTransformParameterSpec</code> is instantiated with a
18  * mechanism-dependent (ex: DOM) stylesheet element. For example:
19  * <pre>
20  * DOMStructure stylesheet = new DOMStructure(element)
21  * XSLTTransformParameterSpec spec = new XSLTransformParameterSpec(stylesheet);
22  * </pre>
23  * where <code>element</code> is an {@link org.w3c.dom.Element} containing
24  * the namespace-qualified stylesheet element.
25  *
26  * @author Sean Mullan
27  * @author JSR 105 Expert Group
28  * @since 1.6
29  * @see Transform
30  */

31 public final class XSLTTransformParameterSpec implements TransformParameterSpec{
32     private XMLStructure stylesheet;
33
34     /**
35      * Creates an <code>XSLTTransformParameterSpec</code> with the specified
36      * stylesheet.
37      *
38      * @param stylesheet the XSLT stylesheet to be used
39      * @throws NullPointerException if <code>stylesheet</code> is
40      * <code>null</code>
41      */

42     public XSLTTransformParameterSpec(XMLStructure stylesheet) {
43     if (stylesheet == null) {
44         throw new NullPointerException JavaDoc();
45     }
46     this.stylesheet = stylesheet;
47     }
48
49     /**
50      * Returns the stylesheet.
51      *
52      * @return the stylesheet
53      */

54     public XMLStructure getStylesheet() {
55     return stylesheet;
56     }
57 }
58
Popular Tags