Beispiel #1
0
 public void setInitialTemplate(String template) {
   try {
     controller.setInitialTemplate(template);
   } catch (Exception e) {
     Xslt20ProcessorImpl.handleException(e, "setInitialTemplate");
   }
 }
Beispiel #2
0
 public void setInitialMode(String mode) {
   try {
     controller.setInitialMode(mode);
   } catch (Exception e) {
     Xslt20ProcessorImpl.handleException(e, "setInitialMode");
   }
 }
Beispiel #3
0
  /**
   * Deletes a parameter value set using the setParameter method
   *
   * @param namespaceURI the parameter namespace
   * @param localName the local name of the parameter
   */
  public void removeParameter(String namespaceURI, String localName) {
    String ns = (namespaceURI == null) ? "" : namespaceURI;
    try {

      StructuredQName qn = new StructuredQName("", ns, localName);
      controller.removeParameter(qn);
    } catch (Exception e) {
      Xslt20ProcessorImpl.handleException(e, "getParameter");
    }
  }
Beispiel #4
0
  // extension required to set any sequence of items (xdmValue) as a parameter as per XSLT2.0 spec
  // but emphasis initially on string, boolean and integer
  public void setParameter(String namespaceURI, String localName, Object value) {

    String ns = (namespaceURI == null) ? "" : namespaceURI;

    try {
      StructuredQName qn = new StructuredQName("", ns, localName);
      controller.setParameter(qn, getValue(value));
    } catch (Exception e) {
      Xslt20ProcessorImpl.handleException(e, "setParameter");
    }
  }
Beispiel #5
0
  /**
   * Returns the value of the parameter as a String.
   *
   * @param namespaceURI the parameter namespace
   * @param localName the local name of the parameter
   * @return the string value of the parameter
   */
  public Object getParameter(String namespaceURI, String localName) {
    String ns = (namespaceURI == null) ? "" : namespaceURI;
    try {

      StructuredQName qn = new StructuredQName("", ns, localName);
      ValueRepresentation vr = controller.getParameter(qn);
      return IXSLFunction.convertToJavaScript(vr);
    } catch (Exception e) {
      Xslt20ProcessorImpl.handleException(e, "getParameter");
    }
    return null;
  }