void fallback() throws TemplateException, IOException { TemplateModel macroOrTransform = getNodeProcessor(currentNodeName, currentNodeNS, nodeNamespaceIndex); if (macroOrTransform instanceof Macro) { invoke((Macro) macroOrTransform, null, null, null, null); } else if (macroOrTransform instanceof TemplateTransformModel) { visitAndTransform(null, (TemplateTransformModel) macroOrTransform, null); } }
TemplateModel getNodeProcessor(TemplateNodeModel node) throws TemplateException { String nodeName = node.getNodeName(); if (nodeName == null) { throw new _MiscTemplateException(this, "Node name is null."); } TemplateModel result = getNodeProcessor(nodeName, node.getNodeNamespace(), 0); if (result == null) { String type = node.getNodeType(); /* DD: Original version: */ if (type == null) { type = "default"; } result = getNodeProcessor("@" + type, null, 0); /* * DD: Jonathan's non-BC version and IMHO otherwise wrong version: if (type != null) { result = * getNodeProcessor("@" + type, null, 0); } if (result == null) { result = getNodeProcessor("@default", * null, 0); } */ } return result; }
private TemplateModel getNodeProcessor(final String nodeName, final String nsURI, int startIndex) throws TemplateException { TemplateModel result = null; int i; int size = nodeNamespaces.size(); for (i = startIndex; i < size; i++) { Namespace ns = null; try { ns = (Namespace) nodeNamespaces.get(i); } catch (ClassCastException cce) { throw new _MiscTemplateException(this, "A \"using\" clause should contain a sequence of namespaces or strings that indicate the " + "location of importable macro libraries."); } result = getNodeProcessor(ns, nodeName, nsURI); if (result != null) break; } if (result != null) { this.nodeNamespaceIndex = i + 1; this.currentNodeName = nodeName; this.currentNodeNS = nsURI; } return result; }
TemplateModel macroOrTransform = getNodeProcessor(node); if (macroOrTransform instanceof Macro) { invoke((Macro) macroOrTransform, null, null, null, null);
void fallback() throws TemplateException, IOException { TemplateModel macroOrTransform = getNodeProcessor(currentNodeName, currentNodeNS, nodeNamespaceIndex); if (macroOrTransform instanceof Macro) { visit((Macro) macroOrTransform, null, null, null, null); } else if (macroOrTransform instanceof TemplateTransformModel) { visit(null, (TemplateTransformModel) macroOrTransform, null); } }
void fallback() throws TemplateException, IOException { TemplateModel macroOrTransform = getNodeProcessor(currentNodeName, currentNodeNS, nodeNamespaceIndex); if (macroOrTransform instanceof Macro) { invoke((Macro) macroOrTransform, null, null, null, null); } else if (macroOrTransform instanceof TemplateTransformModel) { visitAndTransform(null, (TemplateTransformModel) macroOrTransform, null); } }
void fallback() throws TemplateException, IOException { TemplateModel macroOrTransform = getNodeProcessor(currentNodeName, currentNodeNS, nodeNamespaceIndex); if (macroOrTransform instanceof Macro) { invoke((Macro) macroOrTransform, null, null, null, null); } else if (macroOrTransform instanceof TemplateTransformModel) { visitAndTransform(null, (TemplateTransformModel) macroOrTransform, null); } }
TemplateModel getNodeProcessor(TemplateNodeModel node) throws TemplateException { String nodeName = node.getNodeName(); if (nodeName == null) { throw new _MiscTemplateException(this, "Node name is null."); } TemplateModel result = getNodeProcessor(nodeName, node.getNodeNamespace(), 0); if (result == null) { String type = node.getNodeType(); /* DD: Original version: */ if (type == null) { type = "default"; } result = getNodeProcessor("@" + type, null, 0); /* * DD: Jonathan's non-BC version and IMHO otherwise wrong version: if (type != null) { result = * getNodeProcessor("@" + type, null, 0); } if (result == null) { result = getNodeProcessor("@default", * null, 0); } */ } return result; }
TemplateModel getNodeProcessor(TemplateNodeModel node) throws TemplateException { String nodeName = node.getNodeName(); if (nodeName == null) { throw new _MiscTemplateException(this, "Node name is null."); } TemplateModel result = getNodeProcessor(nodeName, node.getNodeNamespace(), 0); if (result == null) { String type = node.getNodeType(); /* DD: Original version: */ if (type == null) { type = "default"; } result = getNodeProcessor("@" + type, null, 0); /* * DD: Jonathan's non-BC version and IMHO otherwise wrong version: if (type != null) { result = * getNodeProcessor("@" + type, null, 0); } if (result == null) { result = getNodeProcessor("@default", * null, 0); } */ } return result; }
TemplateModel getNodeProcessor(TemplateNodeModel node) throws TemplateException { String nodeName = node.getNodeName(); if (nodeName == null) { throw new TemplateException("Node name is null.", this); } TemplateModel result = getNodeProcessor(nodeName, node.getNodeNamespace(), 0); if (result == null) { String type = node.getNodeType(); /* DD: Original version: */ if (type == null) { type = "default"; } result = getNodeProcessor("@" + type, null, 0); /* DD: Jonathan's non-BC version and IMHO otherwise wrong version: if (type != null) { result = getNodeProcessor("@" + type, null, 0); } if (result == null) { result = getNodeProcessor("@default", null, 0); } */ } return result; }
private TemplateModel getNodeProcessor(final String nodeName, final String nsURI, int startIndex) throws TemplateException { TemplateModel result = null; int i; int size = nodeNamespaces.size(); for (i = startIndex; i < size; i++) { Namespace ns = null; try { ns = (Namespace) nodeNamespaces.get(i); } catch (ClassCastException cce) { throw new _MiscTemplateException(this, "A \"using\" clause should contain a sequence of namespaces or strings that indicate the " + "location of importable macro libraries."); } result = getNodeProcessor(ns, nodeName, nsURI); if (result != null) break; } if (result != null) { this.nodeNamespaceIndex = i + 1; this.currentNodeName = nodeName; this.currentNodeNS = nsURI; } return result; }
private TemplateModel getNodeProcessor(final String nodeName, final String nsURI, int startIndex) throws TemplateException { TemplateModel result = null; int i; for (i = startIndex; i<nodeNamespaces.size(); i++) { Namespace ns = null; try { ns = (Namespace) nodeNamespaces.get(i); } catch (ClassCastException cce) { throw new InvalidReferenceException("A using clause should contain a sequence of namespaces or strings that indicate the location of importable macro libraries.", this); } result = getNodeProcessor(ns, nodeName, nsURI); if (result != null) break; } if (result != null) { this.nodeNamespaceIndex = i+1; this.currentNodeName = nodeName; this.currentNodeNS = nsURI; } return result; }
private TemplateModel getNodeProcessor(final String nodeName, final String nsURI, int startIndex) throws TemplateException { TemplateModel result = null; int i; int size = nodeNamespaces.size(); for (i = startIndex; i < size; i++) { Namespace ns = null; try { ns = (Namespace) nodeNamespaces.get(i); } catch (ClassCastException cce) { throw new _MiscTemplateException(this, "A \"using\" clause should contain a sequence of namespaces or strings that indicate the " + "location of importable macro libraries."); } result = getNodeProcessor(ns, nodeName, nsURI); if (result != null) break; } if (result != null) { this.nodeNamespaceIndex = i + 1; this.currentNodeName = nodeName; this.currentNodeNS = nsURI; } return result; }
TemplateModel macroOrTransform = getNodeProcessor(node); if (macroOrTransform instanceof Macro) { visit((Macro) macroOrTransform, null, null, null, null);
TemplateModel macroOrTransform = getNodeProcessor(node); if (macroOrTransform instanceof Macro) { invoke((Macro) macroOrTransform, null, null, null, null);
TemplateModel macroOrTransform = getNodeProcessor(node); if (macroOrTransform instanceof Macro) { invoke((Macro) macroOrTransform, null, null, null, null);