public class MSVValidator extends Object implements XMLSerializer, com.sun.msv.grammar.IDContextProvider
| Modifier and Type | Field and Description |
|---|---|
static String |
DUMMY_ELEMENT_NS
Deprecated.
namespace URI of dummy elements.
|
| Modifier and Type | Method and Description |
|---|---|
void |
childAsAttributeBodies(XMLSerializable o)
Deprecated.
This method is called when an XMLSerializable object is found
while the marshaller is in the "attribute body" mode (i.e.
|
void |
childAsAttributes(XMLSerializable o)
Deprecated.
This method is called when an XMLSerializable object is found
while the marshaller is in the "attribute" mode (i.e.
|
void |
childAsElements(XMLSerializable o)
Deprecated.
This method is called when an XMLSerializable object is found
while the marshaller is in the "element" mode (i.e.
|
void |
endAttribute()
Deprecated.
|
void |
endAttributes()
Deprecated.
Switches to the mode to marshal child texts/elements.
|
void |
endElement()
Deprecated.
Ends marshalling of an element.
|
String |
getBaseUri()
Deprecated.
|
NamespaceContext2 |
getNamespaceContext()
Deprecated.
Obtains a namespace context object, which is used to
declare/obtain namespace bindings.
|
boolean |
isNotation(String notation)
Deprecated.
|
boolean |
isUnparsedEntity(String entityName)
Deprecated.
|
void |
onID(org.relaxng.datatype.Datatype dt,
String s)
Deprecated.
|
String |
onID(String value)
Deprecated.
Notifies the serializer that an ID value has just marshalled.
|
String |
onIDREF(String value)
Deprecated.
Notifies the serializer that an IDREF value has just marshalled.
|
void |
reportError(ValidationEvent e)
Deprecated.
Errors detected by the XMLSerializable should be either thrown
as
SAXException or reported through this method. |
String |
resolveNamespacePrefix(String prefix)
Deprecated.
|
void |
startAttribute(String uri,
String local)
Deprecated.
Starts marshalling of an attribute.
|
void |
startElement(String uri,
String local)
Deprecated.
Starts marshalling of an element.
|
void |
text(String text)
Deprecated.
Marshalls text.
|
static void |
validate(com.sun.xml.bind.validator.ValidationContext context,
ValidatableObject vo)
Deprecated.
Validates the specified object and reports any error to the context.
|
public static final String DUMMY_ELEMENT_NS
public NamespaceContext2 getNamespaceContext()
XMLSerializergetNamespaceContext in interface XMLSerializerpublic static void validate(com.sun.xml.bind.validator.ValidationContext context,
ValidatableObject vo)
throws SAXException
SAXExceptionpublic void endAttributes()
throws SAXException
XMLSerializerendAttributes in interface XMLSerializerSAXExceptionpublic final void text(String text) throws SAXException
XMLSerializerThis method can be called (i) after the startAttribute method and (ii) before the endAttribute method, to marshal attribute values. If the method is called more than once, those texts are considered as separated by whitespaces. For example,
c.startAttribute();
c.text("abc");
c.text("def");
c.endAttribute("","foo");
will generate foo="abc def".
Similarly, this method can be called after the endAttributes method to marshal texts inside elements. The same rule about multiple invokations apply to this case, too. For example,
c.startElement("","foo");
c.endAttributes();
c.text("abc");
c.text("def");
c.startElement("","bar");
c.endAttributes();
c.endElement();
c.text("ghi");
c.endElement();
will generate <foo>abc def<bar/>ghi</foo>.text in interface XMLSerializerSAXExceptionpublic void startAttribute(String uri, String local)
XMLSerializerstartAttribute in interface XMLSerializerpublic void endAttribute()
throws SAXException
endAttribute in interface XMLSerializerSAXExceptionpublic void startElement(String uri, String local) throws SAXException
XMLSerializerstartElement in interface XMLSerializerSAXExceptionpublic void endElement()
throws SAXException
XMLSerializerendElement in interface XMLSerializerSAXExceptionpublic void childAsAttributes(XMLSerializable o) throws SAXException
XMLSerializerchildAsAttributes in interface XMLSerializerSAXExceptionpublic void childAsElements(XMLSerializable o) throws SAXException
XMLSerializerchildAsElements in interface XMLSerializerSAXExceptionpublic void childAsAttributeBodies(XMLSerializable o) throws SAXException
XMLSerializerchildAsAttributeBodies in interface XMLSerializerSAXExceptionpublic void reportError(ValidationEvent e) throws AbortSerializationException
XMLSerializerSAXException or reported through this method.
The callee should report an error to the client application
andreportError in interface XMLSerializerAbortSerializationExceptionpublic String onID(String value) throws SAXException
XMLSerializeronID in interface XMLSerializerSAXExceptionpublic String onIDREF(String value) throws SAXException
XMLSerializeronIDREF in interface XMLSerializerSAXExceptionpublic String getBaseUri()
getBaseUri in interface org.relaxng.datatype.ValidationContextpublic boolean isUnparsedEntity(String entityName)
isUnparsedEntity in interface org.relaxng.datatype.ValidationContextpublic boolean isNotation(String notation)
isNotation in interface org.relaxng.datatype.ValidationContextpublic void onID(org.relaxng.datatype.Datatype dt,
String s)
onID in interface com.sun.msv.grammar.IDContextProviderCopyright © 2025 Oracle Corporation. All rights reserved.