Package com.saxonica.ee.schema
Class SchemaModelSerializer
- java.lang.Object
-
- com.saxonica.ee.schema.SchemaModelSerializer
-
public class SchemaModelSerializer extends java.lang.Object
This class provides services enabling a compiled schema to be serialized to disk
-
-
Constructor Summary
Constructors Constructor Description SchemaModelSerializer(Configuration config, Receiver out)
Create a SchemaModelSerializer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
declareNamespace(java.lang.String prefix, NamespaceUri uri)
void
emitAttribute(java.lang.String attributeName, java.lang.String value)
void
emitNamespaceContext(NamespaceResolver resolver)
void
emitTypedValue(AtomicSequence value)
void
endElement()
java.lang.String
getId(SchemaComponent component, boolean forSelf)
java.lang.String
getTypeLink(SchemaType type)
void
serialize()
Export the pre-compiled schema components in this configuration to the specified Receivervoid
setIsSerialized(SerializableSchemaComponent component)
void
startElement(java.lang.String elementName)
-
-
-
Constructor Detail
-
SchemaModelSerializer
public SchemaModelSerializer(Configuration config, Receiver out)
Create a SchemaModelSerializer- Parameters:
config
- the Saxon Configuration. This must be a schema-aware configurationout
- the receiver to which the compiled schema document will be written- Throws:
java.lang.IllegalArgumentException
- if the configuration is not schema-aware
-
-
Method Detail
-
serialize
public void serialize() throws XPathException
Export the pre-compiled schema components in this configuration to the specified Receiver- Throws:
XPathException
- if any failure occurs
-
startElement
public void startElement(java.lang.String elementName) throws XPathException
- Throws:
XPathException
-
endElement
public void endElement() throws XPathException
- Throws:
XPathException
-
emitNamespaceContext
public void emitNamespaceContext(NamespaceResolver resolver) throws XPathException
- Throws:
XPathException
-
declareNamespace
public void declareNamespace(java.lang.String prefix, NamespaceUri uri) throws XPathException
- Throws:
XPathException
-
emitAttribute
public void emitAttribute(java.lang.String attributeName, java.lang.String value) throws XPathException
- Throws:
XPathException
-
setIsSerialized
public void setIsSerialized(SerializableSchemaComponent component)
-
getId
public java.lang.String getId(SchemaComponent component, boolean forSelf)
-
emitTypedValue
public void emitTypedValue(AtomicSequence value) throws XPathException
- Throws:
XPathException
-
getTypeLink
public java.lang.String getTypeLink(SchemaType type)
-
-