예제 #1
0
 public void setInitialTemplate(String template) {
   try {
     controller.setInitialTemplate(template);
   } catch (Exception e) {
     Xslt20ProcessorImpl.handleException(e, "setInitialTemplate");
   }
 }
예제 #2
0
 public void setInitialMode(String mode) {
   try {
     controller.setInitialMode(mode);
   } catch (Exception e) {
     Xslt20ProcessorImpl.handleException(e, "setInitialMode");
   }
 }
예제 #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");
    }
  }
예제 #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");
    }
  }
예제 #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;
  }
예제 #6
0
 public void setSuccess(JavaScriptObject success) {
   processor.setSuccess(success, this);
 }
예제 #7
0
 // what happens if the imported node is modified, do we use a
 // cached stylesheet?
 public void importStylesheet(JavaScriptObject stylesheet) {
   processor.importStylesheet(stylesheet);
 }
예제 #8
0
 public XSLT20Processor() {
   processor = new Xslt20ProcessorImpl();
   // get an 'inert' controller instance - used only for getting/setting controller properties
   controller = processor.getController();
   SaxonceApi.setProcessorWasJsInitiated();
 }
예제 #9
0
 public XSLT20Processor(JavaScriptObject stylesheet) {
   this(); // call constructor
   if (stylesheet != null) {
     processor.importStylesheet(stylesheet);
   }
 }
예제 #10
0
 // for XSLT 2.0 sourceNode may be null
 public Node transformToFragment(JavaScriptObject sourceNode, Document ownerDocument) {
   return processor.transformToFragment(sourceNode, ownerDocument);
 }
예제 #11
0
 // for XSLT 2.0 sourceNode may be null
 public Document transformToDocument(JavaScriptObject sourceNode) {
   return (Document) processor.transformToDocument(sourceNode);
 }
예제 #12
0
 public void transformToHTMLFragment(JavaScriptObject sourceObject, Document targetDocument) {
   processor.updateHTMLDocument(
       sourceObject, targetDocument, APIcommand.TRANSFORM_TO_HTML_FRAGMENT);
 }
예제 #13
0
 // for XSLT 2.0 sourceNode may be null
 public void updateHTMLDocument(JavaScriptObject sourceObject, Document targetDocument) {
   processor.updateHTMLDocument(sourceObject, targetDocument, APIcommand.UPDATE_HTML);
 }
예제 #14
0
 /** Restore the XSLTProcessor20 instance to its default state */
 public void reset() {
   controller.reset();
   processor.deregisterEventHandlers();
 }
예제 #15
0
 public JavaScriptObject getSuccess() {
   return processor.getSuccess();
 }