Java Code Examples for com.sun.org.apache.xml.internal.dtm.DTM#getNodeName()
The following examples show how to use
com.sun.org.apache.xml.internal.dtm.DTM#getNodeName() .
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: PredicatedNodeTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Diagnostics. * * @param n Node to give diagnostic information about, or null. * * @return Informative string about the argument. */ protected String nodeToString(int n) { if(DTM.NULL != n) { DTM dtm = m_lpi.getXPathContext().getDTM(n); return dtm.getNodeName(n) + "{" + (n+1) + "}"; } else { return "null"; } }
Example 2
Source File: FuncNamespace.java From openjdk-8-source with GNU General Public License v2.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 { int context = getArg0AsNode(xctxt); String s; if(context != DTM.NULL) { DTM dtm = xctxt.getDTM(context); int t = dtm.getNodeType(context); if(t == DTM.ELEMENT_NODE) { s = dtm.getNamespaceURI(context); } else if(t == DTM.ATTRIBUTE_NODE) { // This function always returns an empty string for namespace nodes. // We check for those here. Fix inspired by Davanum Srinivas. s = dtm.getNodeName(context); if(s.startsWith("xmlns:") || s.equals("xmlns")) return XString.EMPTYSTRING; s = dtm.getNamespaceURI(context); } else return XString.EMPTYSTRING; } else return XString.EMPTYSTRING; return ((null == s) ? XString.EMPTYSTRING : new XString(s)); }
Example 3
Source File: PredicatedNodeTest.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Diagnostics. * * @param n Node to give diagnostic information about, or null. * * @return Informative string about the argument. */ protected String nodeToString(int n) { if(DTM.NULL != n) { DTM dtm = m_lpi.getXPathContext().getDTM(n); return dtm.getNodeName(n) + "{" + (n+1) + "}"; } else { return "null"; } }
Example 4
Source File: FuncNamespace.java From hottub with GNU General Public License v2.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 { int context = getArg0AsNode(xctxt); String s; if(context != DTM.NULL) { DTM dtm = xctxt.getDTM(context); int t = dtm.getNodeType(context); if(t == DTM.ELEMENT_NODE) { s = dtm.getNamespaceURI(context); } else if(t == DTM.ATTRIBUTE_NODE) { // This function always returns an empty string for namespace nodes. // We check for those here. Fix inspired by Davanum Srinivas. s = dtm.getNodeName(context); if(s.startsWith("xmlns:") || s.equals("xmlns")) return XString.EMPTYSTRING; s = dtm.getNamespaceURI(context); } else return XString.EMPTYSTRING; } else return XString.EMPTYSTRING; return ((null == s) ? XString.EMPTYSTRING : new XString(s)); }
Example 5
Source File: PredicatedNodeTest.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Diagnostics. * * @param n Node to give diagnostic information about, or null. * * @return Informative string about the argument. */ protected String nodeToString(int n) { if(DTM.NULL != n) { DTM dtm = m_lpi.getXPathContext().getDTM(n); return dtm.getNodeName(n) + "{" + (n+1) + "}"; } else { return "null"; } }
Example 6
Source File: FuncNamespace.java From openjdk-jdk9 with GNU General Public License v2.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 { int context = getArg0AsNode(xctxt); String s; if(context != DTM.NULL) { DTM dtm = xctxt.getDTM(context); int t = dtm.getNodeType(context); if(t == DTM.ELEMENT_NODE) { s = dtm.getNamespaceURI(context); } else if(t == DTM.ATTRIBUTE_NODE) { // This function always returns an empty string for namespace nodes. // We check for those here. Fix inspired by Davanum Srinivas. s = dtm.getNodeName(context); if(s.startsWith("xmlns:") || s.equals("xmlns")) return XString.EMPTYSTRING; s = dtm.getNamespaceURI(context); } else return XString.EMPTYSTRING; } else return XString.EMPTYSTRING; return ((null == s) ? XString.EMPTYSTRING : new XString(s)); }
Example 7
Source File: FuncNamespace.java From openjdk-8 with GNU General Public License v2.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 { int context = getArg0AsNode(xctxt); String s; if(context != DTM.NULL) { DTM dtm = xctxt.getDTM(context); int t = dtm.getNodeType(context); if(t == DTM.ELEMENT_NODE) { s = dtm.getNamespaceURI(context); } else if(t == DTM.ATTRIBUTE_NODE) { // This function always returns an empty string for namespace nodes. // We check for those here. Fix inspired by Davanum Srinivas. s = dtm.getNodeName(context); if(s.startsWith("xmlns:") || s.equals("xmlns")) return XString.EMPTYSTRING; s = dtm.getNamespaceURI(context); } else return XString.EMPTYSTRING; } else return XString.EMPTYSTRING; return ((null == s) ? XString.EMPTYSTRING : new XString(s)); }
Example 8
Source File: FuncNamespace.java From Bytecoder 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 { int context = getArg0AsNode(xctxt); String s; if(context != DTM.NULL) { DTM dtm = xctxt.getDTM(context); int t = dtm.getNodeType(context); if(t == DTM.ELEMENT_NODE) { s = dtm.getNamespaceURI(context); } else if(t == DTM.ATTRIBUTE_NODE) { // This function always returns an empty string for namespace nodes. // We check for those here. Fix inspired by Davanum Srinivas. s = dtm.getNodeName(context); if(s.startsWith("xmlns:") || s.equals("xmlns")) return XString.EMPTYSTRING; s = dtm.getNamespaceURI(context); } else return XString.EMPTYSTRING; } else return XString.EMPTYSTRING; return ((null == s) ? XString.EMPTYSTRING : new XString(s)); }
Example 9
Source File: PredicatedNodeTest.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Diagnostics. * * @param n Node to give diagnostic information about, or null. * * @return Informative string about the argument. */ protected String nodeToString(int n) { if(DTM.NULL != n) { DTM dtm = m_lpi.getXPathContext().getDTM(n); return dtm.getNodeName(n) + "{" + (n+1) + "}"; } else { return "null"; } }
Example 10
Source File: FuncNamespace.java From openjdk-jdk8u-backup with GNU General Public License v2.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 { int context = getArg0AsNode(xctxt); String s; if(context != DTM.NULL) { DTM dtm = xctxt.getDTM(context); int t = dtm.getNodeType(context); if(t == DTM.ELEMENT_NODE) { s = dtm.getNamespaceURI(context); } else if(t == DTM.ATTRIBUTE_NODE) { // This function always returns an empty string for namespace nodes. // We check for those here. Fix inspired by Davanum Srinivas. s = dtm.getNodeName(context); if(s.startsWith("xmlns:") || s.equals("xmlns")) return XString.EMPTYSTRING; s = dtm.getNamespaceURI(context); } else return XString.EMPTYSTRING; } else return XString.EMPTYSTRING; return ((null == s) ? XString.EMPTYSTRING : new XString(s)); }
Example 11
Source File: PredicatedNodeTest.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * Diagnostics. * * @param n Node to give diagnostic information about, or null. * * @return Informative string about the argument. */ protected String nodeToString(int n) { if(DTM.NULL != n) { DTM dtm = m_lpi.getXPathContext().getDTM(n); return dtm.getNodeName(n) + "{" + (n+1) + "}"; } else { return "null"; } }
Example 12
Source File: FuncNamespace.java From openjdk-jdk8u with GNU General Public License v2.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 { int context = getArg0AsNode(xctxt); String s; if(context != DTM.NULL) { DTM dtm = xctxt.getDTM(context); int t = dtm.getNodeType(context); if(t == DTM.ELEMENT_NODE) { s = dtm.getNamespaceURI(context); } else if(t == DTM.ATTRIBUTE_NODE) { // This function always returns an empty string for namespace nodes. // We check for those here. Fix inspired by Davanum Srinivas. s = dtm.getNodeName(context); if(s.startsWith("xmlns:") || s.equals("xmlns")) return XString.EMPTYSTRING; s = dtm.getNamespaceURI(context); } else return XString.EMPTYSTRING; } else return XString.EMPTYSTRING; return ((null == s) ? XString.EMPTYSTRING : new XString(s)); }
Example 13
Source File: PredicatedNodeTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Diagnostics. * * @param n Node to give diagnostic information about, or null. * * @return Informative string about the argument. */ protected String nodeToString(int n) { if(DTM.NULL != n) { DTM dtm = m_lpi.getXPathContext().getDTM(n); return dtm.getNodeName(n) + "{" + (n+1) + "}"; } else { return "null"; } }
Example 14
Source File: FuncNamespace.java From JDKSourceCode1.8 with MIT License | 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 { int context = getArg0AsNode(xctxt); String s; if(context != DTM.NULL) { DTM dtm = xctxt.getDTM(context); int t = dtm.getNodeType(context); if(t == DTM.ELEMENT_NODE) { s = dtm.getNamespaceURI(context); } else if(t == DTM.ATTRIBUTE_NODE) { // This function always returns an empty string for namespace nodes. // We check for those here. Fix inspired by Davanum Srinivas. s = dtm.getNodeName(context); if(s.startsWith("xmlns:") || s.equals("xmlns")) return XString.EMPTYSTRING; s = dtm.getNamespaceURI(context); } else return XString.EMPTYSTRING; } else return XString.EMPTYSTRING; return ((null == s) ? XString.EMPTYSTRING : new XString(s)); }
Example 15
Source File: PredicatedNodeTest.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * Diagnostics. * * @param n Node to give diagnostic information about, or null. * * @return Informative string about the argument. */ protected String nodeToString(int n) { if(DTM.NULL != n) { DTM dtm = m_lpi.getXPathContext().getDTM(n); return dtm.getNodeName(n) + "{" + (n+1) + "}"; } else { return "null"; } }
Example 16
Source File: PredicatedNodeTest.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Diagnostics. * * @param n Node to give diagnostic information about, or null. * * @return Informative string about the argument. */ protected String nodeToString(int n) { if(DTM.NULL != n) { DTM dtm = m_lpi.getXPathContext().getDTM(n); return dtm.getNodeName(n) + "{" + (n+1) + "}"; } else { return "null"; } }
Example 17
Source File: PredicatedNodeTest.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Diagnostics. * * @param n Node to give diagnostic information about, or null. * * @return Informative string about the argument. */ protected String nodeToString(int n) { if(DTM.NULL != n) { DTM dtm = m_lpi.getXPathContext().getDTM(n); return dtm.getNodeName(n) + "{" + (n+1) + "}"; } else { return "null"; } }
Example 18
Source File: FuncNamespace.java From TencentKona-8 with GNU General Public License v2.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 { int context = getArg0AsNode(xctxt); String s; if(context != DTM.NULL) { DTM dtm = xctxt.getDTM(context); int t = dtm.getNodeType(context); if(t == DTM.ELEMENT_NODE) { s = dtm.getNamespaceURI(context); } else if(t == DTM.ATTRIBUTE_NODE) { // This function always returns an empty string for namespace nodes. // We check for those here. Fix inspired by Davanum Srinivas. s = dtm.getNodeName(context); if(s.startsWith("xmlns:") || s.equals("xmlns")) return XString.EMPTYSTRING; s = dtm.getNamespaceURI(context); } else return XString.EMPTYSTRING; } else return XString.EMPTYSTRING; return ((null == s) ? XString.EMPTYSTRING : new XString(s)); }
Example 19
Source File: PredicatedNodeTest.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Diagnostics. * * @param n Node to give diagnostic information about, or null. * * @return Informative string about the argument. */ protected String nodeToString(int n) { if(DTM.NULL != n) { DTM dtm = m_lpi.getXPathContext().getDTM(n); return dtm.getNodeName(n) + "{" + (n+1) + "}"; } else { return "null"; } }
Example 20
Source File: FuncNamespace.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 { int context = getArg0AsNode(xctxt); String s; if(context != DTM.NULL) { DTM dtm = xctxt.getDTM(context); int t = dtm.getNodeType(context); if(t == DTM.ELEMENT_NODE) { s = dtm.getNamespaceURI(context); } else if(t == DTM.ATTRIBUTE_NODE) { // This function always returns an empty string for namespace nodes. // We check for those here. Fix inspired by Davanum Srinivas. s = dtm.getNodeName(context); if(s.startsWith("xmlns:") || s.equals("xmlns")) return XString.EMPTYSTRING; s = dtm.getNamespaceURI(context); } else return XString.EMPTYSTRING; } else return XString.EMPTYSTRING; return ((null == s) ? XString.EMPTYSTRING : new XString(s)); }