|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.saxonica.schema.SchemaElement
|
+--com.saxonica.schema.AttributeGroup
|
+--com.saxonica.schema.AttributeGroupDecl
An XML Schema Attribute Group Declaration. This represents a named attribute group, but not an attribute group reference. As well as attribute groups explicitly written in the schema using xsl:attributeGroup, this class is also used to represent any collection of attributes defined using xsl:attribute elements as part of a complex type definition.
| Field Summary |
| Fields inherited from class com.saxonica.schema.SchemaElement |
ANNOTATION, ANYTYPE, APPINFO, ATTRIBUTE, ATTRIBUTE_GROUP, COMPLEX_CONTENT, COMPLEX_TYPE, COMPOSITOR, DOCUMENTATION, ELEMENT, FACET, GROUP, IDENTITY_FIELD, IDENTITY_SELECTOR, KEY, KEYREF, LIST, REDEFINE, SCHEMA, SIMPLE_CONTENT, SIMPLE_TYPE, UNION, UNIQUE, UNKNOWN, WILDCARD_ATTRIBUTE, WILDCARD_ELEMENT |
| Constructor Summary | |
AttributeGroupDecl(Schema schema)
Creates a new AttributeGroup definition. |
|
| Method Summary | |
void |
addAttribute(AttributeDecl attrDecl)
Adds the given attribute definition to this AttributeGroup. |
void |
addReference(AttributeGroupReference attrGroup)
Adds the given AttributeGroupReference to this AttributeGroup. |
boolean |
fixup(Schema schema)
Check references from this component to other components |
java.util.Iterator |
getAttributes()
Returns an Iterator over all the attributes of this attribute group. |
AttributeWildcard |
getAttributeWildcard()
Get the complete attribute wildcard used in this attribute group. |
java.util.Iterator |
getLocalAttributeGroupReferences()
Returns the AttributeGroup references contained locally in this attribute group. |
java.util.Iterator |
getLocalAttributes()
Returns the attributes defined locally in this attribute group. |
AttributeWildcard |
getLocalAttributeWildcard()
Get the local attribute wildcard used in this attribute group |
java.lang.String |
getName()
Returns the name of this AttributeGroup |
short |
getStructureType()
Returns the type of this Schema Structure |
boolean |
isEmpty()
Tests whether this AttributeGroup contains any AttributeDecls or any non-empty AttributeGroups |
boolean |
isValidRestriction(AttributeGroup base,
Schema schema)
Test whether this attribute group is a valid restriction of another attribute group. |
void |
lookForCycles(Schema schema,
java.util.Stack references)
Check for cycles in the attribute group. |
void |
setAnyAttribute(AttributeWildcard wildcard)
Sets the wildcard (anyAttribute) of this attribute Group. |
void |
setName(java.lang.String name)
Sets the name of this AttributeGroup |
void |
setRedefinedAttributeGroup(AttributeGroupDecl decl)
Set the attribute group that this one redefines (via xs:redefine). |
boolean |
validate(Schema schema)
Checks the validity of this Attribute declaration. |
| Methods inherited from class com.saxonica.schema.AttributeGroup |
getAttributeUse, getDeclaredAttributes, getFingerprint, getId, getSchema, setFingerprint, setId, setSchema |
| Methods inherited from class com.saxonica.schema.SchemaElement |
getColumnNumber, getLineNumber, getPublicId, getSystemId, setLocator |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AttributeGroupDecl(Schema schema)
schema - the Schema that this AttributeGroup
belongs to.| Method Detail |
public void addAttribute(AttributeDecl attrDecl)
attrDecl - the Attribute Declaration to addpublic void addReference(AttributeGroupReference attrGroup)
attrGroup - the AttributeGroupReference to addpublic java.util.Iterator getLocalAttributes()
AttributeDeclpublic java.util.Iterator getLocalAttributeGroupReferences()
AttributeGroupReferencepublic void setRedefinedAttributeGroup(AttributeGroupDecl decl)
decl - The AttributeDecl object that is redefined
public void lookForCycles(Schema schema,
java.util.Stack references)
throws SchemaException
lookForCycles in interface CircularityCheckerlookForCycles in class AttributeGroupschema - The containing schema, used for error reportingreferences - The attribute groups that contain direct or indirect references
to this attribute group
SchemaException - if a circularity is detected.public AttributeWildcard getLocalAttributeWildcard()
public AttributeWildcard getAttributeWildcard()
getAttributeWildcard in class AttributeGrouppublic java.util.Iterator getAttributes()
getAttributes in class AttributeGroupAttributeDecl objects.public boolean isEmpty()
public java.lang.String getName()
public void setAnyAttribute(AttributeWildcard wildcard)
public void setName(java.lang.String name)
name - the name of this AttributeGrouppublic short getStructureType()
getStructureType in class AttributeGroup
public boolean fixup(Schema schema)
throws SchemaException
SchemaComponent
fixup in interface SchemaComponentschema - The schema is used for reporting errors
SchemaException
public boolean validate(Schema schema)
throws javax.xml.transform.TransformerException
validate in interface SchemaComponentschema - the containing schema, used for error reporting
SchemaException - if this Attribute declaration
is invalid and the error listener chooses to treat the error
as fatal.
javax.xml.transform.TransformerException - if the ErrorListener decides that an error is fatal.
public boolean isValidRestriction(AttributeGroup base,
Schema schema)
throws SchemaException
base - the other attribute groupschema - the containing schema (used for reporting errors)
SchemaException - if an error is detected and the error listener
decides to treat the error as fatal.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||