FileDocCategorySizeDatePackage
XmlnsAttributeDescriptor.javaAPI DocAndroid 1.5 API2723Wed May 06 22:41:10 BST 2009com.android.ide.eclipse.editors.descriptors

XmlnsAttributeDescriptor

public final class XmlnsAttributeDescriptor extends AttributeDescriptor
Describes an XMLNS attribute that is hidden.

Such an attribute has no user interface and no corresponding {@link UiAttributeNode}. It also has a single constant default value.

When loading an XML, we'll ignore this attribute. However when writing a new XML, we should always write this attribute.

Currently this is used for the xmlns:android attribute in the manifest element.

Fields Summary
public static final String
XMLNS_URI
URI of the reserved "xmlns" prefix, as described in http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/namespaces-algorithms.html#normalizeDocumentAlgo
private String
mValue
Constructors Summary
public XmlnsAttributeDescriptor(String defaultPrefix, String value)


    
         
        super(defaultPrefix, XMLNS_URI);
        mValue = value;
    
Methods Summary
public com.android.ide.eclipse.editors.uimodel.UiAttributeNodecreateUiNode(com.android.ide.eclipse.editors.uimodel.UiElementNode uiParent)

return
Always returns null. {@link XmlnsAttributeDescriptor} has no user interface.

        return null;
    
public java.lang.StringgetValue()
Returns the value of this specialized attribute descriptor, which is the URI associated to the declared namespace prefix.

        return mValue;
    
public java.lang.StringgetXmlNsName()
Returns the fully-qualified attribute name, namely "xmlns:xxx" where xxx is the defaultPrefix passed in the constructor.

        return getXmlNsPrefix() + ":" + getXmlLocalName(); //$NON-NLS-1$
    
public java.lang.StringgetXmlNsPrefix()
Returns the "xmlns" prefix that is always used by this node for its namespace URI. This is defined by the XML specification.

        return "xmlns"; //$NON-NLS-1$