|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.saxonica.schema.SchemaStructure com.saxonica.schema.Wildcard
public class Wildcard
A class that represents an XML Schema Wildcard. This is a helper class used to support the two distinct but similar schema components ElementWildcard and AttributeWildcard. A wilcard is represented by the XML elements xs:any and xs:anyAttribute
Field Summary |
---|
Fields inherited from interface net.sf.saxon.type.SchemaComponent |
---|
FIXED_UP, INCOMPLETE, INVALID, UNVALIDATED, VALIDATED, VALIDATING |
Constructor Summary | |
---|---|
Wildcard()
|
Method Summary | |
---|---|
void |
addAllowedNamespace(String namespace)
Add a permitted namespace. |
boolean |
allowsAny()
Determine whether this wildcard allows any namespace (##any) |
Iterator |
getAllowedNamespaces()
Returns an enumeration that contains the permitted namespaces of this wildcard |
String |
getDisallowedNamespace()
Get the disallowed namespace. |
String |
getProcessContents()
Returns the processContents attribute of this wildcard |
boolean |
isInexpressible()
Determine whether this wildcard represents an "inexpressible" intersection or union |
boolean |
isIntensionalSubset(Wildcard sup)
Determine whether this wildcard is an intensional subset of another wildcard. |
static boolean |
isNotStronger(String str1,
String str2)
Test whether one processContents value is <= the strength of another, where skip < lax < strict |
static Wildcard |
makeIntersection(Wildcard wat1,
Wildcard wat2)
Create an AttributeWildcard as the intersection of two AttributeWildcards. |
static Wildcard |
makeUnion(Wildcard wat1,
Wildcard wat2)
Create a AttributeWildcard as the union of two AttributeWildcards. |
boolean |
matches(String uri)
Determine whether a particular namespace is allowed by this wildcard |
boolean |
overlaps(Wildcard other)
Determine whether this wildcard overlaps another wildcard, that is, whether there is an element that could match either. |
void |
serialize(SchemaModelSerializer serializer)
Serialize this schema component |
void |
setDisallowedNamespace(String namespace)
Set the disallowed namespace. |
void |
setNoNamespacesAllowed()
Initialize the set of permitted namespaces to an empty set. |
void |
setProcessContents(String process)
Sets the processContents attribute of the wildCard. |
String |
toString()
Get a string representation of this wildcard, used for diagnostics |
boolean |
validate(SchemaCompiler compiler)
Perform validation on this wildcard (this implementation of the method is a no-op) |
Methods inherited from class com.saxonica.schema.SchemaStructure |
---|
elaborate, fixup, 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 |
Methods inherited from interface net.sf.saxon.type.SchemaComponent |
---|
getValidationStatus |
Constructor Detail |
---|
public Wildcard()
Method Detail |
---|
public boolean isInexpressible()
public final boolean allowsAny()
public void setNoNamespacesAllowed()
public void addAllowedNamespace(String namespace)
namespace
- the namespace to addpublic void setDisallowedNamespace(String namespace)
public String getDisallowedNamespace()
public boolean matches(String uri)
uri
- the namespace to be tested. Supply "" for the null namespace.
public Iterator getAllowedNamespaces()
public String getProcessContents()
public void setProcessContents(String process)
process
- the processContents value to set (e.g. "strict", "lax").
Validation of the value is the responsibility of the caller.public boolean validate(SchemaCompiler compiler) throws SchemaException
SchemaException
public String toString()
toString
in class Object
public boolean isIntensionalSubset(Wildcard sup)
public boolean overlaps(Wildcard other)
public static boolean isNotStronger(String str1, String str2)
str1
- the first processContents value, as a stringstr2
- the second processContents value, as a string
public static Wildcard makeIntersection(Wildcard wat1, Wildcard wat2)
wat1
- the first operand: the processContents is taken from this operandwat2
- the second operand
public static Wildcard makeUnion(Wildcard wat1, Wildcard wat2)
wat1
- the first operand: the processContents is taken from this operandwat2
- the second operand
public void serialize(SchemaModelSerializer serializer) throws XPathException
serialize
in interface SerializableSchemaComponent
XPathException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |