com.saxonica.schema
Class SchemaModelSerializer

java.lang.Object
  extended by com.saxonica.schema.SchemaModelSerializer

public class SchemaModelSerializer
extends Object

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


Constructor Summary
SchemaModelSerializer(Configuration config, Receiver out)
          Create a SchemaModelSerializer
 
Method Summary
 void declareNamespace(String prefix, String uri)
           
 void emitAttribute(String attributeName, String value)
           
 void emitNamespaceContext(NamespaceResolver resolver)
           
 void emitTypedValue(Value 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(Value value)
                    throws XPathException
Throws:
XPathException

getTypeLink

public String getTypeLink(SchemaType type)


Copyright (c) Saxonica Limited. All rights reserved.