public void validate() throws XPathException { if (!(getParent() instanceof XSLChoose)) { compileError("xsl:otherwise must be immediately within xsl:choose", "XTSE0010"); } }
public void validate(ComponentDeclaration decl) throws XPathException { if (!(getParent() instanceof XSLChoose)) { compileError("xsl:otherwise must be immediately within xsl:choose", "XTSE0010"); } }
public void validate() throws XPathException { if (!(getParent() instanceof XSLChoose)) { compileError("xsl:otherwise must be immediately within xsl:choose", "XTSE0010"); } }
public void validate(ComponentDeclaration decl) throws XPathException { if (!(getParent() instanceof XSLChoose)) { compileError("xsl:otherwise must be immediately within xsl:choose", "XTSE0010"); } }
public void validate(ComponentDeclaration decl) throws XPathException { AxisIterator kids = iterateAxis(AxisInfo.CHILD); while (true) { NodeInfo curr = kids.next(); if (curr == null) { break; } if (curr instanceof XSLWhen) { if (otherwise != null) { otherwise.compileError("xsl:otherwise must come last", "XTSE0010"); } numberOfWhens++; } else if (curr instanceof XSLOtherwise) { if (otherwise != null) { ((XSLOtherwise) curr).compileError("Only one xsl:otherwise is allowed in an xsl:choose", "XTSE0010"); } else { otherwise = (StyleElement) curr; } } else if (curr instanceof StyleElement) { ((StyleElement) curr).compileError("Only xsl:when and xsl:otherwise are allowed here", "XTSE0010"); } else { compileError("Only xsl:when and xsl:otherwise are allowed within xsl:choose", "XTSE0010"); } } if (numberOfWhens == 0) { compileError("xsl:choose must contain at least one xsl:when", "XTSE0010"); } }
public void validate() throws XPathException { AxisIterator kids = iterateAxis(Axis.CHILD); while(true) { NodeInfo curr = (NodeInfo)kids.next(); if (curr == null) { break; } if (curr instanceof XSLWhen) { if (otherwise!=null) { otherwise.compileError("xsl:otherwise must come last", "XTSE0010"); } numberOfWhens++; } else if (curr instanceof XSLOtherwise) { if (otherwise!=null) { ((XSLOtherwise)curr).compileError("Only one xsl:otherwise is allowed in an xsl:choose", "XTSE0010"); } else { otherwise = (StyleElement)curr; } } else if (curr instanceof StyleElement) { ((StyleElement)curr).compileError("Only xsl:when and xsl:otherwise are allowed here", "XTSE0010"); } else { compileError("Only xsl:when and xsl:otherwise are allowed within xsl:choose", "XTSE0010"); } } if (numberOfWhens==0) { compileError("xsl:choose must contain at least one xsl:when", "XTSE0010"); } }
public void validate(ComponentDeclaration decl) throws XPathException { AxisIterator kids = iterateAxis(AxisInfo.CHILD); while (true) { NodeInfo curr = kids.next(); if (curr == null) { break; } if (curr instanceof XSLWhen) { if (otherwise != null) { otherwise.compileError("xsl:otherwise must come last", "XTSE0010"); } numberOfWhens++; } else if (curr instanceof XSLOtherwise) { if (otherwise != null) { ((XSLOtherwise) curr).compileError("Only one xsl:otherwise is allowed in an xsl:choose", "XTSE0010"); } else { otherwise = (StyleElement) curr; } } else if (curr instanceof StyleElement) { ((StyleElement) curr).compileError("Only xsl:when and xsl:otherwise are allowed here", "XTSE0010"); } else { compileError("Only xsl:when and xsl:otherwise are allowed within xsl:choose", "XTSE0010"); } } if (numberOfWhens == 0) { compileError("xsl:choose must contain at least one xsl:when", "XTSE0010"); } }