com.saxonica.schema
Class AttributeWildcard

java.lang.Object
  extended by com.saxonica.schema.SchemaStructure
      extended by com.saxonica.schema.Wildcard
          extended by com.saxonica.schema.AttributeWildcard
All Implemented Interfaces:
SerializableSchemaComponent, Serializable, SourceLocator

public class AttributeWildcard
extends Wildcard

This class represents an xs:anyAttribute element in the schema.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.saxonica.schema.SerializableSchemaComponent
ALL_COMPOSITOR, ATOMIC_TYPE, ATTRIBUTE_DECL, ATTRIBUTE_GROUP, ATTRIBUTE_GROUP_REF, ATTRIBUTE_USE, ATTRIBUTE_WILDCARD, CHOICE_COMPOSITOR, COMPLEX_TYPE, ELEMENT_DECL, ELEMENT_PARTICLE, ELEMENT_WILDCARD, FACET, KEY, KEYREF, LIST_TYPE, MODEL_GROUP, MODEL_GROUP_REF, NOTATION, SEQUENCE_COMPOSITOR, UNION_TYPE, UNIQUE
 
Constructor Summary
AttributeWildcard()
           
 
Method Summary
 int getComponentTypeCode()
          Get a unique number identifying the type of component
 boolean isInexpressible()
          Determine whether this wildcard represents an "inexpressible" intersection or union
static AttributeWildcard makeIntersection(AttributeWildcard wat1, AttributeWildcard wat2)
          Create an AttributeWildcard as the intersection of two AttributeWildcards.
static AttributeWildcard makeUnion(AttributeWildcard wat1, AttributeWildcard wat2)
          Create a AttributeWildcard as the union of two AttributeWildcards.
 void serialize(SchemaSerializer serializer)
          Serialize the schema component
 boolean validate(SchemaCompiler compiler)
          Validate that this AttributeWildcard obeys the schema consistency rules.
 
Methods inherited from class com.saxonica.schema.Wildcard
addNamespace, allowsAny, getAllowedNamespaces, getDisallowedNamespace, getProcessContents, isIntensionalSubset, isNotStronger, matches, overlaps, setDisallowedNamespace, setNoNamespacesAllowed, setProcessContents, toString
 
Methods inherited from class com.saxonica.schema.SchemaStructure
getColumnNumber, getConfiguration, getFixupStatus, getLineNumber, getPublicId, getSystemId, getValidationStatus, lookForCycles, setConfiguration, setFixupStatus, setLineNumber, setLocator, setSystemId, setValidationStatus
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeWildcard

public AttributeWildcard()
Method Detail

isInexpressible

public boolean isInexpressible()
Determine whether this wildcard represents an "inexpressible" intersection or union

Returns:
true if the intersection or union is inexpressible, as defined in XML Schema. This is essentially an error condition, so the wildcard should not be used if this property is true.

makeIntersection

public static AttributeWildcard makeIntersection(AttributeWildcard wat1,
                                                 AttributeWildcard wat2)
Create an AttributeWildcard as the intersection of two AttributeWildcards. For internal use only.

Parameters:
wat1 - the first operand: the processContents is taken from this operand
wat2 - the second operand
Returns:
a new AttributeWildcard representing the intersection, as defined in Schema Component Constraint: Attribute Wildcard Intersection; if the intersection "is not expressible" this will be flagged as such, for later rejection by the validator.

makeUnion

public static AttributeWildcard makeUnion(AttributeWildcard wat1,
                                          AttributeWildcard wat2)
Create a AttributeWildcard as the union of two AttributeWildcards. For internal use only.

Parameters:
wat1 - the first operand: the processContents is taken from this operand
wat2 - the second operand
Returns:
a new AttributeWildcard representing the intersection, as defined in Schema Component Constraint: Attribute Wildcard Union; if the union "is not expressible" then the result will be marked as such, for later use by the validator.

validate

public boolean validate(SchemaCompiler compiler)
                 throws SchemaException
Validate that this AttributeWildcard obeys the schema consistency rules. Any errors are notified to the ErrorListener, and result in the method returning false.

Overrides:
validate in class Wildcard
Parameters:
compiler - used for error reporting
Returns:
false if any errors were found, true if everything is OK
Throws:
SchemaException - if the error listener decided to treat the error as fatal.

serialize

public void serialize(SchemaSerializer serializer)
               throws IOException
Serialize the schema component

Throws:
IOException

getComponentTypeCode

public int getComponentTypeCode()
Get a unique number identifying the type of component



Copyright (C) Michael H. Kay. All rights reserved.