Project

Profile

Help

Revision ffcc03e0

Added by Michael Kay almost 2 years ago

Fix bug #4331

View differences:

latest9.9/hej/net/sf/saxon/style/XSLAcceptExpose.java
116 116
                if (componentTypeCode == -1) {
117 117
                    compileError("When component='*' is specified, all names must be wildcards",
118 118
                                 this instanceof XSLAccept ? "XTSE3032" : "XTSE3022");
119
                } else {
119
                } else if (componentTypeCode == StandardNames.XSL_FUNCTION) {
120 120
                    StructuredQName name = makeQName(tok.substring(0, hash));
121 121
                    test = new NameTest(Type.ELEMENT, name.getURI(), name.getLocalPart(), getNamePool());
122 122
                    int arity = 0;
......
126 126
                        compileError("Malformed function arity in '" + tok + "'");
127 127
                    }
128 128
                    explicitComponentTests.add(new ComponentTest(componentTypeCode, test, arity));
129
                } else {
130
                    compileError("Cannot specify arity for components other than functions", "XTSE3020");
129 131
                }
130 132

  
131 133
            } else if (tok.equals("*")) {
......
155 157
                if (componentTypeCode == -1) {
156 158
                    compileError("When component='*' is specified, all names must be wildcards",
157 159
                                 this instanceof XSLAccept ? "XTSE3032" : "XTSE3022");
160
                } else if (componentTypeCode == StandardNames.XSL_FUNCTION) {
161
                    compileError("When the name identifies a function, the arity must be given (XSLT 3.0 erratum E36)", "XTSE3020");
158 162
                } else {
159 163
                    StructuredQName name;
160 164
                    try {

Also available in: Unified diff