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 short |
fNamesElems
Modify HTML element names.
|
protected NamespaceBinder.NamespaceSupport |
fNamespaceContext
Namespace context.
|
protected boolean |
fNamespacePrefixes
Namespace prefixes.
|
protected boolean |
fNamespaces
Namespaces.
|
protected java.lang.String |
fNamespacesURI
Namespaces URI.
|
protected boolean |
fOverrideNamespaces
Override namespaces.
|
protected static java.lang.String |
INSERT_NAMESPACES
Insert namespace binding URIs.
|
protected static java.lang.String |
NAMES_ATTRS
Modify HTML attribute names: { "upper", "lower", "default" }.
|
protected static java.lang.String |
NAMES_ELEMS
Modify HTML element 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 java.lang.String |
NAMESPACES
Namespaces.
|
protected static java.lang.String |
NAMESPACES_URI
Namespaces URI.
|
protected static java.lang.String |
OVERRIDE_NAMESPACES
Override namespace binding URI.
|
static java.lang.String |
XHTML_1_0_URI
XHTML 1.0 namespace URI (http://www.w3.org/1999/xhtml).
|
static java.lang.String |
XML_URI
XML namespace URI (http://www.w3.org/XML/1998/namespace).
|
static java.lang.String |
XMLNS_URI
XMLNS namespace URI (http://www.w3.org/2000/xmlns/).
|
fDocumentHandler, fDocumentSource
Constructor and Description |
---|
NamespaceBinder() |
Modifier and Type | Method and Description |
---|---|
protected void |
bindNamespaces(QName element,
XMLAttributes attrs)
Binds namespaces.
|
void |
emptyElement(QName element,
XMLAttributes attrs,
Augmentations augs)
Empty element.
|
void |
endElement(QName element,
Augmentations augs)
End element.
|
java.lang.Boolean |
getFeatureDefault(java.lang.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(java.lang.String value)
Converts HTML names string value to constant value.
|
java.lang.Object |
getPropertyDefault(java.lang.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.
|
java.lang.String[] |
getRecognizedFeatures()
Returns a list of feature identifiers that are recognized by
this component.
|
java.lang.String[] |
getRecognizedProperties()
Returns a list of property identifiers that are recognized by
this component.
|
protected static java.lang.String |
modifyName(java.lang.String name,
short mode)
Modifies the given name based on the specified mode.
|
void |
reset(XMLComponentManager manager)
Resets the component.
|
protected static void |
splitQName(QName qname)
Splits a qualified name.
|
void |
startDocument(XMLLocator locator,
java.lang.String encoding,
NamespaceContext nscontext,
Augmentations augs)
Start document.
|
void |
startElement(QName element,
XMLAttributes attrs,
Augmentations augs)
Start element.
|
characters, comment, doctypeDecl, endCDATA, endDocument, endGeneralEntity, endPrefixMapping, getDocumentHandler, getDocumentSource, ignorableWhitespace, merge, processingInstruction, setDocumentHandler, setDocumentSource, setFeature, setProperty, startCDATA, startDocument, startGeneralEntity, startPrefixMapping, textDecl, xmlDecl
public static final java.lang.String XHTML_1_0_URI
public static final java.lang.String XML_URI
public static final java.lang.String XMLNS_URI
protected static final java.lang.String NAMESPACES
protected static final java.lang.String OVERRIDE_NAMESPACES
protected static final java.lang.String INSERT_NAMESPACES
protected static final java.lang.String NAMES_ELEMS
protected static final java.lang.String NAMES_ATTRS
protected static final java.lang.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 fNamesElems
protected short fNamesAttrs
protected java.lang.String fNamespacesURI
protected final NamespaceBinder.NamespaceSupport fNamespaceContext
public java.lang.String[] getRecognizedFeatures()
getRecognizedFeatures
in class DefaultFilter
public java.lang.Boolean getFeatureDefault(java.lang.String featureId)
getFeatureDefault
in interface HTMLComponent
getFeatureDefault
in class DefaultFilter
public java.lang.String[] getRecognizedProperties()
getRecognizedProperties
in class DefaultFilter
public java.lang.Object getPropertyDefault(java.lang.String propertyId)
getPropertyDefault
in interface HTMLComponent
getPropertyDefault
in class DefaultFilter
public void reset(XMLComponentManager manager) throws XMLConfigurationException
reset
in class DefaultFilter
manager
- The component manager.XNIException
- Thrown by component on initialization error.XMLConfigurationException
public void startDocument(XMLLocator locator, java.lang.String encoding, NamespaceContext nscontext, Augmentations augs) throws XNIException
startDocument
in class DefaultFilter
XNIException
public void startElement(QName element, XMLAttributes attrs, Augmentations augs) throws XNIException
startElement
in class DefaultFilter
XNIException
public void emptyElement(QName element, XMLAttributes attrs, Augmentations augs) throws XNIException
emptyElement
in class DefaultFilter
XNIException
public void endElement(QName element, Augmentations augs) throws XNIException
endElement
in class DefaultFilter
XNIException
protected static void splitQName(QName qname)
protected static final short getNamesValue(java.lang.String value)
NAMES_NO_CHANGE
,
NAMES_LOWERCASE
,
NAMES_UPPERCASE
protected static final java.lang.String modifyName(java.lang.String name, short mode)
protected void bindNamespaces(QName element, XMLAttributes attrs)
(C) Copyright 2002-2014, Andy Clark, Marc Guillemot. All rights reserved.