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