com.saxonica.schema

## Class SchemaModelSerializer

- java.lang.Object
- - com.saxonica.schema.SchemaModelSerializer

-     public class SchemaModelSerializer
      extends Object

  This class provides services enabling a compiled schema to be serialized to disk

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SchemaModelSerializer(Configuration config, Receiver out)` Create a SchemaModelSerializer

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `declareNamespace(String prefix, String uri)`
    `void` | `emitAttribute(String attributeName, String value)`
    `void` | `emitNamespaceContext(NamespaceResolver resolver)`
    `void` | `emitTypedValue(AtomicSequence value)`
    `void` | `endElement()`
    `String` | `getId(SchemaComponent component, boolean forSelf)`
    `String` | `getTypeLink(SchemaType type)`
    `void` | `serialize()` Export the pre-compiled schema components in this configuration to the specified Receiver
    `void` | `setIsSerialized(SchemaComponent component)`
    `void` | `startElement(String elementName)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SchemaModelSerializer

          public SchemaModelSerializer(Configuration config,
                               Receiver out)

      Create a SchemaModelSerializer
      Parameters:
        `config` - the Saxon Configuration. This must be a schema-aware configuration
        `out` - the receiver to which the compiled schema document will be written
      Throws:
        `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(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(String prefix,
                              String uri)
                                throws XPathException

      Throws:
        `XPathException`

    - #### emitAttribute

          public void emitAttribute(String attributeName,
                           String value)
                             throws XPathException

      Throws:
        `XPathException`

    - #### setIsSerialized

          public void setIsSerialized(SchemaComponent component)

    - #### getId

          public String getId(SchemaComponent component,
                     boolean forSelf)

    - #### emitTypedValue

          public void emitTypedValue(AtomicSequence value)
                              throws XPathException

      Throws:
        `XPathException`

    - #### getTypeLink

          public String getTypeLink(SchemaType type)

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.