286N/A * reserved comment block 286N/A * DO NOT REMOVE OR ALTER! 286N/A * The Apache Software License, Version 1.1 286N/A * Copyright (c) 1999-2002 The Apache Software Foundation. 286N/A * Redistribution and use in source and binary forms, with or without 286N/A * modification, are permitted provided that the following conditions 286N/A * 1. Redistributions of source code must retain the above copyright 286N/A * notice, this list of conditions and the following disclaimer. 286N/A * 2. Redistributions in binary form must reproduce the above copyright 286N/A * notice, this list of conditions and the following disclaimer in 286N/A * the documentation and/or other materials provided with the 286N/A * 3. The end-user documentation included with the redistribution, 286N/A * if any, must include the following acknowledgment: 286N/A * "This product includes software developed by the 286N/A * Alternately, this acknowledgment may appear in the software itself, 286N/A * if and wherever such third-party acknowledgments normally appear. 286N/A * 4. The names "Xerces" and "Apache Software Foundation" must 286N/A * not be used to endorse or promote products derived from this 286N/A * software without prior written permission. For written 286N/A * permission, please contact apache@apache.org. 286N/A * 5. Products derived from this software may not be called "Apache", 286N/A * nor may "Apache" appear in their name, without prior written 286N/A * permission of the Apache Software Foundation. 286N/A * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 286N/A * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 286N/A * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 286N/A * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR 286N/A * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 286N/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 286N/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 286N/A * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 286N/A * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 286N/A * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 286N/A * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 286N/A * ==================================================================== 286N/A * This software consists of voluntary contributions made by many 286N/A * individuals on behalf of the Apache Software Foundation and was 286N/A * originally based on software copyright (c) 1999, International 286N/A * information on the Apache Software Foundation, please see 286N/A * A DTD grammar. This class implements the XNI handler interfaces 286N/A * for DTD information so that it can build the approprate validation 286N/A * structures automatically from the callbacks. 286N/A * @author Jeffrey Rodriguez, IBM 286N/A * @author Andy Clark, IBM 286N/A * @author Neil Graham, IBM 286N/A /** Top level scope (-1). */ 286N/A /** Chunk shift (8). */ 286N/A /** Chunk size (1 << CHUNK_SHIFT). */ 286N/A /** Chunk mask (CHUNK_SIZE - 1). */ 286N/A /** Initial chunk count (1 << (10 - CHUNK_SHIFT)). */ 286N/A /** List flag (0x80). */ 286N/A /** List mask (~LIST_FLAG). */ 286N/A /** Debug DTDGrammar. */ 286N/A /** Current element index. */ 286N/A /** Current attribute index. */ 286N/A /** fReadingExternalDTD */ 286N/A // The XMLDTDDescription with which this Grammar is associated 286N/A // element declarations 286N/A /** Number of element declarations. */ 286N/A /** Element declaration name. */ 286N/A * Element declaration type. 286N/A * Element declaration content spec index. This index value is used 286N/A * to refer to the content spec information tables. 286N/A * Element declaration content model validator. This validator is 286N/A * constructed from the content spec nodes. 286N/A /** First attribute declaration of an element declaration. */ 286N/A /** Last attribute declaration of an element declaration. */ 286N/A // attribute declarations 286N/A /** Number of attribute declarations. */ 286N/A /** Attribute declaration name. */ 286N/A // is this grammar immutable? (fully constructed and not changeable) 286N/A * Attribute declaration type. 286N/A * @see XMLAttributeDecl 286N/A /** Attribute declaration enumeration values. */ 286N/A // here saves the content spec binary trees for element decls, 286N/A // each element with a content model will hold a pointer which is 286N/A // the index of the head node of the content spec tree. 286N/A /** Element index mapping table. */ 286N/A /** Entity index mapping table. */ 286N/A /** Notation index mapping table. */ 286N/A /** Temporary qualified name. */ 286N/A /** Temporary qualified name. */ 286N/A /** Temporary Attribute decl. */ 286N/A // for buildSyntaxTree method 286N/A /** Element declaration. */ 286N/A /** Entity declaration. */ 286N/A /** Content spec node. */ 286N/A /** table of XMLElementDecl */ 286N/A /** Children content model operation stack. */ 286N/A /** Children content model index stack. */ 286N/A /** Children content model previous node index stack. */ 286N/A // additional fields(columns) for the element Decl pool in the Grammar 286N/A /** flag if the elementDecl is External. */ 286N/A // additional fields(columns) for the attribute Decl pool in the Grammar 286N/A /** flag if the AttributeDecl is External. */ 286N/A // for mixedElement method 286N/A /** Default constructor. */ 286N/A }
// <init>(SymbolTable) 286N/A // return the XMLDTDDescription object with which this is associated 286N/A }
// getGrammarDescription(): XMLGrammarDescription 286N/A * Returns true if the specified element declaration is external. 286N/A * @param elementDeclIndex The element declaration index. 286N/A }
// getElementDeclIsExternal(int):boolean 286N/A * Returns true if the specified attribute declaration is external. 286N/A * @param attributeDeclIndex Attribute declaration index. 286N/A }
// getAttributeDeclIndex (int,QName) 286N/A // XMLDTDHandler methods 286N/A * The start of the DTD. 286N/A * @param locator The document locator, or null if the document 286N/A * location cannot be reported during the parsing of 286N/A * the document DTD. However, it is <em>strongly</em> 286N/A * recommended that a locator be supplied that can 286N/A * at least report the base system identifier of the 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A }
// startDTD(XMLLocator) 286N/A * This method notifies of the start of an entity. The DTD has the 286N/A * pseudo-name of "[dtd]" and parameter entity names start with '%'. 286N/A * <strong>Note:</strong> Since the DTD is an entity, the handler 286N/A * will be notified of the start of the DTD entity by calling the 286N/A * startParameterEntity method with the entity name "[dtd]" <em>before</em> calling 286N/A * @param name The name of the parameter entity. 286N/A * @param identifier The resource identifier. 286N/A * @param encoding The auto-detected IANA encoding name of the entity 286N/A * stream. This value will be null in those situations 286N/A * where the entity encoding is not auto-detected (e.g. 286N/A * internal parameter entities). 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A // keep track of this entity before fEntityDepth is increased 286N/A }
// startParameterEntity(String,XMLResourceIdentifier,String,Augmentations) 286N/A * The start of the DTD external subset. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A }
// startExternalSubset(Augmentations) 286N/A * This method notifies the end of an entity. The DTD has the pseudo-name 286N/A * of "[dtd]" and parameter entity names start with '%'. 286N/A * <strong>Note:</strong> Since the DTD is an entity, the handler 286N/A * will be notified of the end of the DTD entity by calling the 286N/A * endEntity method with the entity name "[dtd]" <em>after</em> calling 286N/A * @param name The name of the entity. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A }
// endParameterEntity(String,Augmentations) 286N/A * The end of the DTD external subset. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A }
// endExternalSubset(Augmentations) 286N/A * An element declaration. 286N/A * @param name The name of the element. 286N/A * @param contentModel The element content model. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A // check if it is already defined 286N/A // duplicate element, ignored. 286N/A //add(or set) this elementDecl to the local cache 286N/A }
// elementDecl(String,String) 286N/A * An attribute declaration. 286N/A * @param elementName The name of the element that this attribute 286N/A * @param attributeName The name of the attribute. 286N/A * @param type The attribute type. This value will be one of 286N/A * the following: "CDATA", "ENTITY", "ENTITIES", 286N/A * "ENUMERATION", "ID", "IDREF", "IDREFS", 286N/A * "NMTOKEN", "NMTOKENS", or "NOTATION". 286N/A * @param enumeration If the type has the value "ENUMERATION", this 286N/A * array holds the allowed attribute values; 286N/A * otherwise, this array is null. 286N/A * @param defaultType The attribute default type. This value will be 286N/A * one of the following: "#FIXED", "#IMPLIED", 286N/A * "#REQUIRED", or null. 286N/A * @param defaultValue The attribute default value, or null if no 286N/A * default value is specified. 286N/A * @param nonNormalizedDefaultValue The attribute default value with no normalization 286N/A * performed, or null if no default value is specified. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A //if ElementDecl has already being created in the Grammar then remove from table, 286N/A //this.fElementDeclTab.remove( (String) elementName ); 286N/A // then it is forward reference to a element decl, create the elementDecl first. 286N/A //add(or set) this elementDecl to the local cache 286N/A //set internal structure 286N/A //Get Grammar index to grammar array 286N/A //return, when more than one definition is provided for the same attribute of given element type 286N/A //only the first declaration is binding and later declarations are ignored 286N/A // REVISIT: Report error message. -Ac 286N/A // REVISIT: The datatype should be stored with the attribute value 286N/A // and not special-cased in the XMLValidator. -Ac 286N/A //fSimpleType.datatypeValidator = fDatatypeValidatorFactory.createDatatypeValidator(type, null, facets, fSimpleType.list); 286N/A }
// attributeDecl(String,String,String,String[],String,XMLString,XMLString, Augmentations) 286N/A * An internal entity declaration. 286N/A * @param name The name of the entity. Parameter entity names start with 286N/A * '%', whereas the name of a general entity is just the 286N/A * @param text The value of the entity. 286N/A * @param nonNormalizedText The non-normalized value of the entity. This 286N/A * value contains the same sequence of characters that was in 286N/A * the internal entity declaration, without any entity 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A }
// internalEntityDecl(String,XMLString,XMLString) 286N/A * An external entity declaration. 286N/A * @param name The name of the entity. Parameter entity names start 286N/A * with '%', whereas the name of a general entity is just 286N/A * @param identifier An object containing all location information 286N/A * pertinent to this external entity declaration. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A }
// externalEntityDecl(String, XMLResourceIdentifier, Augmentations) 286N/A * An unparsed entity declaration. 286N/A * @param name The name of the entity. 286N/A * @param identifier An object containing all location information 286N/A * pertinent to this entity. 286N/A * @param notation The name of the notation. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A }
// unparsedEntityDecl(String,StringXMLResourceIdentifier,Augmentations) 286N/A * A notation declaration 286N/A * @param name The name of the notation. 286N/A * @param identifier An object containing all location information 286N/A * pertinent to this notation. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A }
// notationDecl(String,XMLResourceIdentifier,Augmentations) 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A // make sure our description contains useful stuff... 286N/A // we don't know what the root is; so use possibleRoots... 286N/A // sets the source of this handler 286N/A }
// setDTDSource(XMLDTDSource) 286N/A // returns the source of this handler 286N/A }
// getDTDSource(): XMLDTDSource 286N/A * Notifies of the presence of a TextDecl line in an entity. If present, 286N/A * this method will be called immediately following the startEntity call. 286N/A * <strong>Note:</strong> This method is only called for external 286N/A * parameter entities referenced in the DTD. 286N/A * @param version The XML version, or null if not specified. 286N/A * @param encoding The IANA encoding name of the entity. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A * @param text The text in the comment. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by application to signal an error. 286N/A * A processing instruction. Processing instructions consist of a 286N/A * target name and, optionally, text data. The data is only meaningful 286N/A * Typically, a processing instruction's data will contain a series 286N/A * of pseudo-attributes. These pseudo-attributes follow the form of 286N/A * element attributes but are <strong>not</strong> parsed or presented 286N/A * to the application as anything other than text. The application is 286N/A * responsible for parsing the data. 286N/A * @param target The target. 286N/A * @param data The data or null if none specified. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A * The start of an attribute list. 286N/A * @param elementName The name of the element that this attribute 286N/A * list is associated with. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A * The end of an attribute list. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A * The start of a conditional section. 286N/A * @param type The type of the conditional section. This value will 286N/A * either be CONDITIONAL_INCLUDE or CONDITIONAL_IGNORE. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A * @see XMLDTDHandler#CONDITIONAL_INCLUDE 286N/A * @see XMLDTDHandler#CONDITIONAL_IGNORE 286N/A * Characters within an IGNORE conditional section. 286N/A * @param text The ignored text. 286N/A * @param augs Additional information that may include infoset 286N/A * The end of a conditional section. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A // XMLDTDContentModelHandler methods 286N/A // set content model source 286N/A // get content model source 286N/A * The start of a content model. Depending on the type of the content 286N/A * model, specific methods may be called between the call to the 286N/A * startContentModel method and the call to the endContentModel method. 286N/A * @param elementName The name of the element. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A }
// startContentModel(String) 286N/A * A start of either a mixed or children content model. A mixed 286N/A * content model will immediately be followed by a call to the 286N/A * <code>pcdata()</code> method. A children content model will 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A * The appearance of "#PCDATA" within a group signifying a 286N/A * mixed content model. This method will be the first called 286N/A * following the content model's <code>startGroup()</code>. 286N/A *@param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A * A referenced element in a mixed or children content model. 286N/A * @param elementName The name of the referenced element. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A * The separator between choices or sequences of a mixed or children 286N/A * @param separator The type of children separator. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A * The occurrence count for a child in a children content model or 286N/A * for the mixed content model group. 286N/A * @param occurrence The occurrence count for the last element 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A * The end of a group for mixed or children content models. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A * A content model of ANY. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A * A content model of EMPTY. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A * The end of a content model. 286N/A * @param augs Additional information that may include infoset 286N/A * @throws XNIException Thrown by handler to signal an error. 286N/A /** Returns true if this grammar is namespace aware. */ 286N/A }
// isNamespaceAware():boolean 286N/A /** Returns the symbol table. */ 286N/A }
// getSymbolTable():SymbolTable 286N/A * Returns the index of the first element declaration. This index 286N/A * is then used to query more information about the element declaration. 286N/A * @see #getNextElementDeclIndex 286N/A }
// getFirstElementDeclIndex():int 286N/A * Returns the next index of the element declaration following the 286N/A * specified element declaration. 286N/A * @param elementDeclIndex The element declaration index. 286N/A }
// getNextElementDeclIndex(int):int 286N/A * @param elementDeclName 286N/A * @return index of the elementDeclName in scope 286N/A //System.out.println("getElementDeclIndex("+elementDeclName+") -> "+mapping); 286N/A }
// getElementDeclIndex(String):int 286N/A /** Returns the element decl index. 286N/A * @param elementDeclQName qualilfied name of the element 286N/A }
// getElementDeclIndex(QName):int 286N/A /** make separate function for getting contentSpecType of element. 286N/A * we can avoid setting of the element values. 286N/A * @param elementDeclIndex 286N/A * @param elementDecl The values of this structure are set by this call. 286N/A * @return True if find the element, False otherwise. 286N/A /* Validators are null until we add that code */ 286N/A }
// getElementDecl(int,XMLElementDecl):boolean 286N/A * getFirstAttributeDeclIndex 286N/A * @param elementDeclIndex 286N/A * @return index of the first attribute for element declaration elementDeclIndex 286N/A }
// getFirstAttributeDeclIndex 286N/A * getNextAttributeDeclIndex 286N/A * @param attributeDeclIndex 286N/A * @return index of the next attribute of the attribute at attributeDeclIndex 286N/A }
// getNextAttributeDeclIndex 286N/A * @param attributeDeclIndex 286N/A * @param attributeDecl The values of this structure are set by this call. 286N/A * @return true if getAttributeDecl was able to fill in the value of attributeDecl 286N/A * Returns whether the given attribute is of type CDATA or not 286N/A * @param elName The element name. 286N/A * @param atName The attribute name. 286N/A * @return true if the attribute is of type CDATA 286N/A * @param entityDeclName 286N/A * @return the index of the EntityDecl 286N/A }
// getEntityDeclIndex 286N/A * @param entityDeclIndex 286N/A * @return true if getEntityDecl was able to fill entityDecl with the contents of the entity 286N/A * with index entityDeclIndex 286N/A * @param notationDeclName 286N/A * @return the index if found a notation with the name, otherwise -1. 286N/A }
// getNotationDeclIndex 286N/A * @param notationDeclIndex 286N/A * @return return true of getNotationDecl can fill notationDecl with information about 286N/A * the notation at notationDeclIndex. 286N/A * @param contentSpecIndex 286N/A * @return true if find the requested contentSpec node, false otherwise 286N/A * Returns the index to the content spec for the given element 286N/A * declaration, or <code>-1</code> if the element declaration 286N/A * getContentSpecAsString 286N/A * @param elementDeclIndex 286N/A // lookup content spec node 286N/A }
// getContentSpecAsString(int):String 286N/A // ", "+ elementDecl.contentModelValidator.toString()); 286N/A * Adds the content spec to the given element declaration. 286N/A * getElementContentModelValidator 286N/A * @param elementDeclIndex 286N/A * @return its ContentModelValidator if any. 286N/A // If we have one, just return that. Otherwise, gotta create one 286N/A // Get the type of content this element has 286N/A if ( contentSpecIndex == -1 ) 286N/A // And create the content model according to the spec type 286N/A // Just create a mixel content model object. This type of 286N/A // content model is optimized for mixed content validation. 286N/A // This method will create an optimal model for the complexity 286N/A // of the element's defined model. If its simple, it will create 286N/A // a SimpleContentModel object. If its a simple list, it will 286N/A // create a SimpleListContentModel object. If its complex, it 286N/A // will create a DFAContentModel object. 286N/A +
"in getElementContentModelValidator() in AbstractDTDGrammar class");
286N/A // Add the new model to the content model for this element 286N/A }
// getElementContentModelValidator(int):ContentModelValidator 286N/A * Create an XMLContentSpec for a single non-leaf 286N/A * @param nodeType the type of XMLContentSpec to create - from XMLContentSpec.CONTENTSPECNODE_* 286N/A * @param nodeValue handle to an XMLContentSpec 286N/A * @return handle to the newly create XMLContentSpec 286N/A // create content spec node 286N/A // set content spec node values 286N/A }
// addContentSpecNode(short,String):int 286N/A * create an XMLContentSpec for a leaf 286N/A * @param elementName the name (Element) for the node 286N/A * @return handle to the newly create XMLContentSpec 286N/A // create content spec node 286N/A // set content spec node values 286N/A }
// addUniqueLeafNode(String):int 286N/A * Create an XMLContentSpec for a two child leaf 286N/A * @param nodeType the type of XMLContentSpec to create - from XMLContentSpec.CONTENTSPECNODE_* 286N/A * @param leftNodeIndex handle to an XMLContentSpec 286N/A * @param rightNodeIndex handle to an XMLContentSpec 286N/A * @return handle to the newly create XMLContentSpec 286N/A // create content spec node 286N/A // set content spec node values 286N/A }
// addContentSpecNode(short,int,int):int 286N/A /** Initialize content model stack. */ 286N/A }
// initializeContentModelStack() 286N/A }
// appendContentSpec(XMLContentSpec.Provider,StringPool,XMLContentSpec,StringBuffer,boolean) 286N/A }
// printAttribute(int) 286N/A * When the element has a 'CHILDREN' model, this method is called to 286N/A * create the content model object. It looks for some special case simple 286N/A * models and creates SimpleContentModel objects for those. For the rest 286N/A * it creates the standard DFA style model. 286N/A // Get the content spec node for the element we are working on. 286N/A // This will tell us what kind of node it is, which tells us what 286N/A // kind of model we will try to create. 286N/A // let fall through to build a DFAContentModel 286N/A // Check that the left value is not -1, since any content model 286N/A // with PCDATA should be MIXED, so we should not have gotten here. 286N/A // Its a single leaf, so its an 'a' type of content model, i.e. 286N/A // just one instance of one element. That one is definitely a 286N/A // simple content model. 286N/A // Lets see if both of the children are leafs. If so, then it 286N/A // it has to be a simple content model 286N/A // Its a simple choice or sequence, so we can do a simple 286N/A // content model for it. 286N/A // Its a repetition, so see if its one child is a leaf. If so 286N/A // its a repetition of a single element, so we can do a simple 286N/A // content model for that. 286N/A // It is, so we can create a simple content model here that 286N/A // will check for this repetition. We pass -1 for the unused 286N/A // Its not a simple content model, so here we have to create a DFA 286N/A // for this element. So we create a DFAContentModel object. He 286N/A // encapsulates all of the work to create the DFA. 286N/A //int leafCount = countLeaves(contentSpecIndex); 286N/A // REVISIT: has to be fLeafCount because we convert x+ to x,x*, one more leaf 286N/A }
// createChildModel(int):ContentModelValidator 286N/A // We will build a node at this level for the new tree 286N/A //nodeRet = new CMAny(contentSpec.type, -1, fLeafCount++); 286N/A // If this node is a leaf, then its an easy one. We just add it 286N/A // Create a new leaf node, and pass it the current leaf count, 286N/A // which is its DFA state position. Bump the leaf count after 286N/A // storing it. This makes the positions zero based since we 286N/A // store first and then increment. 286N/A // Its not a leaf, so we have to recurse its left and maybe right 286N/A // nodes. Save both values before we recurse and trash the node. 286N/A // Recurse on both children, and return a binary op node 286N/A // with the two created sub nodes as its children. The node 286N/A // type is the same type as the source. 286N/A // And return our new node for this level 286N/A * Build a vector of valid QNames from Content Spec 286N/A * @param contentSpecIndex 286N/A * @exception RuntimeException 286N/A // Handle any and leaf nodes 286N/A // resize arrays, if needed 286N/A // save values and return length 286N/A // Its not a leaf, so we have to recurse its left and maybe right 286N/A // nodes. Save both values before we recurse and trash the node. 286N/A }
// contentSpecTree(int,XMLContentSpec,ChildrenList) 286N/A // Private static methods 286N/A * Children list for <code>contentSpecTree</code> method. 286N/A // NOTE: The following set of data is mutually exclusive. It is 286N/A // written this way because Java doesn't have a native 286N/A // union data structure. -Ac 286N/A /** Left and right children names. */ 286N/A /** Left and right children types. */ 286N/A }
// class ChildrenList 286N/A * A simple Hashtable implementation that takes a tuple (String, String) 286N/A * as the key and a int as value. 286N/A * @author Andy Clark, IBM 286N/A /** Initial bucket size (4). */ 286N/A // NOTE: Changed previous hashtable size from 512 to 101 so 286N/A // that we get a better distribution for hashing. -Ac 286N/A /** Hashtable size (101). */ 286N/A /** Associates the given value with the specified key tuple. */ 286N/A //System.out.println("put("+key+" -> "+value+')'); 286N/A //System.out.println("get("+key+") -> "+get(key)); 286N/A }
// put(int,String,String,int) 286N/A /** Returns the value associated with the specified key tuple. */ 286N/A }
// get(int,String,String) 286N/A }
// class QNameHashtable 286N/A //for unparsed entity notation!=null