Package com.saxonica.ee.schema
Class SchemaModelSerializer
- java.lang.Object
-
- com.saxonica.ee.schema.SchemaModelSerializer
-
public class SchemaModelSerializer extends java.lang.ObjectThis 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 voiddeclareNamespace(java.lang.String prefix, java.lang.String uri)voidemitAttribute(java.lang.String attributeName, java.lang.String value)voidemitNamespaceContext(NamespaceResolver resolver)voidemitTypedValue(AtomicSequence value)voidendElement()java.lang.StringgetId(SchemaComponent component, boolean forSelf)java.lang.StringgetTypeLink(SchemaType type)voidserialize()Export the pre-compiled schema components in this configuration to the specified ReceivervoidsetIsSerialized(SerializableSchemaComponent component)voidstartElement(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 XPathExceptionExport 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)
-
declareNamespace
public void declareNamespace(java.lang.String prefix, java.lang.String 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)
-
-