Package org.apache.xalan.xpath.xml

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


    String name=intToString(elementNameIndex);
    String attrname, attrvalue;

    // Push a new namespace context

    StringToStringTable pushNS=m_emptyNamespace;
   
    // Process any new namespace declarations
    if(attrListIndex!=-1)
    {
      for (int index = xmlAttrList.getFirstAttr(attrListIndex);
           index != -1;
           index = xmlAttrList.getNextAttr(index))
      {
        attrname = fStringPool.toString(xmlAttrList.getAttrName(index));
        if (attrname.startsWith("xmlns:"))
        {
          // XML4J very politely offers to stringify this for us
          attrvalue = fStringPool.toString(xmlAttrList.getAttValue(index));
          String nsprefix = attrname.substring(6);
          if(m_emptyNamespace == pushNS)
            pushNS = new StringToStringTable();
          pushNS.put(nsprefix,attrvalue);
        }
        else if(attrname.equals("xmlns"))
        {
          attrvalue = fStringPool.toString(xmlAttrList.getAttValue(index));
          if(m_emptyNamespace == pushNS)
            pushNS = new StringToStringTable();
          pushNS.put(DEFAULT_PREFIX_STR,attrvalue);
        }
      }
    }
    namespaceTable.addElement(pushNS);
   
View Full Code Here

TOP

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

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.