if (isTopLevelIncludedItem())
{
if ((this.fFixupBaseURIs) && (!sameBaseURIAsIncludeParent()))
{
if (paramXMLAttributes == null)
paramXMLAttributes = new XMLAttributesImpl();
String str1 = null;
try
{
str1 = getRelativeBaseURI();
}
catch (URI.MalformedURIException localMalformedURIException)
{
str1 = this.fCurrentBaseURI.getExpandedSystemId();
}
int k = paramXMLAttributes.addAttribute(XML_BASE_QNAME, XMLSymbols.fCDATASymbol, str1);
paramXMLAttributes.setSpecified(k, true);
}
if ((this.fFixupLanguage) && (!sameLanguageAsIncludeParent()))
{
if (paramXMLAttributes == null)
paramXMLAttributes = new XMLAttributesImpl();
int i = paramXMLAttributes.addAttribute(XML_LANG_QNAME, XMLSymbols.fCDATASymbol, this.fCurrentLanguage);
paramXMLAttributes.setSpecified(i, true);
}
Enumeration localEnumeration = this.fNamespaceContext.getAllPrefixes();
while (localEnumeration.hasMoreElements())
{
String str2 = (String)localEnumeration.nextElement();
str3 = this.fNamespaceContext.getURIFromIncludeParent(str2);
str4 = this.fNamespaceContext.getURI(str2);
if ((str3 == str4) || (paramXMLAttributes == null))
continue;
int n;
if (str2 == XMLSymbols.EMPTY_STRING)
{
if (paramXMLAttributes.getValue(NamespaceContext.XMLNS_URI, XMLSymbols.PREFIX_XMLNS) != null)
continue;
if (paramXMLAttributes == null)
paramXMLAttributes = new XMLAttributesImpl();
localObject = (QName)NEW_NS_ATTR_QNAME.clone();
((QName)localObject).prefix = null;
((QName)localObject).localpart = XMLSymbols.PREFIX_XMLNS;
((QName)localObject).rawname = XMLSymbols.PREFIX_XMLNS;
n = paramXMLAttributes.addAttribute((QName)localObject, XMLSymbols.fCDATASymbol, str4 != null ? str4 : XMLSymbols.EMPTY_STRING);
paramXMLAttributes.setSpecified(n, true);
this.fNamespaceContext.declarePrefix(str2, str4);
}
else
{
if (paramXMLAttributes.getValue(NamespaceContext.XMLNS_URI, str2) != null)
continue;
if (paramXMLAttributes == null)
paramXMLAttributes = new XMLAttributesImpl();
localObject = (QName)NEW_NS_ATTR_QNAME.clone();
((QName)localObject).localpart = str2;
localObject.rawname += str2;
((QName)localObject).rawname = (this.fSymbolTable != null ? this.fSymbolTable.addSymbol(((QName)localObject).rawname) : ((QName)localObject).rawname.intern());
n = paramXMLAttributes.addAttribute((QName)localObject, XMLSymbols.fCDATASymbol, str4 != null ? str4 : XMLSymbols.EMPTY_STRING);