You can include fragments from a schema grammar file as figures with
<<sgfrag:sgfile:yoursection:xsdfile.xsd: Caption>>
The sgfile specifies the name of the file without the .sg extension.
The yoursection looks for
#sec(yoursection) foo #endsec(yoursection)
inside the schema grammar file and extracts the content (foo in this case).
The xsdfile.xsd specifies optional xsd file (see below).
THe Caption is the caption for the resultig figure.
If you want to render schema grammar fragments as underlying xsd, you can specify
<<pdflags: showsgasxsd=0> Display schema grammar as schema grammar. The default. <<pdflags: showsgasxsd=1> Includes the XSD file using DocBook or XML include <<pdflags: showsgasxsd=2> Inlines the contents of the XSD file