Package org.apache.xalan.xpath.xml

Examples of org.apache.xalan.xpath.xml.QName


      {
        m_selectPattern = m_stylesheet.createXPath(atts.getValue(i), this);
      }
      else if(aname.equals(Constants.ATTRNAME_NAME))
      {
        m_qname = new QName(atts.getValue(i), stylesheetTree.m_namespaces);
      }
      else if(!isAttrOK(aname, atts, i))
      {
        processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
      }
View Full Code Here


    for(int i = 0; i < nAttrs; i++)
    {
      String aname = atts.getName(i);
      if(aname.equals(Constants.ATTRNAME_NAME))
      {
        m_qname = new QName(atts.getValue(i), stylesheetTree.m_namespaces);
        m_stylesheet.addAttributeSet(m_qname, this);
      }
      else if(!(processUseAttributeSets(aname, atts, i) || isAttrOK(aname, atts, i)))
      {
      processor.error(XSLTErrorResources.ERROR0002, new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
View Full Code Here

  boolean processUseAttributeSets(String attrName, AttributeList atts, int which)
  {
    boolean isUAS = false;
    if(Constants.ELEMNAME_LITERALRESULT == getXSLToken())
    {
      QName qname = new QName(attrName, m_stylesheet.m_namespaces);
      isUAS = ((null != qname.m_namespace) &&
               (qname.m_namespace.equals(m_stylesheet.m_XSLNameSpaceURL)) &&
               (qname.m_localpart.equals(Constants.ATTRNAME_USEATTRIBUTESETS)));
    }
    else
    {
      isUAS = attrName.equals(Constants.ATTRNAME_USEATTRIBUTESETS);
    }
    if(isUAS)
    {
      isUAS = true;
      String qnames = atts.getValue(which);
      StringTokenizer tokenizer = new StringTokenizer(qnames, " \t\n\r", false);
      m_attributeSetsNames = new QName[tokenizer.countTokens()];
      for(int k = 0; tokenizer.hasMoreTokens(); k++)
      {
        m_attributeSetsNames[k] = new QName(tokenizer.nextToken(), m_stylesheet.m_namespaces);
      }
    }
    return isUAS;
  }
View Full Code Here

    for(int i = 0; i < nAttrs; i++)
    {
      String aname = atts.getName(i);
      if(aname.equals(Constants.ATTRNAME_NAME))
      {
        m_templateName = new QName(atts.getValue(i), m_stylesheet.m_namespaces);       
      }
      else if(!isAttrOK(aname, atts, i))
      {
        processor.error(XSLTErrorResources.ER_ILLEGAL_ATTRIBUTE,new Object[] {name, aname}); //name+" has an illegal attribute: "+aname);
      }
View Full Code Here

      {
      case Constants.TATTRNAME_SELECT:
        m_selectPattern = m_stylesheet.createXPath(atts.getValue(i), this);
        break;
      case Constants.TATTRNAME_NAME:
        m_qname = new QName(atts.getValue(i), stylesheetTree.m_namespaces);
        break;
      case Constants.TATTRNAME_XMLSPACE:
        processSpaceAttr(atts, i);
        break;
      default:
View Full Code Here

      case Constants.TATTRNAME_SELECT:
        m_selectPattern
          = stylesheetTree.createXPath(atts.getValue(i), this);
        break;
      case Constants.TATTRNAME_MODE:
        m_mode = new QName( atts.getValue(i), m_stylesheet.m_namespaces);
        break;
      default:
        if(!isAttrOK(aname, atts, i))
        {
          if(null != processor)
View Full Code Here

      while(null != matchPat)
      {
        ElemTemplate rule = matchPat.getTemplate();
        // We'll be needing to match rules according to what
        // mode we're in.
        QName ruleMode = rule.m_mode;

        // The logic here should be that if we are not in a mode AND
        // the rule does not have a node, then go ahead.
        // OR if we are in a mode, AND the rule has a node,
        // AND the rules match, then go ahead.
        if(((null == mode) && (null == ruleMode)) ||
           ((null != ruleMode) && (null != mode) && ruleMode.equals(mode)))
        {
          String patterns = matchPat.getPattern();

          if((null != patterns) && !((prevPat != null) && prevPat.equals(patterns) &&
                                     (prevMatchPat.getTemplate().m_priority
View Full Code Here

   * the error condition is severe enough to halt processing.
   */
  ElemTemplateElement findNamedTemplate(String name)
    throws XSLProcessorException
  {
    QName qname = new QName(name, m_stylesheet.m_namespaces);

    return findNamedTemplate(qname);
  }
View Full Code Here

  {
    opPos = getFirstChildPos(opPos);
    String varName = (String)m_tokenQueue[m_opMap[opPos]];
    // System.out.println("variable name: "+varName);
    // TODO: I don't this will be parsed right in the first place...
    QName qname = new QName(varName, execContext.getNamespaceContext());
    XObject result;
    try
    {
      result = execContext.getVariable(qname);
    }
View Full Code Here

      elemLocalName = (indexOfNSSep < 0) ? elementName : elementName.substring(indexOfNSSep+1);
      int n = cdataElems.length;
      for(int i = 0; i < n; i++)
      {
        // This needs to be a qname!
        QName qname = cdataElems[i];
        is = qname.equals(elemNS, elemLocalName);
        if(is)
          break;
      }
    }
    return is;
View Full Code Here

TOP

Related Classes of org.apache.xalan.xpath.xml.QName

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.