com.sun.org.apache.xml.internal.utils.QName Java Examples
The following examples show how to use
com.sun.org.apache.xml.internal.utils.QName.
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: Compiler.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Compile a variable reference. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link com.sun.org.apache.xpath.internal.operations.Variable} instance. * * @throws TransformerException if a error occurs creating the Expression. */ protected Expression variable(int opPos) throws TransformerException { Variable var = new Variable(); opPos = getFirstChildPos(opPos); int nsPos = getOp(opPos); java.lang.String namespace = (OpCodes.EMPTY == nsPos) ? null : (java.lang.String) getTokenQueue().elementAt(nsPos); java.lang.String localname = (java.lang.String) getTokenQueue().elementAt(getOp(opPos+1)); QName qname = new QName(namespace, localname); var.setQName(qname); return var; }
Example #2
Source File: Compiler.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Compile a variable reference. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link com.sun.org.apache.xpath.internal.operations.Variable} instance. * * @throws TransformerException if a error occurs creating the Expression. */ protected Expression variable(int opPos) throws TransformerException { Variable var = new Variable(); opPos = getFirstChildPos(opPos); int nsPos = getOp(opPos); java.lang.String namespace = (OpCodes.EMPTY == nsPos) ? null : (java.lang.String) getTokenQueue().elementAt(nsPos); java.lang.String localname = (java.lang.String) getTokenQueue().elementAt(getOp(opPos+1)); QName qname = new QName(namespace, localname); var.setQName(qname); return var; }
Example #3
Source File: Compiler.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Compile a variable reference. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link com.sun.org.apache.xpath.internal.operations.Variable} instance. * * @throws TransformerException if a error occurs creating the Expression. */ protected Expression variable(int opPos) throws TransformerException { Variable var = new Variable(); opPos = getFirstChildPos(opPos); int nsPos = getOp(opPos); java.lang.String namespace = (OpCodes.EMPTY == nsPos) ? null : (java.lang.String) getTokenQueue().elementAt(nsPos); java.lang.String localname = (java.lang.String) getTokenQueue().elementAt(getOp(opPos+1)); QName qname = new QName(namespace, localname); var.setQName(qname); return var; }
Example #4
Source File: Compiler.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Compile a variable reference. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link com.sun.org.apache.xpath.internal.operations.Variable} instance. * * @throws TransformerException if a error occurs creating the Expression. */ protected Expression variable(int opPos) throws TransformerException { Variable var = new Variable(); opPos = getFirstChildPos(opPos); int nsPos = getOp(opPos); java.lang.String namespace = (OpCodes.EMPTY == nsPos) ? null : (java.lang.String) getTokenQueue().elementAt(nsPos); java.lang.String localname = (java.lang.String) getTokenQueue().elementAt(getOp(opPos+1)); QName qname = new QName(namespace, localname); var.setQName(qname); return var; }
Example #5
Source File: StepPattern.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * This function is used to fixup variables from QNames to stack frame * indexes at stylesheet build time. * @param vars List of QNames that correspond to variables. This list * should be searched backwards for the first qualified name that * corresponds to the variable reference qname. The position of the * QName in the vector from the start of the vector will be its position * in the stack frame (but variables above the globalsTop value will need * to be offset to the current stack frame). * @param globalsSize The number of variables in the global variable area. */ public void fixupVariables(List<QName> vars, int globalsSize) { super.fixupVariables(vars, globalsSize); if (null != m_predicates) { for (int i = 0; i < m_predicates.length; i++) { m_predicates[i].fixupVariables(vars, globalsSize); } } if (null != m_relativePathPattern) { m_relativePathPattern.fixupVariables(vars, globalsSize); } }
Example #6
Source File: Compiler.java From JDKSourceCode1.8 with MIT License | 6 votes |
/** * Compile a variable reference. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link com.sun.org.apache.xpath.internal.operations.Variable} instance. * * @throws TransformerException if a error occurs creating the Expression. */ protected Expression variable(int opPos) throws TransformerException { Variable var = new Variable(); opPos = getFirstChildPos(opPos); int nsPos = getOp(opPos); java.lang.String namespace = (OpCodes.EMPTY == nsPos) ? null : (java.lang.String) getTokenQueue().elementAt(nsPos); java.lang.String localname = (java.lang.String) getTokenQueue().elementAt(getOp(opPos+1)); QName qname = new QName(namespace, localname); var.setQName(qname); return var; }
Example #7
Source File: Compiler.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
/** * Compile a variable reference. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link com.sun.org.apache.xpath.internal.operations.Variable} instance. * * @throws TransformerException if a error occurs creating the Expression. */ protected Expression variable(int opPos) throws TransformerException { Variable var = new Variable(); opPos = getFirstChildPos(opPos); int nsPos = getOp(opPos); java.lang.String namespace = (OpCodes.EMPTY == nsPos) ? null : (java.lang.String) getTokenQueue().elementAt(nsPos); java.lang.String localname = (java.lang.String) getTokenQueue().elementAt(getOp(opPos+1)); QName qname = new QName(namespace, localname); var.setQName(qname); return var; }
Example #8
Source File: Compiler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Compile a variable reference. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link com.sun.org.apache.xpath.internal.operations.Variable} instance. * * @throws TransformerException if a error occurs creating the Expression. */ protected Expression variable(int opPos) throws TransformerException { Variable var = new Variable(); opPos = getFirstChildPos(opPos); int nsPos = getOp(opPos); java.lang.String namespace = (OpCodes.EMPTY == nsPos) ? null : (java.lang.String) getTokenQueue().elementAt(nsPos); java.lang.String localname = (java.lang.String) getTokenQueue().elementAt(getOp(opPos+1)); QName qname = new QName(namespace, localname); var.setQName(qname); return var; }
Example #9
Source File: Arg.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Construct a parameter argument. * * @param qname Name of the argument, expressed as a QName object. * @param val Value of the argument, expressed as an XObject * @param isFromWithParam True if this is a parameter variable. */ public Arg(QName qname, XObject val, boolean isFromWithParam) { m_qname = qname; m_val = val; m_isFromWithParam = isFromWithParam; m_isVisible = !isFromWithParam; m_expression = null; }
Example #10
Source File: Variable.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * This function is used to fixup variables from QNames to stack frame * indexes at stylesheet build time. * @param vars List of QNames that correspond to variables. This list * should be searched backwards for the first qualified name that * corresponds to the variable reference qname. The position of the * QName in the vector from the start of the vector will be its position * in the stack frame (but variables above the globalsTop value will need * to be offset to the current stack frame). */ public void fixupVariables(java.util.Vector vars, int globalsSize) { m_fixUpWasCalled = true; int sz = vars.size(); for (int i = vars.size()-1; i >= 0; i--) { QName qn = (QName)vars.elementAt(i); // System.out.println("qn: "+qn); if(qn.equals(m_qname)) { if(i < globalsSize) { m_isGlobal = true; m_index = i; } else { m_index = i-globalsSize; } return; } } java.lang.String msg = XSLMessages.createXPATHMessage(XPATHErrorResources.ER_COULD_NOT_FIND_VAR, new Object[]{m_qname.toString()}); TransformerException te = new TransformerException(msg, this); throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(te); }
Example #11
Source File: Arg.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Equality function specialized for the variable name. If the argument * is not a qname, it will deligate to the super class. * * @param obj the reference object with which to compare. * @return <code>true</code> if this object is the same as the obj * argument; <code>false</code> otherwise. */ @Override public boolean equals(Object obj) { if(obj instanceof QName) { return m_qname.equals(obj); } else return super.equals(obj); }
Example #12
Source File: Arg.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Construct a parameter argument which has an XObject value. * isVisible defaults to true. * * @param qname Name of the argument, expressed as a QName object. * @param val Value of the argument, expressed as an XObject */ public Arg(QName qname, XObject val) { m_qname = qname; m_val = val; m_isVisible = true; m_isFromWithParam = false; m_expression = null; }
Example #13
Source File: Arg.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Construct a dummy parameter argument, with no QName and no * value (either expression string or value XObject). isVisible * defaults to true. */ public Arg() { m_qname = new QName(""); // so that string compares can be done. m_val = null; m_expression = null; m_isVisible = true; m_isFromWithParam = false; }
Example #14
Source File: Arg.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Construct a parameter argument which has an XObject value. * isVisible defaults to true. * * @param qname Name of the argument, expressed as a QName object. * @param val Value of the argument, expressed as an XObject */ public Arg(QName qname, XObject val) { m_qname = qname; m_val = val; m_isVisible = true; m_isFromWithParam = false; m_expression = null; }
Example #15
Source File: Arg.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Construct a parameter argument. * * @param qname Name of the argument, expressed as a QName object. * @param val Value of the argument, expressed as an XObject * @param isFromWithParam True if this is a parameter variable. */ public Arg(QName qname, XObject val, boolean isFromWithParam) { m_qname = qname; m_val = val; m_isFromWithParam = isFromWithParam; m_isVisible = !isFromWithParam; m_expression = null; }
Example #16
Source File: Arg.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Construct a parameter argument that contains an expression. * * @param qname Name of the argument, expressed as a QName object. * @param expression String to be stored as this argument's value expression. * @param isFromWithParam True if this is a parameter variable. */ public Arg(QName qname, String expression, boolean isFromWithParam) { m_qname = qname; m_val = null; m_expression = expression; m_isFromWithParam = isFromWithParam; m_isVisible = !isFromWithParam; }
Example #17
Source File: Arg.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Equality function specialized for the variable name. If the argument * is not a qname, it will deligate to the super class. * * @param obj the reference object with which to compare. * @return <code>true</code> if this object is the same as the obj * argument; <code>false</code> otherwise. */ @Override public boolean equals(Object obj) { if(obj instanceof QName) { return m_qname.equals(obj); } else return super.equals(obj); }
Example #18
Source File: Arg.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Construct a dummy parameter argument, with no QName and no * value (either expression string or value XObject). isVisible * defaults to true. */ public Arg() { m_qname = new QName(""); // so that string compares can be done. m_val = null; m_expression = null; m_isVisible = true; m_isFromWithParam = false; }
Example #19
Source File: Arg.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Equality function specialized for the variable name. If the argument * is not a qname, it will deligate to the super class. * * @param obj the reference object with which to compare. * @return <code>true</code> if this object is the same as the obj * argument; <code>false</code> otherwise. */ @Override public boolean equals(Object obj) { if(obj instanceof QName) { return m_qname.equals(obj); } else return super.equals(obj); }
Example #20
Source File: Variable.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * This function is used to fixup variables from QNames to stack frame * indexes at stylesheet build time. * @param vars List of QNames that correspond to variables. This list * should be searched backwards for the first qualified name that * corresponds to the variable reference qname. The position of the * QName in the vector from the start of the vector will be its position * in the stack frame (but variables above the globalsTop value will need * to be offset to the current stack frame). */ public void fixupVariables(List<QName> vars, int globalsSize) { m_fixUpWasCalled = true; int sz = vars.size(); for (int i = vars.size()-1; i >= 0; i--) { QName qn = vars.get(i); // System.out.println("qn: "+qn); if(qn.equals(m_qname)) { if(i < globalsSize) { m_isGlobal = true; m_index = i; } else { m_index = i-globalsSize; } return; } } java.lang.String msg = XSLMessages.createXPATHMessage(XPATHErrorResources.ER_COULD_NOT_FIND_VAR, new Object[]{m_qname.toString()}); TransformerException te = new TransformerException(msg, this); throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(te); }
Example #21
Source File: Arg.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Construct a parameter argument which has an XObject value. * isVisible defaults to true. * * @param qname Name of the argument, expressed as a QName object. * @param val Value of the argument, expressed as an XObject */ public Arg(QName qname, XObject val) { m_qname = qname; m_val = val; m_isVisible = true; m_isFromWithParam = false; m_expression = null; }
Example #22
Source File: Variable.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * This function is used to fixup variables from QNames to stack frame * indexes at stylesheet build time. * @param vars List of QNames that correspond to variables. This list * should be searched backwards for the first qualified name that * corresponds to the variable reference qname. The position of the * QName in the vector from the start of the vector will be its position * in the stack frame (but variables above the globalsTop value will need * to be offset to the current stack frame). */ public void fixupVariables(java.util.Vector vars, int globalsSize) { m_fixUpWasCalled = true; int sz = vars.size(); for (int i = vars.size()-1; i >= 0; i--) { QName qn = (QName)vars.elementAt(i); // System.out.println("qn: "+qn); if(qn.equals(m_qname)) { if(i < globalsSize) { m_isGlobal = true; m_index = i; } else { m_index = i-globalsSize; } return; } } java.lang.String msg = XSLMessages.createXPATHMessage(XPATHErrorResources.ER_COULD_NOT_FIND_VAR, new Object[]{m_qname.toString()}); TransformerException te = new TransformerException(msg, this); throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(te); }
Example #23
Source File: Arg.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Equality function specialized for the variable name. If the argument * is not a qname, it will deligate to the super class. * * @param obj the reference object with which to compare. * @return <code>true</code> if this object is the same as the obj * argument; <code>false</code> otherwise. */ @Override public boolean equals(Object obj) { if(obj instanceof QName) { return m_qname.equals(obj); } else return super.equals(obj); }
Example #24
Source File: Arg.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Construct a parameter argument which has an XObject value. * isVisible defaults to true. * * @param qname Name of the argument, expressed as a QName object. * @param val Value of the argument, expressed as an XObject */ public Arg(QName qname, XObject val) { m_qname = qname; m_val = val; m_isVisible = true; m_isFromWithParam = false; m_expression = null; }
Example #25
Source File: Arg.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Construct a parameter argument. * * @param qname Name of the argument, expressed as a QName object. * @param val Value of the argument, expressed as an XObject * @param isFromWithParam True if this is a parameter variable. */ public Arg(QName qname, XObject val, boolean isFromWithParam) { m_qname = qname; m_val = val; m_isFromWithParam = isFromWithParam; m_isVisible = !isFromWithParam; m_expression = null; }
Example #26
Source File: Arg.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * Construct a parameter argument. * * @param qname Name of the argument, expressed as a QName object. * @param val Value of the argument, expressed as an XObject * @param isFromWithParam True if this is a parameter variable. */ public Arg(QName qname, XObject val, boolean isFromWithParam) { m_qname = qname; m_val = val; m_isFromWithParam = isFromWithParam; m_isVisible = !isFromWithParam; m_expression = null; }
Example #27
Source File: Arg.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * Equality function specialized for the variable name. If the argument * is not a qname, it will deligate to the super class. * * @param obj the reference object with which to compare. * @return <code>true</code> if this object is the same as the obj * argument; <code>false</code> otherwise. */ @Override public boolean equals(Object obj) { if(obj instanceof QName) { return m_qname.equals(obj); } else return super.equals(obj); }
Example #28
Source File: Arg.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * Construct a parameter argument which has an XObject value. * isVisible defaults to true. * * @param qname Name of the argument, expressed as a QName object. * @param val Value of the argument, expressed as an XObject */ public Arg(QName qname, XObject val) { m_qname = qname; m_val = val; m_isVisible = true; m_isFromWithParam = false; m_expression = null; }
Example #29
Source File: Arg.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * Construct a parameter argument that contains an expression. * * @param qname Name of the argument, expressed as a QName object. * @param expression String to be stored as this argument's value expression. * @param isFromWithParam True if this is a parameter variable. */ public Arg(QName qname, String expression, boolean isFromWithParam) { m_qname = qname; m_val = null; m_expression = expression; m_isFromWithParam = isFromWithParam; m_isVisible = !isFromWithParam; }
Example #30
Source File: Arg.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * Construct a dummy parameter argument, with no QName and no * value (either expression string or value XObject). isVisible * defaults to true. */ public Arg() { m_qname = new QName(""); // so that string compares can be done. m_val = null; m_expression = null; m_isVisible = true; m_isFromWithParam = false; }