private void ensurePrefixIsDeclared(String ns, String rawName)
void ensurePrefixIsDeclared(String ns, String rawName)
    private void ensurePrefixIsDeclared(String ns, String rawName)        throws org.xml.sax.SAXException    {        if (ns != null && ns.length() > 0)        {            int index;            String prefix =                (index = rawName.indexOf(":")) < 0                    ? ""                    : rawName.substring(0, index);            if (null != prefix)            {                String foundURI = m_prefixMap.lookupNamespace(prefix);                if ((null == foundURI) || !foundURI.equals(ns))                {                    this.startPrefixMapping(prefix, ns);                    // Bugzilla1133: Generate attribute as well as namespace event.                    // SAX does expect both.                    this.addAttributeAlways(                        "http://www.w3.org/2000/xmlns/",                        prefix,                        "xmlns" + (prefix.length() == 0 ? "" : ":") + prefix,                        "CDATA",                        ns);                }            }        }    }