1/* 2 * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25/* 26 * $Id: XSLTTransformParameterSpec.java,v 1.4 2005/05/10 16:40:18 mullan Exp $ 27 */ 28package javax.xml.crypto.dsig.spec; 29 30import javax.xml.crypto.dsig.Transform; 31import javax.xml.crypto.XMLStructure; 32 33/** 34 * Parameters for the <a href="http://www.w3.org/TR/1999/REC-xslt-19991116"> 35 * XSLT Transform Algorithm</a>. 36 * The parameters include a namespace-qualified stylesheet element. 37 * 38 * <p>An <code>XSLTTransformParameterSpec</code> is instantiated with a 39 * mechanism-dependent (ex: DOM) stylesheet element. For example: 40 * <pre> 41 * DOMStructure stylesheet = new DOMStructure(element) 42 * XSLTTransformParameterSpec spec = new XSLTransformParameterSpec(stylesheet); 43 * </pre> 44 * where <code>element</code> is an {@link org.w3c.dom.Element} containing 45 * the namespace-qualified stylesheet element. 46 * 47 * @author Sean Mullan 48 * @author JSR 105 Expert Group 49 * @since 1.6 50 * @see Transform 51 */ 52public final class XSLTTransformParameterSpec implements TransformParameterSpec{ 53 private XMLStructure stylesheet; 54 55 /** 56 * Creates an <code>XSLTTransformParameterSpec</code> with the specified 57 * stylesheet. 58 * 59 * @param stylesheet the XSLT stylesheet to be used 60 * @throws NullPointerException if <code>stylesheet</code> is 61 * <code>null</code> 62 */ 63 public XSLTTransformParameterSpec(XMLStructure stylesheet) { 64 if (stylesheet == null) { 65 throw new NullPointerException(); 66 } 67 this.stylesheet = stylesheet; 68 } 69 70 /** 71 * Returns the stylesheet. 72 * 73 * @return the stylesheet 74 */ 75 public XMLStructure getStylesheet() { 76 return stylesheet; 77 } 78} 79