01: /*
02: * The contents of this file are subject to the terms of the Common Development
03: * and Distribution License (the License). You may not use this file except in
04: * compliance with the License.
05: *
06: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
07: * or http://www.netbeans.org/cddl.txt.
08: *
09: * When distributing Covered Code, include this CDDL Header Notice in each file
10: * and include the License file at http://www.netbeans.org/cddl.txt.
11: * If applicable, add the following below the CDDL Header, with the fields
12: * enclosed by brackets [] replaced by your own identifying information:
13: * "Portions Copyrighted [year] [name of copyright owner]"
14: *
15: * The Original Software is NetBeans. The Initial Developer of the Original
16: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17: * Microsystems, Inc. All Rights Reserved.
18: */
19:
20: package org.netbeans.modules.xslt.model;
21:
22: import java.util.List;
23:
24: import javax.xml.namespace.QName;
25:
26: /**
27: * <pre>
28: * <xs:element name="apply-templates" substitutionGroup="xsl:instruction">
29: * <xs:complexType>
30: * <xs:complexContent>
31: * <xs:extension base="xsl:element-only-versioned-element-type">
32: * <xs:choice minOccurs="0" maxOccurs="unbounded">
33: * <xs:element ref="xsl:sort"/>
34: * <xs:element ref="xsl:with-param"/>
35: * </xs:choice>
36: * <xs:attribute name="select" type="xsl:expression" default="child::node()"/>
37: * <xs:attribute name="mode" type="xsl:mode"/>
38: * </xs:extension>
39: * </xs:complexContent>
40: * </xs:complexType>
41: * </xs:element>
42: * </pre>
43: *
44: * @author ads
45: *
46: */
47: public interface ApplyTemplates extends Instruction, SelectSpec {
48:
49: String CHILD_ELEMENTS = "sort_or_with-param"; // NOI18N
50:
51: String MODE = "mode"; // NOI18N
52:
53: /**
54: * @return list of ApplyTemplates children components
55: */
56: List<ApplyTemplateChild> getChildrenElements();
57:
58: /**
59: * Appends new <code>child</code> to the end of children list.
60: * @param child new child component
61: */
62: void appendChildElement(ApplyTemplateChild child);
63:
64: /**
65: * Insert new <code>child</code> into <code>position</code>.
66: * @param child new child element.
67: * @param position position index
68: */
69: void addChildElement(ApplyTemplateChild child, int position);
70:
71: /**
72: * Removes <code>child</code> component.
73: * @param child child in this parent
74: */
75: void removeChildElement(ApplyTemplateChild child);
76:
77: /**
78: * Gets the mode of this template.
79: * @return the mode
80: */
81: QName getMode();
82:
83: /**
84: * Sets the mode of this template.
85: * @param mode the new mode for this template
86: */
87: void setMode(QName mode);
88: }
|