Package org.apache.xerces.impl.dtd.models

Examples of org.apache.xerces.impl.dtd.models.CMNode


    // this method is needed to convert a tree of ParticleDecl
    // nodes into a tree of content models that XSDFACM methods can then use as input.
    private final CMNode buildSyntaxTree(XSParticleDecl startNode) {

        // We will build a node at this level for the new tree
        CMNode nodeRet = null;
        if (startNode.fType == XSParticleDecl.PARTICLE_WILDCARD) {
            nodeRet = new XSCMLeaf(XSParticleDecl.PARTICLE_WILDCARD, startNode.fValue, fLeafCount++);
        }
        //
        //  If this node is a leaf, then its an easy one. We just add it
View Full Code Here


        //

        fLeafCount = 0;
        //int leafCount = countLeaves(contentSpecIndex);
        fLeafCount = 0;
        CMNode cmn    = buildSyntaxTree(contentSpecIndex, contentSpec);

        // REVISIT: has to be fLeafCount because we convert x+ to x,x*, one more leaf
        return new DFAContentModelcmn, fLeafCount, false);

    } // createChildModel(int):ContentModelValidator
View Full Code Here

    private final CMNode buildSyntaxTree(int startNode,
                                         XMLContentSpec contentSpec) {

        // We will build a node at this level for the new tree
        CMNode nodeRet = null;
        getContentSpec(startNode, contentSpec);
        if ((contentSpec.type & 0x0f) == XMLContentSpec.CONTENTSPECNODE_ANY) {
            //nodeRet = new CMAny(contentSpec.type, -1, fLeafCount++);
            nodeRet = new CMAny(contentSpec.type, (String)contentSpec.otherValue, fLeafCount++);
        }
View Full Code Here

        //

        fLeafCount = 0;
        //int leafCount = countLeaves(contentSpecIndex);
        fLeafCount = 0;
        CMNode cmn    = buildSyntaxTree(contentSpecIndex, contentSpec);

        // REVISIT: has to be fLeafCount because we convert x+ to x,x*, one more leaf
        return new DFAContentModelcmn, fLeafCount, isDTD(), false);

    } // createChildModel(int):ContentModelValidator
View Full Code Here

    private final CMNode buildSyntaxTree(int startNode,
                                         XMLContentSpec contentSpec) {

        // We will build a node at this level for the new tree
        CMNode nodeRet = null;
        getContentSpec(startNode, contentSpec);
        if ((contentSpec.type & 0x0f) == XMLContentSpec.CONTENTSPECNODE_ANY) {
            //nodeRet = new CMAny(contentSpec.type, -1, fLeafCount++);
            nodeRet = new CMAny(contentSpec.type, (String)contentSpec.otherValue, fLeafCount++);
        }
View Full Code Here

        //  for this element. So we create a DFAContentModel object. He
        //  encapsulates all of the work to create the DFA.
        //

        fLeafCount = 0;
        CMNode node = buildSyntaxTree(particle);
        return new XSDFACM(node, fLeafCount, isMixed);
    }
View Full Code Here

    // this method is needed to convert a tree of ParticleDecl
    // nodes into a tree of content models that XSDFACM methods can then use as input.
    private final CMNode buildSyntaxTree(XSParticleDecl startNode) {

        // We will build a node at this level for the new tree
        CMNode nodeRet = null;
        if (startNode.fType == XSParticleDecl.PARTICLE_WILDCARD) {
            nodeRet = new XSCMLeaf(startNode, fLeafCount++);
        }
        //
        //  If this node is a leaf, then its an easy one. We just add it
View Full Code Here

        //

        fLeafCount = 0;
        //int leafCount = countLeaves(contentSpecIndex);
        fLeafCount = 0;
        CMNode cmn    = buildSyntaxTree(contentSpecIndex, contentSpec);

        // REVISIT: has to be fLeafCount because we convert x+ to x,x*, one more leaf
        return new DFAContentModelcmn, fLeafCount, false);

    } // createChildModel(int):ContentModelValidator
View Full Code Here

    private final CMNode buildSyntaxTree(int startNode,
                                         XMLContentSpec contentSpec) {

        // We will build a node at this level for the new tree
        CMNode nodeRet = null;
        getContentSpec(startNode, contentSpec);
        if ((contentSpec.type & 0x0f) == XMLContentSpec.CONTENTSPECNODE_ANY) {
            //nodeRet = new CMAny(contentSpec.type, -1, fLeafCount++);
            nodeRet = new CMAny(contentSpec.type, (String)contentSpec.otherValue, fLeafCount++);
        }
View Full Code Here

    XSCMValidator createDFACM(XSParticleDecl particle) {
        fLeafCount = 0;
        fParticleCount = 0;
        // convert particle tree to CM tree
        CMNode node = buildSyntaxTree(particle);
        if (node == null)
            return null;
        // build DFA content model from the CM tree
        return new XSDFACM(node, fLeafCount);
    }
View Full Code Here

TOP

Related Classes of org.apache.xerces.impl.dtd.models.CMNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.