public class NamespaceBinder extends DefaultFilter
true.
This configuration recognizes the following features:
| Modifier and Type | Class and Description |
|---|---|
static class |
NamespaceBinder.NamespaceSupport
This namespace context object implements the old and new XNI
NamespaceContext interface methods so that it can
be used across all versions of Xerces2. |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
fInsertNamespaces
Insert namespaces.
|
protected short |
fNamesAttrs
Modify HTML attribute names.
|
protected NamespaceBinder.NamespaceSupport |
fNamespaceContext
Namespace context.
|
protected boolean |
fNamespacePrefixes
Namespace prefixes.
|
protected boolean |
fNamespaces
Namespaces.
|
protected String |
fNamespacesURI
Namespaces URI.
|
protected boolean |
fOverrideNamespaces
Override namespaces.
|
protected static String |
INSERT_NAMESPACES
Insert namespace binding URIs.
|
protected static String |
NAMES_ATTRS
Modify HTML attribute names: { "upper", "lower", "default" }.
|
protected static short |
NAMES_LOWERCASE
Lowercase HTML names.
|
protected static short |
NAMES_NO_CHANGE
Don't modify HTML names.
|
protected static short |
NAMES_UPPERCASE
Uppercase HTML names.
|
protected static String |
NAMESPACES
Namespaces.
|
protected static String |
NAMESPACES_URI
Namespaces URI.
|
protected static String |
OVERRIDE_NAMESPACES
Override namespace binding URI.
|
static String |
XHTML_1_0_URI
XHTML 1.0 namespace URI (http://www.w3.org/1999/xhtml).
|
static String |
XML_URI
XML namespace URI (http://www.w3.org/XML/1998/namespace).
|
static String |
XMLNS_URI
XMLNS namespace URI (http://www.w3.org/2000/xmlns/).
|
fDocumentHandler, fDocumentSource| Constructor and Description |
|---|
NamespaceBinder(HTMLConfiguration htmlConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
bindNamespaces(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.XMLAttributes attrs)
Binds namespaces.
|
void |
emptyElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.XMLAttributes attrs,
org.apache.xerces.xni.Augmentations augs)
Empty element.
|
void |
endElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.Augmentations augs)
End element.
|
Boolean |
getFeatureDefault(String featureId)
Returns the default state for a feature, or null if this
component does not want to report a default value for this
feature.
|
protected static short |
getNamesValue(String value)
Converts HTML names string value to constant value.
|
Object |
getPropertyDefault(String propertyId)
Returns the default value for a property, or null if this
component does not want to report a default value for this
property.
|
String[] |
getRecognizedFeatures()
Returns a list of feature identifiers that are recognized by
this component.
|
String[] |
getRecognizedProperties()
Returns a list of property identifiers that are recognized by
this component.
|
protected static String |
modifyName(String name,
short mode)
Modifies the given name based on the specified mode.
|
void |
reset(org.apache.xerces.xni.parser.XMLComponentManager manager)
Resets the component.
|
protected static void |
splitQName(org.apache.xerces.xni.QName qname)
Splits a qualified name.
|
void |
startDocument(org.apache.xerces.xni.XMLLocator locator,
String encoding,
org.apache.xerces.xni.NamespaceContext nscontext,
org.apache.xerces.xni.Augmentations augs)
Start document.
|
void |
startElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.XMLAttributes attrs,
org.apache.xerces.xni.Augmentations augs)
Start element.
|
characters, comment, doctypeDecl, endCDATA, endDocument, endGeneralEntity, getDocumentHandler, getDocumentSource, ignorableWhitespace, merge, processingInstruction, setDocumentHandler, setDocumentSource, setFeature, setProperty, startCDATA, startGeneralEntity, textDecl, xmlDeclpublic static final String XHTML_1_0_URI
public static final String XML_URI
public static final String XMLNS_URI
protected static final String NAMESPACES
protected static final String OVERRIDE_NAMESPACES
protected static final String INSERT_NAMESPACES
protected static final String NAMES_ATTRS
protected static final String NAMESPACES_URI
protected static final short NAMES_NO_CHANGE
protected static final short NAMES_UPPERCASE
protected static final short NAMES_LOWERCASE
protected boolean fNamespaces
protected boolean fNamespacePrefixes
protected boolean fOverrideNamespaces
protected boolean fInsertNamespaces
protected short fNamesAttrs
protected String fNamespacesURI
protected final NamespaceBinder.NamespaceSupport fNamespaceContext
public NamespaceBinder(HTMLConfiguration htmlConfiguration)
public String[] getRecognizedFeatures()
getRecognizedFeatures in interface org.apache.xerces.xni.parser.XMLComponentgetRecognizedFeatures in class DefaultFilterpublic Boolean getFeatureDefault(String featureId)
getFeatureDefault in interface HTMLComponentgetFeatureDefault in interface org.apache.xerces.xni.parser.XMLComponentgetFeatureDefault in class DefaultFilterpublic String[] getRecognizedProperties()
getRecognizedProperties in interface org.apache.xerces.xni.parser.XMLComponentgetRecognizedProperties in class DefaultFilterpublic Object getPropertyDefault(String propertyId)
getPropertyDefault in interface HTMLComponentgetPropertyDefault in interface org.apache.xerces.xni.parser.XMLComponentgetPropertyDefault in class DefaultFilterpublic void reset(org.apache.xerces.xni.parser.XMLComponentManager manager)
throws org.apache.xerces.xni.parser.XMLConfigurationException
reset in interface org.apache.xerces.xni.parser.XMLComponentreset in class DefaultFiltermanager - The component manager.org.apache.xerces.xni.XNIException - Thrown by component on initialization error.org.apache.xerces.xni.parser.XMLConfigurationExceptionpublic void startDocument(org.apache.xerces.xni.XMLLocator locator,
String encoding,
org.apache.xerces.xni.NamespaceContext nscontext,
org.apache.xerces.xni.Augmentations augs)
throws org.apache.xerces.xni.XNIException
startDocument in interface org.apache.xerces.xni.XMLDocumentHandlerstartDocument in class DefaultFilterorg.apache.xerces.xni.XNIExceptionpublic void startElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.XMLAttributes attrs,
org.apache.xerces.xni.Augmentations augs)
throws org.apache.xerces.xni.XNIException
startElement in interface org.apache.xerces.xni.XMLDocumentHandlerstartElement in class DefaultFilterorg.apache.xerces.xni.XNIExceptionpublic void emptyElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.XMLAttributes attrs,
org.apache.xerces.xni.Augmentations augs)
throws org.apache.xerces.xni.XNIException
emptyElement in interface org.apache.xerces.xni.XMLDocumentHandleremptyElement in class DefaultFilterorg.apache.xerces.xni.XNIExceptionpublic void endElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.Augmentations augs)
throws org.apache.xerces.xni.XNIException
endElement in interface org.apache.xerces.xni.XMLDocumentHandlerendElement in class DefaultFilterorg.apache.xerces.xni.XNIExceptionprotected static void splitQName(org.apache.xerces.xni.QName qname)
protected static final short getNamesValue(String value)
NAMES_NO_CHANGE,
NAMES_LOWERCASE,
NAMES_UPPERCASEprotected static final String modifyName(String name, short mode)
protected void bindNamespaces(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.XMLAttributes attrs)
Copyright © 2019. All rights reserved.