com.sun.org.apache.xpath.internal.ExtensionsProvider Java Examples
The following examples show how to use
com.sun.org.apache.xpath.internal.ExtensionsProvider.
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: FuncExtElementAvailable.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { String prefix; String namespace; String methName; String fullName = m_arg0.execute(xctxt).str(); int indexOfNSSep = fullName.indexOf(':'); if (indexOfNSSep < 0) { prefix = ""; namespace = Constants.S_XSLNAMESPACEURL; methName = fullName; } else { prefix = fullName.substring(0, indexOfNSSep); namespace = xctxt.getNamespaceContext().getNamespaceForPrefix(prefix); if (null == namespace) return XBoolean.S_FALSE; methName= fullName.substring(indexOfNSSep + 1); } if (namespace.equals(Constants.S_XSLNAMESPACEURL) || namespace.equals(Constants.S_BUILTIN_EXTENSIONS_URL)) { // J2SE does not support Xalan interpretive /* try { TransformerImpl transformer = (TransformerImpl) xctxt.getOwnerObject(); return transformer.getStylesheet().getAvailableElements().containsKey( new QName(namespace, methName)) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } catch (Exception e) { return XBoolean.S_FALSE; } */ return XBoolean.S_FALSE; } else { //dml ExtensionsProvider extProvider = (ExtensionsProvider)xctxt.getOwnerObject(); return extProvider.elementAvailable(namespace, methName) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } }
Example #2
Source File: FuncExtElementAvailable.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { String prefix; String namespace; String methName; String fullName = m_arg0.execute(xctxt).str(); int indexOfNSSep = fullName.indexOf(':'); if (indexOfNSSep < 0) { prefix = ""; namespace = Constants.S_XSLNAMESPACEURL; methName = fullName; } else { prefix = fullName.substring(0, indexOfNSSep); namespace = xctxt.getNamespaceContext().getNamespaceForPrefix(prefix); if (null == namespace) return XBoolean.S_FALSE; methName= fullName.substring(indexOfNSSep + 1); } if (namespace.equals(Constants.S_XSLNAMESPACEURL) || namespace.equals(Constants.S_BUILTIN_EXTENSIONS_URL)) { // J2SE does not support Xalan interpretive /* try { TransformerImpl transformer = (TransformerImpl) xctxt.getOwnerObject(); return transformer.getStylesheet().getAvailableElements().containsKey( new QName(namespace, methName)) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } catch (Exception e) { return XBoolean.S_FALSE; } */ return XBoolean.S_FALSE; } else { //dml ExtensionsProvider extProvider = (ExtensionsProvider)xctxt.getOwnerObject(); return extProvider.elementAvailable(namespace, methName) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } }
Example #3
Source File: FuncExtElementAvailable.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { String prefix; String namespace; String methName; String fullName = m_arg0.execute(xctxt).str(); int indexOfNSSep = fullName.indexOf(':'); if (indexOfNSSep < 0) { prefix = ""; namespace = Constants.S_XSLNAMESPACEURL; methName = fullName; } else { prefix = fullName.substring(0, indexOfNSSep); namespace = xctxt.getNamespaceContext().getNamespaceForPrefix(prefix); if (null == namespace) return XBoolean.S_FALSE; methName= fullName.substring(indexOfNSSep + 1); } if (namespace.equals(Constants.S_XSLNAMESPACEURL) || namespace.equals(Constants.S_BUILTIN_EXTENSIONS_URL)) { // J2SE does not support Xalan interpretive /* try { TransformerImpl transformer = (TransformerImpl) xctxt.getOwnerObject(); return transformer.getStylesheet().getAvailableElements().containsKey( new QName(namespace, methName)) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } catch (Exception e) { return XBoolean.S_FALSE; } */ return XBoolean.S_FALSE; } else { //dml ExtensionsProvider extProvider = (ExtensionsProvider)xctxt.getOwnerObject(); return extProvider.elementAvailable(namespace, methName) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } }
Example #4
Source File: FuncExtElementAvailable.java From JDKSourceCode1.8 with MIT License | 4 votes |
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { String prefix; String namespace; String methName; String fullName = m_arg0.execute(xctxt).str(); int indexOfNSSep = fullName.indexOf(':'); if (indexOfNSSep < 0) { prefix = ""; namespace = Constants.S_XSLNAMESPACEURL; methName = fullName; } else { prefix = fullName.substring(0, indexOfNSSep); namespace = xctxt.getNamespaceContext().getNamespaceForPrefix(prefix); if (null == namespace) return XBoolean.S_FALSE; methName= fullName.substring(indexOfNSSep + 1); } if (namespace.equals(Constants.S_XSLNAMESPACEURL) || namespace.equals(Constants.S_BUILTIN_EXTENSIONS_URL)) { // J2SE does not support Xalan interpretive /* try { TransformerImpl transformer = (TransformerImpl) xctxt.getOwnerObject(); return transformer.getStylesheet().getAvailableElements().containsKey( new QName(namespace, methName)) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } catch (Exception e) { return XBoolean.S_FALSE; } */ return XBoolean.S_FALSE; } else { //dml ExtensionsProvider extProvider = (ExtensionsProvider)xctxt.getOwnerObject(); return extProvider.elementAvailable(namespace, methName) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } }
Example #5
Source File: FuncExtElementAvailable.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { String prefix; String namespace; String methName; String fullName = m_arg0.execute(xctxt).str(); int indexOfNSSep = fullName.indexOf(':'); if (indexOfNSSep < 0) { prefix = ""; namespace = Constants.S_XSLNAMESPACEURL; methName = fullName; } else { prefix = fullName.substring(0, indexOfNSSep); namespace = xctxt.getNamespaceContext().getNamespaceForPrefix(prefix); if (null == namespace) return XBoolean.S_FALSE; methName= fullName.substring(indexOfNSSep + 1); } if (namespace.equals(Constants.S_XSLNAMESPACEURL) || namespace.equals(Constants.S_BUILTIN_EXTENSIONS_URL)) { // J2SE does not support Xalan interpretive /* try { TransformerImpl transformer = (TransformerImpl) xctxt.getOwnerObject(); return transformer.getStylesheet().getAvailableElements().containsKey( new QName(namespace, methName)) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } catch (Exception e) { return XBoolean.S_FALSE; } */ return XBoolean.S_FALSE; } else { //dml ExtensionsProvider extProvider = (ExtensionsProvider)xctxt.getOwnerObject(); return extProvider.elementAvailable(namespace, methName) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } }
Example #6
Source File: FuncExtElementAvailable.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { String prefix; String namespace; String methName; String fullName = m_arg0.execute(xctxt).str(); int indexOfNSSep = fullName.indexOf(':'); if (indexOfNSSep < 0) { prefix = ""; namespace = Constants.S_XSLNAMESPACEURL; methName = fullName; } else { prefix = fullName.substring(0, indexOfNSSep); namespace = xctxt.getNamespaceContext().getNamespaceForPrefix(prefix); if (null == namespace) return XBoolean.S_FALSE; methName= fullName.substring(indexOfNSSep + 1); } if (namespace.equals(Constants.S_XSLNAMESPACEURL) || namespace.equals(Constants.S_BUILTIN_EXTENSIONS_URL)) { // J2SE does not support Xalan interpretive /* try { TransformerImpl transformer = (TransformerImpl) xctxt.getOwnerObject(); return transformer.getStylesheet().getAvailableElements().containsKey( new QName(namespace, methName)) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } catch (Exception e) { return XBoolean.S_FALSE; } */ return XBoolean.S_FALSE; } else { //dml ExtensionsProvider extProvider = (ExtensionsProvider)xctxt.getOwnerObject(); return extProvider.elementAvailable(namespace, methName) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } }
Example #7
Source File: FuncExtElementAvailable.java From Bytecoder with Apache License 2.0 | 4 votes |
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { String prefix; String namespace; String methName; String fullName = m_arg0.execute(xctxt).str(); int indexOfNSSep = fullName.indexOf(':'); if (indexOfNSSep < 0) { prefix = ""; namespace = Constants.S_XSLNAMESPACEURL; methName = fullName; } else { prefix = fullName.substring(0, indexOfNSSep); namespace = xctxt.getNamespaceContext().getNamespaceForPrefix(prefix); if (null == namespace) return XBoolean.S_FALSE; methName= fullName.substring(indexOfNSSep + 1); } if (namespace.equals(Constants.S_XSLNAMESPACEURL) || namespace.equals(Constants.S_BUILTIN_EXTENSIONS_URL)) { // J2SE does not support Xalan interpretive /* try { TransformerImpl transformer = (TransformerImpl) xctxt.getOwnerObject(); return transformer.getStylesheet().getAvailableElements().containsKey( new QName(namespace, methName)) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } catch (Exception e) { return XBoolean.S_FALSE; } */ return XBoolean.S_FALSE; } else { //dml ExtensionsProvider extProvider = (ExtensionsProvider)xctxt.getOwnerObject(); return extProvider.elementAvailable(namespace, methName) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } }
Example #8
Source File: FuncExtElementAvailable.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { String prefix; String namespace; String methName; String fullName = m_arg0.execute(xctxt).str(); int indexOfNSSep = fullName.indexOf(':'); if (indexOfNSSep < 0) { prefix = ""; namespace = Constants.S_XSLNAMESPACEURL; methName = fullName; } else { prefix = fullName.substring(0, indexOfNSSep); namespace = xctxt.getNamespaceContext().getNamespaceForPrefix(prefix); if (null == namespace) return XBoolean.S_FALSE; methName= fullName.substring(indexOfNSSep + 1); } if (namespace.equals(Constants.S_XSLNAMESPACEURL) || namespace.equals(Constants.S_BUILTIN_EXTENSIONS_URL)) { // J2SE does not support Xalan interpretive /* try { TransformerImpl transformer = (TransformerImpl) xctxt.getOwnerObject(); return transformer.getStylesheet().getAvailableElements().containsKey( new QName(namespace, methName)) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } catch (Exception e) { return XBoolean.S_FALSE; } */ return XBoolean.S_FALSE; } else { //dml ExtensionsProvider extProvider = (ExtensionsProvider)xctxt.getOwnerObject(); return extProvider.elementAvailable(namespace, methName) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } }
Example #9
Source File: FuncExtElementAvailable.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { String prefix; String namespace; String methName; String fullName = m_arg0.execute(xctxt).str(); int indexOfNSSep = fullName.indexOf(':'); if (indexOfNSSep < 0) { prefix = ""; namespace = Constants.S_XSLNAMESPACEURL; methName = fullName; } else { prefix = fullName.substring(0, indexOfNSSep); namespace = xctxt.getNamespaceContext().getNamespaceForPrefix(prefix); if (null == namespace) return XBoolean.S_FALSE; methName= fullName.substring(indexOfNSSep + 1); } if (namespace.equals(Constants.S_XSLNAMESPACEURL) || namespace.equals(Constants.S_BUILTIN_EXTENSIONS_URL)) { // J2SE does not support Xalan interpretive /* try { TransformerImpl transformer = (TransformerImpl) xctxt.getOwnerObject(); return transformer.getStylesheet().getAvailableElements().containsKey( new QName(namespace, methName)) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } catch (Exception e) { return XBoolean.S_FALSE; } */ return XBoolean.S_FALSE; } else { //dml ExtensionsProvider extProvider = (ExtensionsProvider)xctxt.getOwnerObject(); return extProvider.elementAvailable(namespace, methName) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } }
Example #10
Source File: FuncExtElementAvailable.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { String prefix; String namespace; String methName; String fullName = m_arg0.execute(xctxt).str(); int indexOfNSSep = fullName.indexOf(':'); if (indexOfNSSep < 0) { prefix = ""; namespace = Constants.S_XSLNAMESPACEURL; methName = fullName; } else { prefix = fullName.substring(0, indexOfNSSep); namespace = xctxt.getNamespaceContext().getNamespaceForPrefix(prefix); if (null == namespace) return XBoolean.S_FALSE; methName= fullName.substring(indexOfNSSep + 1); } if (namespace.equals(Constants.S_XSLNAMESPACEURL) || namespace.equals(Constants.S_BUILTIN_EXTENSIONS_URL)) { // J2SE does not support Xalan interpretive /* try { TransformerImpl transformer = (TransformerImpl) xctxt.getOwnerObject(); return transformer.getStylesheet().getAvailableElements().containsKey( new QName(namespace, methName)) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } catch (Exception e) { return XBoolean.S_FALSE; } */ return XBoolean.S_FALSE; } else { //dml ExtensionsProvider extProvider = (ExtensionsProvider)xctxt.getOwnerObject(); return extProvider.elementAvailable(namespace, methName) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } }
Example #11
Source File: FuncExtElementAvailable.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { String prefix; String namespace; String methName; String fullName = m_arg0.execute(xctxt).str(); int indexOfNSSep = fullName.indexOf(':'); if (indexOfNSSep < 0) { prefix = ""; namespace = Constants.S_XSLNAMESPACEURL; methName = fullName; } else { prefix = fullName.substring(0, indexOfNSSep); namespace = xctxt.getNamespaceContext().getNamespaceForPrefix(prefix); if (null == namespace) return XBoolean.S_FALSE; methName= fullName.substring(indexOfNSSep + 1); } if (namespace.equals(Constants.S_XSLNAMESPACEURL) || namespace.equals(Constants.S_BUILTIN_EXTENSIONS_URL)) { // J2SE does not support Xalan interpretive /* try { TransformerImpl transformer = (TransformerImpl) xctxt.getOwnerObject(); return transformer.getStylesheet().getAvailableElements().containsKey( new QName(namespace, methName)) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } catch (Exception e) { return XBoolean.S_FALSE; } */ return XBoolean.S_FALSE; } else { //dml ExtensionsProvider extProvider = (ExtensionsProvider)xctxt.getOwnerObject(); return extProvider.elementAvailable(namespace, methName) ? XBoolean.S_TRUE : XBoolean.S_FALSE; } }