Java Code Examples for com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl#getStylesheetDOM()
The following examples show how to use
com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl#getStylesheetDOM() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LoadDocument.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
/** * Interprets the arguments passed from the document() function (see * com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java) and returns an * iterator containing the requested nodes. Builds a union-iterator if * several documents are requested. * 1 arguments arg. document(Obj) call */ public static DTMAxisIterator documentF(Object arg, String xslURI, AbstractTranslet translet, DOM dom) throws TransletException { try { if (arg instanceof String) { if (xslURI == null ) xslURI = ""; String baseURI = xslURI; if (!SystemIDResolver.isAbsoluteURI(xslURI)) baseURI = SystemIDResolver.getAbsoluteURIFromRelative(xslURI); String href = (String)arg; if (href.length() == 0) { href = ""; // %OPT% Optimization to cache the stylesheet DOM. // The stylesheet DOM is built once and cached // in the Templates object. TemplatesImpl templates = (TemplatesImpl)translet.getTemplates(); DOM sdom = null; if (templates != null) { sdom = templates.getStylesheetDOM(); } // If the cached dom exists, we need to migrate it // to the new DTMManager and create a DTMAxisIterator // for the document. if (sdom != null) { return document(sdom, translet, dom); } else { return document(href, baseURI, translet, dom, true); } } else { return document(href, baseURI, translet, dom); } } else if (arg instanceof DTMAxisIterator) { return document((DTMAxisIterator)arg, null, translet, dom); } else { final String err = "document("+arg.toString()+")"; throw new IllegalArgumentException(err); } } catch (Exception e) { throw new TransletException(e); } }
Example 2
Source File: LoadDocument.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * Interprets the arguments passed from the document() function (see * com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java) and returns an * iterator containing the requested nodes. Builds a union-iterator if * several documents are requested. * 1 arguments arg. document(Obj) call */ public static DTMAxisIterator documentF(Object arg, String xslURI, AbstractTranslet translet, DOM dom) throws TransletException { try { if (arg instanceof String) { if (xslURI == null ) xslURI = ""; String baseURI = xslURI; if (!SystemIDResolver.isAbsoluteURI(xslURI)) baseURI = SystemIDResolver.getAbsoluteURIFromRelative(xslURI); String href = (String)arg; if (href.length() == 0) { href = ""; // %OPT% Optimization to cache the stylesheet DOM. // The stylesheet DOM is built once and cached // in the Templates object. TemplatesImpl templates = (TemplatesImpl)translet.getTemplates(); DOM sdom = null; if (templates != null) { sdom = templates.getStylesheetDOM(); } // If the cached dom exists, we need to migrate it // to the new DTMManager and create a DTMAxisIterator // for the document. if (sdom != null) { return document(sdom, translet, dom); } else { return document(href, baseURI, translet, dom, true); } } else { return document(href, baseURI, translet, dom); } } else if (arg instanceof DTMAxisIterator) { return document((DTMAxisIterator)arg, null, translet, dom); } else { final String err = "document("+arg.toString()+")"; throw new IllegalArgumentException(err); } } catch (Exception e) { throw new TransletException(e); } }
Example 3
Source File: LoadDocument.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * Interprets the arguments passed from the document() function (see * com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java) and returns an * iterator containing the requested nodes. Builds a union-iterator if * several documents are requested. * 1 arguments arg. document(Obj) call */ public static DTMAxisIterator documentF(Object arg, String xslURI, AbstractTranslet translet, DOM dom) throws TransletException { try { if (arg instanceof String) { if (xslURI == null ) xslURI = ""; String baseURI = xslURI; if (!SystemIDResolver.isAbsoluteURI(xslURI)) baseURI = SystemIDResolver.getAbsoluteURIFromRelative(xslURI); String href = (String)arg; if (href.length() == 0) { href = ""; // %OPT% Optimization to cache the stylesheet DOM. // The stylesheet DOM is built once and cached // in the Templates object. TemplatesImpl templates = (TemplatesImpl)translet.getTemplates(); DOM sdom = null; if (templates != null) { sdom = templates.getStylesheetDOM(); } // If the cached dom exists, we need to migrate it // to the new DTMManager and create a DTMAxisIterator // for the document. if (sdom != null) { return document(sdom, translet, dom); } else { return document(href, baseURI, translet, dom, true); } } else { return document(href, baseURI, translet, dom); } } else if (arg instanceof DTMAxisIterator) { return document((DTMAxisIterator)arg, null, translet, dom); } else { final String err = "document("+arg.toString()+")"; throw new IllegalArgumentException(err); } } catch (Exception e) { throw new TransletException(e); } }
Example 4
Source File: LoadDocument.java From JDKSourceCode1.8 with MIT License | 4 votes |
/** * Interprets the arguments passed from the document() function (see * com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java) and returns an * iterator containing the requested nodes. Builds a union-iterator if * several documents are requested. * 1 arguments arg. document(Obj) call */ public static DTMAxisIterator documentF(Object arg, String xslURI, AbstractTranslet translet, DOM dom) throws TransletException { try { if (arg instanceof String) { if (xslURI == null ) xslURI = ""; String baseURI = xslURI; if (!SystemIDResolver.isAbsoluteURI(xslURI)) baseURI = SystemIDResolver.getAbsoluteURIFromRelative(xslURI); String href = (String)arg; if (href.length() == 0) { href = ""; // %OPT% Optimization to cache the stylesheet DOM. // The stylesheet DOM is built once and cached // in the Templates object. TemplatesImpl templates = (TemplatesImpl)translet.getTemplates(); DOM sdom = null; if (templates != null) { sdom = templates.getStylesheetDOM(); } // If the cached dom exists, we need to migrate it // to the new DTMManager and create a DTMAxisIterator // for the document. if (sdom != null) { return document(sdom, translet, dom); } else { return document(href, baseURI, translet, dom, true); } } else { return document(href, baseURI, translet, dom); } } else if (arg instanceof DTMAxisIterator) { return document((DTMAxisIterator)arg, null, translet, dom); } else { final String err = "document("+arg.toString()+")"; throw new IllegalArgumentException(err); } } catch (Exception e) { throw new TransletException(e); } }
Example 5
Source File: LoadDocument.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * Interprets the arguments passed from the document() function (see * com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java) and returns an * iterator containing the requested nodes. Builds a union-iterator if * several documents are requested. * 1 arguments arg. document(Obj) call */ public static DTMAxisIterator documentF(Object arg, String xslURI, AbstractTranslet translet, DOM dom) throws TransletException { try { if (arg instanceof String) { if (xslURI == null ) xslURI = ""; String baseURI = xslURI; if (!SystemIDResolver.isAbsoluteURI(xslURI)) baseURI = SystemIDResolver.getAbsoluteURIFromRelative(xslURI); String href = (String)arg; if (href.length() == 0) { href = ""; // %OPT% Optimization to cache the stylesheet DOM. // The stylesheet DOM is built once and cached // in the Templates object. TemplatesImpl templates = (TemplatesImpl)translet.getTemplates(); DOM sdom = null; if (templates != null) { sdom = templates.getStylesheetDOM(); } // If the cached dom exists, we need to migrate it // to the new DTMManager and create a DTMAxisIterator // for the document. if (sdom != null) { return document(sdom, translet, dom); } else { return document(href, baseURI, translet, dom, true); } } else { return document(href, baseURI, translet, dom); } } else if (arg instanceof DTMAxisIterator) { return document((DTMAxisIterator)arg, null, translet, dom); } else { final String err = "document("+arg.toString()+")"; throw new IllegalArgumentException(err); } } catch (Exception e) { throw new TransletException(e); } }
Example 6
Source File: LoadDocument.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * Interprets the arguments passed from the document() function (see * com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java) and returns an * iterator containing the requested nodes. Builds a union-iterator if * several documents are requested. * 1 arguments arg. document(Obj) call */ public static DTMAxisIterator documentF(Object arg, String xslURI, AbstractTranslet translet, DOM dom) throws TransletException { try { if (arg instanceof String) { if (xslURI == null ) xslURI = ""; String baseURI = xslURI; if (!SystemIDResolver.isAbsoluteURI(xslURI)) baseURI = SystemIDResolver.getAbsoluteURIFromRelative(xslURI); String href = (String)arg; if (href.length() == 0) { href = ""; // %OPT% Optimization to cache the stylesheet DOM. // The stylesheet DOM is built once and cached // in the Templates object. TemplatesImpl templates = (TemplatesImpl)translet.getTemplates(); DOM sdom = null; if (templates != null) { sdom = templates.getStylesheetDOM(); } // If the cached dom exists, we need to migrate it // to the new DTMManager and create a DTMAxisIterator // for the document. if (sdom != null) { return document(sdom, translet, dom); } else { return document(href, baseURI, translet, dom, true); } } else { return document(href, baseURI, translet, dom); } } else if (arg instanceof DTMAxisIterator) { return document((DTMAxisIterator)arg, null, translet, dom); } else { final String err = "document("+arg.toString()+")"; throw new IllegalArgumentException(err); } } catch (Exception e) { throw new TransletException(e); } }
Example 7
Source File: LoadDocument.java From Bytecoder with Apache License 2.0 | 4 votes |
/** * Interprets the arguments passed from the document() function (see * com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java) and returns an * iterator containing the requested nodes. Builds a union-iterator if * several documents are requested. * 1 arguments arg. document(Obj) call */ public static DTMAxisIterator documentF(Object arg, String xslURI, AbstractTranslet translet, DOM dom) throws TransletException { try { if (arg instanceof String) { if (xslURI == null ) xslURI = ""; String baseURI = xslURI; if (!SystemIDResolver.isAbsoluteURI(xslURI)) baseURI = SystemIDResolver.getAbsoluteURIFromRelative(xslURI); String href = (String)arg; if (href.length() == 0) { href = ""; // %OPT% Optimization to cache the stylesheet DOM. // The stylesheet DOM is built once and cached // in the Templates object. TemplatesImpl templates = (TemplatesImpl)translet.getTemplates(); DOM sdom = null; if (templates != null) { sdom = templates.getStylesheetDOM(); } // If the cached dom exists, we need to migrate it // to the new DTMManager and create a DTMAxisIterator // for the document. if (sdom != null) { return document(sdom, translet, dom); } else { return document(href, baseURI, translet, dom, true); } } else { return document(href, baseURI, translet, dom); } } else if (arg instanceof DTMAxisIterator) { return document((DTMAxisIterator)arg, null, translet, dom); } else { final String err = "document("+arg.toString()+")"; throw new IllegalArgumentException(err); } } catch (Exception e) { throw new TransletException(e); } }
Example 8
Source File: LoadDocument.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * Interprets the arguments passed from the document() function (see * com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java) and returns an * iterator containing the requested nodes. Builds a union-iterator if * several documents are requested. * 1 arguments arg. document(Obj) call */ public static DTMAxisIterator documentF(Object arg, String xslURI, AbstractTranslet translet, DOM dom) throws TransletException { try { if (arg instanceof String) { if (xslURI == null ) xslURI = ""; String baseURI = xslURI; if (!SystemIDResolver.isAbsoluteURI(xslURI)) baseURI = SystemIDResolver.getAbsoluteURIFromRelative(xslURI); String href = (String)arg; if (href.length() == 0) { href = ""; // %OPT% Optimization to cache the stylesheet DOM. // The stylesheet DOM is built once and cached // in the Templates object. TemplatesImpl templates = (TemplatesImpl)translet.getTemplates(); DOM sdom = null; if (templates != null) { sdom = templates.getStylesheetDOM(); } // If the cached dom exists, we need to migrate it // to the new DTMManager and create a DTMAxisIterator // for the document. if (sdom != null) { return document(sdom, translet, dom); } else { return document(href, baseURI, translet, dom, true); } } else { return document(href, baseURI, translet, dom); } } else if (arg instanceof DTMAxisIterator) { return document((DTMAxisIterator)arg, null, translet, dom); } else { final String err = "document("+arg.toString()+")"; throw new IllegalArgumentException(err); } } catch (Exception e) { throw new TransletException(e); } }
Example 9
Source File: LoadDocument.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * Interprets the arguments passed from the document() function (see * com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java) and returns an * iterator containing the requested nodes. Builds a union-iterator if * several documents are requested. * 1 arguments arg. document(Obj) call */ public static DTMAxisIterator documentF(Object arg, String xslURI, AbstractTranslet translet, DOM dom) throws TransletException { try { if (arg instanceof String) { if (xslURI == null ) xslURI = ""; String baseURI = xslURI; if (!SystemIDResolver.isAbsoluteURI(xslURI)) baseURI = SystemIDResolver.getAbsoluteURIFromRelative(xslURI); String href = (String)arg; if (href.length() == 0) { href = ""; // %OPT% Optimization to cache the stylesheet DOM. // The stylesheet DOM is built once and cached // in the Templates object. TemplatesImpl templates = (TemplatesImpl)translet.getTemplates(); DOM sdom = null; if (templates != null) { sdom = templates.getStylesheetDOM(); } // If the cached dom exists, we need to migrate it // to the new DTMManager and create a DTMAxisIterator // for the document. if (sdom != null) { return document(sdom, translet, dom); } else { return document(href, baseURI, translet, dom, true); } } else { return document(href, baseURI, translet, dom); } } else if (arg instanceof DTMAxisIterator) { return document((DTMAxisIterator)arg, null, translet, dom); } else { final String err = "document("+arg.toString()+")"; throw new IllegalArgumentException(err); } } catch (Exception e) { throw new TransletException(e); } }
Example 10
Source File: LoadDocument.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * Interprets the arguments passed from the document() function (see * com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java) and returns an * iterator containing the requested nodes. Builds a union-iterator if * several documents are requested. * 1 arguments arg. document(Obj) call */ public static DTMAxisIterator documentF(Object arg, String xslURI, AbstractTranslet translet, DOM dom) throws TransletException { try { if (arg instanceof String) { if (xslURI == null ) xslURI = ""; String baseURI = xslURI; if (!SystemIDResolver.isAbsoluteURI(xslURI)) baseURI = SystemIDResolver.getAbsoluteURIFromRelative(xslURI); String href = (String)arg; if (href.length() == 0) { href = ""; // %OPT% Optimization to cache the stylesheet DOM. // The stylesheet DOM is built once and cached // in the Templates object. TemplatesImpl templates = (TemplatesImpl)translet.getTemplates(); DOM sdom = null; if (templates != null) { sdom = templates.getStylesheetDOM(); } // If the cached dom exists, we need to migrate it // to the new DTMManager and create a DTMAxisIterator // for the document. if (sdom != null) { return document(sdom, translet, dom); } else { return document(href, baseURI, translet, dom, true); } } else { return document(href, baseURI, translet, dom); } } else if (arg instanceof DTMAxisIterator) { return document((DTMAxisIterator)arg, null, translet, dom); } else { final String err = "document("+arg.toString()+")"; throw new IllegalArgumentException(err); } } catch (Exception e) { throw new TransletException(e); } }
Example 11
Source File: LoadDocument.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * Interprets the arguments passed from the document() function (see * com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java) and returns an * iterator containing the requested nodes. Builds a union-iterator if * several documents are requested. * 1 arguments arg. document(Obj) call */ public static DTMAxisIterator documentF(Object arg, String xslURI, AbstractTranslet translet, DOM dom) throws TransletException { try { if (arg instanceof String) { if (xslURI == null ) xslURI = ""; String baseURI = xslURI; if (!SystemIDResolver.isAbsoluteURI(xslURI)) baseURI = SystemIDResolver.getAbsoluteURIFromRelative(xslURI); String href = (String)arg; if (href.length() == 0) { href = ""; // %OPT% Optimization to cache the stylesheet DOM. // The stylesheet DOM is built once and cached // in the Templates object. TemplatesImpl templates = (TemplatesImpl)translet.getTemplates(); DOM sdom = null; if (templates != null) { sdom = templates.getStylesheetDOM(); } // If the cached dom exists, we need to migrate it // to the new DTMManager and create a DTMAxisIterator // for the document. if (sdom != null) { return document(sdom, translet, dom); } else { return document(href, baseURI, translet, dom, true); } } else { return document(href, baseURI, translet, dom); } } else if (arg instanceof DTMAxisIterator) { return document((DTMAxisIterator)arg, null, translet, dom); } else { final String err = "document("+arg.toString()+")"; throw new IllegalArgumentException(err); } } catch (Exception e) { throw new TransletException(e); } }