
com.saxonica.schema
Class Wildcard
java.lang.Object
|
+--com.saxonica.schema.SchemaElement
|
+--com.saxonica.schema.Wildcard
- All Implemented Interfaces:
- java.io.Serializable, javax.xml.transform.SourceLocator
- Direct Known Subclasses:
- AttributeWildcard, ElementWildcard
- public abstract class Wildcard
- extends SchemaElement
A class that represents an XML Schema Wildcard.
A wilcard is represented by the XML elements and
and can be hold in a complexType or in
a Group ().
- See Also:
- Serialized Form
| 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 |
|
Method Summary |
void |
addNamespace(java.lang.String namespace)
Add a permitted namespace. |
boolean |
allowsAny()
Determine whether this wildcard allows any namespace (##any) |
java.util.Iterator |
getAllowedNamespaces()
Returns an enumeration that contains the permitted namespaces
of this wildcard |
java.lang.String |
getDisallowedNamespace()
Get the disallowed namespace. |
java.lang.String |
getProcessContents()
Returns the processContents attribute of this wildcard |
boolean |
isIntensionalSubset(Wildcard sup)
Determine whether this wildcard is an intensional subset of another wildcard. |
boolean |
matches(java.lang.String uri)
Determine whether a particular namespace is allowed |
void |
setDisallowedNamespace(java.lang.String namespace)
Set the disallowed namespace. |
void |
setNoNamespacesAllowed()
Initialize the set of permitted namespaces to an empty list. |
protected void |
setParent(SchemaElement parent)
Sets the parent for this Particle. |
void |
setProcessContents(java.lang.String process)
Sets the processContents attribute of the wildCard. |
java.lang.String |
toString()
Get a string representation of this wildcard, used for diagnostics |
boolean |
validate(Schema schema)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Wildcard
public Wildcard()
allowsAny
public final boolean allowsAny()
- Determine whether this wildcard allows any namespace (##any)
setNoNamespacesAllowed
public void setNoNamespacesAllowed()
- Initialize the set of permitted namespaces to an empty list. This
is needed in case the namespace attribute is present but empty;
it indicates that no namespaces are allowed.
addNamespace
public void addNamespace(java.lang.String namespace)
- Add a permitted namespace. This must be an actual namespace, not one of
the special tokens such as ##other. Validation of the namespace is the
responsibility of the caller.
- Parameters:
namespace - the namespace to add
setDisallowedNamespace
public void setDisallowedNamespace(java.lang.String namespace)
- Set the disallowed namespace. This corresponds to the option ##other.
getDisallowedNamespace
public java.lang.String getDisallowedNamespace()
- Get the disallowed namespace. Returns null if there is no disallowed namespace.
matches
public boolean matches(java.lang.String uri)
- Determine whether a particular namespace is allowed
- Parameters:
uri - the namespace to be tested. Supply "" for the null namespace.
- Returns:
- true if the wildcard allows this namespace, false if not.
getAllowedNamespaces
public java.util.Iterator getAllowedNamespaces()
- Returns an enumeration that contains the permitted namespaces
of this wildcard
- Returns:
- an enumeration that contains the permitted namespaces
of this wildcard, or null if the wildcard uses the ##any or ##other options
getProcessContents
public java.lang.String getProcessContents()
- Returns the processContents attribute of this wildcard
- Returns:
- the processContents attribute of this wildcard, as a string
("strict", "lax", or "skip")
setProcessContents
public void setProcessContents(java.lang.String process)
- Sets the processContents attribute of the wildCard. For internal use only.
- Parameters:
process - the processContents value to set (e.g. "strict", "lax").
Validation of the value is the responsibility of the caller.
validate
public boolean validate(Schema schema)
throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
setParent
protected void setParent(SchemaElement parent)
- Sets the parent for this Particle.
- Parameters:
parent - the parent Structure for this Particle
toString
public java.lang.String toString()
- Get a string representation of this wildcard, used for diagnostics
- Overrides:
toString in class java.lang.Object
isIntensionalSubset
public boolean isIntensionalSubset(Wildcard sup)
- Determine whether this wildcard is an intensional subset of another wildcard.
See Schema Part 1 Schema Component Constraint: Wildcard Subset (section 3.10.6)
Stylus Studio features integrated development and debugging support for Saxon in the XQuery editor and XSLT editor.