All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sun.msv.grammar.relax.ElementRule Maven / Gradle / Ivy

There is a newer version: 2.2.5.1
Show newest version
/*
 * @(#)$Id: ElementRule.java,v 1.10 2003/06/09 20:37:18 kk122374 Exp $
 *
 * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
 * 
 * This software is the proprietary information of Sun Microsystems, Inc.  
 * Use is subject to license terms.
 * 
 */
package com.sun.msv.grammar.relax;

import com.sun.msv.grammar.ElementExp;
import com.sun.msv.grammar.Expression;
import com.sun.msv.grammar.ExpressionPool;
import com.sun.msv.grammar.NameClass;

/**
 * ElementRule declaration of RELAX.
 * 
 * @author Kohsuke KAWAGUCHI
 */
public class ElementRule extends ElementExp {
    
    /** constraints over start tag of the element */
    public final TagClause clause;
    
    /** Attribute-free content model */
    public final Expression attributeFreeContentModel;
    
    protected ElementRules parent;

    /** gets the parent ElementRules object.
     * 
     * when this object is used as a named, no-inline elementRule,
     * this variable holds a reference to the parent ElementRules object.
     * otherwise, null
     */
    public ElementRules getParent() { return parent; }
    
    public final NameClass getNameClass()    { return clause.nameClass; }
    
    public ElementRule( ExpressionPool pool, TagClause clause, Expression contentModel ) {
        super( pool.createSequence(clause,contentModel), true );
        this.clause = clause;
        this.attributeFreeContentModel = contentModel;
    }
    
    // serialization support
    private static final long serialVersionUID = 1;    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy