Sample: SCMPrint

SCMPrint

SCMPrint shows how to access the Schema Content Model information.

Running SCMPrint

This program parses the specified XSD file, then shows how to access the Schema Content Model information.

    Usage:
        SCMPrint [options] <XSD file | List file>

    This program loads XML Schema file(s), to show how one can
    access the Schema Content Model information.

    Options:
        -f     Enable full schema constraint checking processing. Defaults to off.
        -l     Indicate the input file is a List File that has a list of XSD files.
               Default to off (Input file is a XSD file).
        -?     Show this help.

Here is some sample output from SCMPrint (as the output is verbose it has been truncated)

    cd &XercesC3InstallDir;/samples/data
    SCMPrint personal.xsd

    ********** Printing out information from Schema **********

    Processing Namespace:
    ============================================

    Name:			personnel
    Component Type:	Element
    Content Model
    	Type:	Complex
    	Name:	C0

    --------------------------------------------
    Name:			person
    Component Type:	Element
    Content Model
    	Type:	Complex
    	Name:	C1

    --------------------------------------------
    Name:			name
    Component Type:	Element
    Content Model
    	Type:	Complex
    	Name:	C2

    --------------------------------------------
    Name:			family
    Component Type:	Element
    Content Model
    	Type:	Complex
    	Name:	C3

    --------------------------------------------
    Name:			given
    Component Type:	Element
    Content Model
    	Type:	Complex
    	Name:	C4

    --------------------------------------------
    Name:			email
    Component Type:	Element
    Content Model
    	Type:	Simple
    	Name:	string

    --------------------------------------------
    Name:			url
    Component Type:	Element
    Content Model
    	Type:	Complex
    	Name:	C5

    --------------------------------------------
    Name:			link
    Component Type:	Element
    Content Model
    	Type:	Complex
    	Name:	C6

    --------------------------------------------
    Processing Namespace:   http://www.w3.org/2001/XMLSchema
    ============================================

    no elements

    Name:			http://www.w3.org/2001/XMLSchema, anyType
    Component Type:	Type Definition
    Category:		Complex
    Base:			anyType
    Content Model:	(* (wildcard))

    ...