Pruning an XML Schema

You can prune an XML schema so that it includes only the element and attribute definitions that are required to define a specified root element.

Pruning a schema may speed up processing if it contains unused declarations. You can prune schemas using the XML Editor or the XSD Viewer.

  1. Do one of the following:
    Option Description
    If the schema is not open in the XML Editor or XSD Viewer Open the schema in the XSD Viewer.
    If the schema is already open in the XML Editor Save any changes.
  2. Do one of the following:
    If you are using the Action
    XML Editor Select XML > Extract XML Schema Subset.
    XSD Viewer Select Schema > Extract XML Schema Subset.
  3. Select the root element for the new subset and click OK. The truncated schema appears in a new XML Editor window.
    Note: Generated documents are read-only and are not created in the file system. To create a persistent copy, select File > Save As to save them to disk. You can edit the text after saving to disk.
Related concepts
XML Editor Outline View
Related tasks
Setting XML Editor Preferences
Configuring XML File Associations
Validating an XML Document Instance
Generating an XML Schema from a Document Instance
Generating an Instance Document for an XML Schema

For product-related issues, contact Sybase Technical Support at 1-800-8SYBASE. Send your feedback on this help topic directly to Sybase Technical Publications: pubs@sybase.com