Package com.sun.tools.txw2

Examples of com.sun.tools.txw2.RELAXNGLoader$DatatypeLibraryLoader


            def.addChild(attGroupDecl(ag));
        }
    }

    public Leaf attGroupDecl(XSAttGroupDecl ag) {
        Define def = attGroups.get(ag);
        if(def==null) {
            def = grammar.get(ag.getName());
            attGroups.put(ag,def);
            attHolder(ag,def);
        }
View Full Code Here


        // TODO
        throw new UnsupportedOperationException();
    }

    public void define(String name, Combine combine, Leaf leaf, LocatorImpl locator, AnnotationsImpl annotations) throws BuildException {
        Define def = grammar.get(name);
        def.location = locator;

        if(combine==null || def.leaf==null) {
            def.leaf = leaf;
        } else {
View Full Code Here

            l.merge(particle(children[i]));
        return l;
    }

    public Leaf elementDecl(XSElementDecl e) {
        Element el = new Element(e.getLocator(),getQName(e),e.getType().apply(this));
        nodeSet.add(el);
        return el;
    }
View Full Code Here

    }

    public Leaf makeElement(NameClass nameClass, Leaf leaf, LocatorImpl locator, AnnotationsImpl annotations) throws BuildException {
        Leaf r = null;
        for( QName n : nameClass.listNames() ) {
            Leaf l = new Element(locator,n,leaf);
            if(r!=null)     r = r.merge(l);
            else            r = l;
        }
        if(r==null)     return new Empty(locator);
        return r;
View Full Code Here

    public Leaf particle(XSParticle particle) {
        return particle.getTerm().apply(this);
    }

    public Leaf empty(XSContentType empty) {
        return new Empty(empty.getLocator());
    }
View Full Code Here

    }

    public Leaf wildcard(XSWildcard wc) {
        // wildcard can be always written through the well-formedness method.
        // no need to generate anything for this.
        return new Empty(wc.getLocator());
    }
View Full Code Here

        return new Ref(mg.getLocator(),def);
    }

    public Leaf modelGroup(XSModelGroup mg) {
        XSParticle[] children = mg.getChildren();
        if(children.length==0return new Empty(mg.getLocator());

        Leaf l = particle(children[0]);
        for( int i=1; i<children.length; i++ )
            l.merge(particle(children[i]));
        return l;
View Full Code Here

    private final Grammar grammar = new Grammar();

    private XmlSchemaBuilder(XSSchemaSet xs,TxwOptions opts) {
        this.schemaSet = xs;
        grammar.addChild(new Empty(null));
        this.nodeSet = new NodeSet(opts,grammar);
        this.dtf = new DatatypeFactory(opts.codeModel);
    }
View Full Code Here

    public Leaf makeOneOrMore(Leaf leaf, LocatorImpl locator, AnnotationsImpl annotations) throws BuildException {
        return leaf;
    }

    public Leaf makeZeroOrMore(Leaf leaf, LocatorImpl locator, AnnotationsImpl annotations) throws BuildException {
        return leaf.merge(new Empty(locator));
    }
View Full Code Here

    public Leaf makeZeroOrMore(Leaf leaf, LocatorImpl locator, AnnotationsImpl annotations) throws BuildException {
        return leaf.merge(new Empty(locator));
    }

    public Leaf makeOptional(Leaf leaf, LocatorImpl locator, AnnotationsImpl annotations) throws BuildException {
        return leaf.merge(new Empty(locator));
    }
View Full Code Here

TOP

Related Classes of com.sun.tools.txw2.RELAXNGLoader$DatatypeLibraryLoader

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.