Project

Profile

Help

Revision fc84f3b1

Added by Michael Kay over 9 years ago

Fix bug 3451725 Diagnostics: ambiguous rule with union pattern

View differences:

latest9.3/hej/net/sf/saxon/trans/RuleManager.java
173 173
                ((CombinedNodeTest)pattern.getNodeTest()).getOperator() == Token.UNION) {
174 174
            CombinedNodeTest cnt = (CombinedNodeTest)pattern.getNodeTest();
175 175
            NodeTest[] nt = cnt.getComponentNodeTests();
176
            setTemplateRule(new NodeTestPattern(nt[0]), eh, mode, module, priority);
177
            setTemplateRule(new NodeTestPattern(nt[1]), eh, mode, module, priority);
176
            NodeTestPattern ntp0 = new NodeTestPattern(nt[0]);
177
            NodeTestPattern ntp1 = new NodeTestPattern(nt[1]);
178
            ntp0.setSystemId(pattern.getSystemId());
179
            ntp1.setSystemId(pattern.getSystemId());
180
            ntp0.setLineNumber(pattern.getLineNumber());
181
            ntp1.setLineNumber(pattern.getLineNumber());
182
            setTemplateRule(ntp0, eh, mode, module, priority);
183
            setTemplateRule(ntp1, eh, mode, module, priority);
178 184
            return;
179 185
        }
180 186
        if (Double.isNaN(priority)) {

Also available in: Unified diff