| java.lang.Object com.sun.xml.stream.dtd.nonvalidating.DTDGrammar
DTDGrammar | public class DTDGrammar (Code) | | A DTD grammar. This class implements the XNI handler interfaces
for DTD information so that it can build the approprate validation
structures automatically from the callbacks.
author: Eric Ye, IBM author: Jeffrey Rodriguez, IBM author: Andy Clark, IBM author: Neil Graham, IBM version: $Id: DTDGrammar.java,v 1.2 2006/04/01 06:01:41 jeffsuttor Exp $ |
Inner Class :final protected static class QNameHashtable | |
Method Summary | |
public void | attributeDecl(String elementName, String attributeName, String type, String[] enumeration, String defaultType, XMLString defaultValue, XMLString nonNormalizedDefaultValue, Augmentations augs) An attribute declaration.
Parameters: elementName - The name of the element that this attributeis associated with. Parameters: attributeName - The name of the attribute. Parameters: type - The attribute type. | protected int | createAttributeDecl() | protected int | createElementDecl() | public void | elementDecl(String name, String contentModel, Augmentations augs) An element declaration. | public void | endDTD(Augmentations augs) | public boolean | getAttributeDecl(int attributeDeclIndex, XMLAttributeDecl attributeDecl) getAttributeDecl
Parameters: attributeDeclIndex - Parameters: attributeDecl - The values of this structure are set by this call. | public int | getAttributeDeclIndex(int elementDeclIndex, String attributeDeclName) | public short | getContentSpecType(int elementIndex) make separate function for getting contentSpecType of element. | public boolean | getElementDecl(int elementDeclIndex, XMLElementDecl elementDecl) getElementDecl
Parameters: elementDeclIndex - Parameters: elementDecl - The values of this structure are set by this call. | public int | getElementDeclIndex(String elementDeclName) | public int | getElementDeclIndex(QName elementDeclQName) Returns the element decl index. | public int | getFirstAttributeDeclIndex(int elementDeclIndex) | public int | getFirstElementDeclIndex() Returns the index of the first element declaration. | public int | getNextAttributeDeclIndex(int attributeDeclIndex) | public int | getNextElementDeclIndex(int elementDeclIndex) Returns the next index of the element declaration following the
specified element declaration. | public List | getNotationDecls() | public SymbolTable | getSymbolTable() Returns the symbol table. | public boolean | isCDATAAttribute(QName elName, QName atName) Returns whether the given attribute is of type CDATA or not
Parameters: elName - The element name. Parameters: atName - The attribute name. | public void | notationDecl(String name, XMLResourceIdentifier identifier, Augmentations augs) | public void | printAttributes(int elementDeclIndex) | public void | printElements() | protected void | setAttributeDecl(int elementDeclIndex, int attributeDeclIndex, XMLAttributeDecl attributeDecl) | protected void | setElementDecl(int elementDeclIndex, XMLElementDecl elementDecl) | protected void | setFirstAttributeDeclIndex(int elementDeclIndex, int newFirstAttrIndex) | public void | startDTD(XMLLocator locator, Augmentations augs) The start of the DTD.
Parameters: locator - The document locator, or null if the documentlocation cannot be reported during the parsing ofthe document DTD. |
TOP_LEVEL_SCOPE | final public static int TOP_LEVEL_SCOPE(Code) | | Top level scope (-1).
|
fCurrentAttributeIndex | protected int fCurrentAttributeIndex(Code) | | Current attribute index.
|
fCurrentElementIndex | protected int fCurrentElementIndex(Code) | | Current element index.
|
fReadingExternalDTD | protected boolean fReadingExternalDTD(Code) | | fReadingExternalDTD
|
prevNodeIndex | int prevNodeIndex(Code) | | |
valueIndex | int valueIndex(Code) | | |
attributeDecl | public void attributeDecl(String elementName, String attributeName, String type, String[] enumeration, String defaultType, XMLString defaultValue, XMLString nonNormalizedDefaultValue, Augmentations augs) throws XNIException(Code) | | An attribute declaration.
Parameters: elementName - The name of the element that this attributeis associated with. Parameters: attributeName - The name of the attribute. Parameters: type - The attribute type. This value will be one ofthe following: "CDATA", "ENTITY", "ENTITIES","ENUMERATION", "ID", "IDREF", "IDREFS","NMTOKEN", "NMTOKENS", or "NOTATION". Parameters: enumeration - If the type has the value "ENUMERATION", thisarray holds the allowed attribute values;otherwise, this array is null. Parameters: defaultType - The attribute default type. This value will beone of the following: "#FIXED", "#IMPLIED","#REQUIRED", or null. Parameters: defaultValue - The attribute default value, or null if nodefault value is specified. Parameters: nonNormalizedDefaultValue - The attribute default value with no normalizationperformed, or null if no default value is specified. Parameters: augs - Additional information that may include infosetaugmentations. throws: XNIException - Thrown by handler to signal an error. |
createAttributeDecl | protected int createAttributeDecl()(Code) | | |
createElementDecl | protected int createElementDecl()(Code) | | |
elementDecl | public void elementDecl(String name, String contentModel, Augmentations augs) throws XNIException(Code) | | An element declaration.
Parameters: name - The name of the element. Parameters: contentModel - The element content model. Parameters: augs - Additional information that may include infosetaugmentations. throws: XNIException - Thrown by handler to signal an error. |
getAttributeDecl | public boolean getAttributeDecl(int attributeDeclIndex, XMLAttributeDecl attributeDecl)(Code) | | getAttributeDecl
Parameters: attributeDeclIndex - Parameters: attributeDecl - The values of this structure are set by this call. true if getAttributeDecl was able to fill in the value of attributeDecl |
getAttributeDeclIndex | public int getAttributeDeclIndex(int elementDeclIndex, String attributeDeclName)(Code) | | |
getContentSpecType | public short getContentSpecType(int elementIndex)(Code) | | make separate function for getting contentSpecType of element.
we can avoid setting of the element values.
|
getElementDecl | public boolean getElementDecl(int elementDeclIndex, XMLElementDecl elementDecl)(Code) | | getElementDecl
Parameters: elementDeclIndex - Parameters: elementDecl - The values of this structure are set by this call. True if find the element, False otherwise. |
getElementDeclIndex | public int getElementDeclIndex(String elementDeclName)(Code) | | getElementDeclIndex
Parameters: elementDeclName - index of the elementDeclName in scope |
getElementDeclIndex | public int getElementDeclIndex(QName elementDeclQName)(Code) | | Returns the element decl index.
Parameters: elementDeclQName - qualilfied name of the element |
getFirstAttributeDeclIndex | public int getFirstAttributeDeclIndex(int elementDeclIndex)(Code) | | getFirstAttributeDeclIndex
Parameters: elementDeclIndex - index of the first attribute for element declaration elementDeclIndex |
getNextAttributeDeclIndex | public int getNextAttributeDeclIndex(int attributeDeclIndex)(Code) | | getNextAttributeDeclIndex
Parameters: attributeDeclIndex - index of the next attribute of the attribute at attributeDeclIndex |
getNextElementDeclIndex | public int getNextElementDeclIndex(int elementDeclIndex)(Code) | | Returns the next index of the element declaration following the
specified element declaration.
Parameters: elementDeclIndex - The element declaration index. |
getNotationDecls | public List getNotationDecls()(Code) | | |
isCDATAAttribute | public boolean isCDATAAttribute(QName elName, QName atName)(Code) | | Returns whether the given attribute is of type CDATA or not
Parameters: elName - The element name. Parameters: atName - The attribute name. true if the attribute is of type CDATA |
printAttributes | public void printAttributes(int elementDeclIndex)(Code) | | |
printElements | public void printElements()(Code) | | |
setAttributeDecl | protected void setAttributeDecl(int elementDeclIndex, int attributeDeclIndex, XMLAttributeDecl attributeDecl)(Code) | | |
setFirstAttributeDeclIndex | protected void setFirstAttributeDeclIndex(int elementDeclIndex, int newFirstAttrIndex)(Code) | | |
startDTD | public void startDTD(XMLLocator locator, Augmentations augs) throws XNIException(Code) | | The start of the DTD.
Parameters: locator - The document locator, or null if the documentlocation cannot be reported during the parsing ofthe document DTD. However, it is stronglyrecommended that a locator be supplied that canat least report the base system identifier of theDTD. Parameters: augs - Additional information that may include infosetaugmentations. throws: XNIException - Thrown by handler to signal an error. |
|
|