mname = makeQName(s); } catch (XPathException e) { compileError(e.getMessage(), "XTSE0550"); mname = Mode.UNNAMED_MODE_NAME; compileError("In the list of modes, the value " + s + " is duplicated", "XTSE0550"); compileError("mode='#all' cannot be combined with other modes", "XTSE0550");
mname = makeQName(s); } catch (XPathException e) { compileError(e.getMessage(), "XTSE0550"); mname = Mode.UNNAMED_MODE_NAME; compileError("In the list of modes, the value " + s + " is duplicated", "XTSE0550"); compileError("mode='#all' cannot be combined with other modes", "XTSE0550");
@Override public void validateSubtree(ComponentDeclaration decl, boolean excludeStylesheet) throws XPathException { if (!isDeferredCompilation(getCompilation())) { super.validateSubtree(decl, excludeStylesheet); } else { try { validate(decl); } catch (XPathException err) { compileError(err); } } }
@Override public void validateSubtree(ComponentDeclaration decl, boolean excludeStylesheet) throws XPathException { if (!isDeferredCompilation(getCompilation())) { super.validateSubtree(decl, excludeStylesheet); } else { try { validate(decl); } catch (XPathException err) { compileError(err); } } }
int otherPrecedence = other.getPrecedence(); if (thisPrecedence == otherPrecedence) { template.compileError("Duplicate named template (see line " + other.getLineNumber() + " of " + other.getSystemId() + ')', "XTSE0660"); } else if (thisPrecedence < otherPrecedence) {
int otherPrecedence = other.getPrecedence(); if (thisPrecedence == otherPrecedence) { template.compileError("Duplicate named template (see line " + other.getLineNumber() + " of " + other.getSystemId() + ')', "XTSE0660"); } else if (thisPrecedence < otherPrecedence) {
int otherPrecedence = other.getPrecedence(); if (thisPrecedence == otherPrecedence) { template.compileError("Duplicate named template (see line " + other.getLineNumber() + " of " + other.getSystemId() + ')', "XTSE0660"); } else if (thisPrecedence < otherPrecedence) {
for (StructuredQName name : modeNames) { if (name.equals(Mode.UNNAMED_MODE_NAME) && !manager.isUnnamedModeExplicit()) { compileError("The unnamed mode has not been declared in an xsl:mode declaration", "XTSE3085"); compileError("Mode name " + name.getDisplayName() + " has not been declared in an xsl:mode declaration", "XTSE3085"); compileError("The unnamed mode has not been declared in an xsl:mode declaration", "XTSE3085"); compileError("An abstract template must have no match attribute"); compileError("A template with visibility='abstract' must have no body");
for (StructuredQName name : modeNames) { if (name.equals(Mode.UNNAMED_MODE_NAME) && !manager.isUnnamedModeExplicit()) { compileError("The unnamed mode has not been declared in an xsl:mode declaration", "XTSE3085"); compileError("Mode name " + name.getDisplayName() + " has not been declared in an xsl:mode declaration", "XTSE3085"); compileError("The unnamed mode has not been declared in an xsl:mode declaration", "XTSE3085"); compileError("An abstract template must have no match attribute"); compileError("A template with visibility='abstract' must have no body");
compileError("The overriding template has a different required type from the overridden template", "XTSE3070"); return; mayOmitContextItem != other.isMayOmitContextItem() || absentFocus != other.isAbsentFocus()) { compileError("The required context item for the overriding template differs from that of the overridden template", "XTSE3070"); return; if (lp1 == null) { if (!lp0.isTunnel) { compileError("The overridden template declares a parameter " + lp0.name.getDisplayName() + " which is not declared in the overriding template", "XTSE3070");
} catch (XPathException e) { if (e.isReportableStatically()) { compileError(e); } else { body = new ErrorExpression(e); compileError(err); body = body.typeCheck(visitor, cisi); } catch (XPathException e) { compileError(e);
} catch (XPathException e) { if (e.isReportableStatically()) { compileError(e); } else { body = new ErrorExpression(e); compileError(err); body = body.typeCheck(visitor, cisi); } catch (XPathException e) { compileError(e);
if (thisPrecedence == otherPrecedence) { String errorCode = sourceTemplate.getParent() instanceof XSLOverride ? "XTSE3055" : "XTSE0660"; sourceTemplate.compileError("Duplicate named template (see line " + otherTemplate.getSourceElement().getLineNumber() + " of " + otherTemplate.getSourceElement().getSystemId() + ')', errorCode); } else if (thisPrecedence < otherPrecedence) { templateIndex.put(sName.getComponentName(), decl); } else { sourceTemplate.compileError("Named template " + sName.getComponentName().getDisplayName() + " conflicts with a public named template in package " + other.getDeclaringPackage().getPackageName(), "XTSE3050");
if (thisPrecedence == otherPrecedence) { String errorCode = sourceTemplate.getParent() instanceof XSLOverride ? "XTSE3055" : "XTSE0660"; sourceTemplate.compileError("Duplicate named template (see line " + otherTemplate.getSourceElement().getLineNumber() + " of " + otherTemplate.getSourceElement().getSystemId() + ')', errorCode); } else if (thisPrecedence < otherPrecedence) { templateIndex.put(sName.getComponentName(), decl); } else { sourceTemplate.compileError("Named template " + sName.getComponentName().getDisplayName() + " conflicts with a public named template in package " + other.getDeclaringPackage().getPackageName(), "XTSE3050");
template.compileError("A template rule cannot be added to a mode declared in a used package " + "unless the xsl:template declaration appears within an xsl:override child of the appropriate xsl:use-package element", "XTSE3050");
template.compileError("A template rule cannot be added to a mode declared in a used package " + "unless the xsl:template declaration appears within an xsl:override child of the appropriate xsl:use-package element", "XTSE3050");
public void validate() throws XPathException { stackFrameMap = getConfiguration().makeSlotManager(); checkTopLevel(null); // the check for duplicates is now done in the buildIndexes() method of XSLStylesheet if (match != null) { match = typeCheck("match", match); if (match.getNodeTest() instanceof EmptySequenceTest) { try { getConfiguration().getErrorListener().warning( new TransformerException("Match pattern cannot match any nodes", this)); } catch (TransformerException e) { compileError(XPathException.makeXPathException(e)); } } } // See if there are any required parameters. AxisIterator kids = iterateAxis(Axis.CHILD); while(true) { NodeInfo param = (NodeInfo)kids.next(); if (param == null) { break; } if (param instanceof XSLParam && ((XSLParam)param).isRequiredParam()) { hasRequiredParams = true; break; } } }
public void validate() throws XPathException { stackFrameMap = getConfiguration().makeSlotManager(); checkTopLevel(null); // the check for duplicates is now done in the buildIndexes() method of XSLStylesheet if (match != null) { match = typeCheck("match", match); if (match.getNodeTest() instanceof EmptySequenceTest) { try { getConfiguration().getErrorListener().warning( new TransformerException("Match pattern cannot match any nodes", this)); } catch (TransformerException e) { compileError(XPathException.makeXPathException(e)); } } } markTailCalls(); // See if there are any required parameters AxisIterator declaredParams = iterateAxis(Axis.CHILD); while(true) { NodeInfo param = (NodeInfo)declaredParams.next(); if (param == null) { break; } if (param instanceof XSLParam && ((XSLParam)param).isRequiredParam()) { hasRequiredParams = true; break; } } }
public void validate() throws XPathException { stackFrameMap = getConfiguration().makeSlotManager(); checkTopLevel(null); // the check for duplicates is now done in the buildIndexes() method of XSLStylesheet if (match != null) { match = typeCheck("match", match); if (match.getNodeTest() instanceof EmptySequenceTest) { try { getConfiguration().getErrorListener().warning( new TransformerException("Match pattern cannot match any nodes", this)); } catch (TransformerException e) { compileError(XPathException.makeXPathException(e)); } } } markTailCalls(); // See if there are any required parameters AxisIterator declaredParams = iterateAxis(Axis.CHILD); while(true) { NodeInfo param = (NodeInfo)declaredParams.next(); if (param == null) { break; } if (param instanceof XSLParam && ((XSLParam)param).isRequiredParam()) { hasRequiredParams = true; break; } } }
XSLTemplate decl = (XSLTemplate)curr; if (decl.getMatch() == null) { decl.compileError("An overriding template with no name must have a match pattern");