{flexdoc-xml}/templates/XSDDoc/
'{flexdoc-xml}'
is FlexDoc/XML home directory or its archive.
The XSDDoc directory will be referred further simply as '{XSDDoc}'
.
Here, you will find two main templates:
The entire «XSDDoc» template set (version 2.9.5) consists of 67 templates.
{XSDDoc}/xsddoc.xmltype
1
|
xsddoc.name = W3C XML Schema Files
|
Line | Explanation |
---|---|
1 | The XML Type full name |
2 | A short description of the XML Type |
3 |
This setting is most important for the whole XML Type definition.
It specifies one or several XML schema files that provide the datatype information about
all data-source XML files possible to process by any template set based on
that XML Type.
In case ox XSDDoc, it is http://www.w3.org/2001/XMLSchema.xsd (i.e. “XML schema for XML Schemas”) and those possible data-source XML files are any XML schema (XSD) files themselves. See Also: Defining XML Type | Assigning XML Schemas | xsd.files |
4 |
The URI of an XML catalog that redirects the locations of the XSD files
(specified in line 3 as well as any other
XML schemas referenced from them) to some other locations, which may be easier to access.
The specified URI ( |
5 |
Indicates that all global types (i.e. xs:simpleType and xs:complexType )
defined in the XML schemas (line 3) should be exposed as
abstract element types.
In particular, this allows you to program in templates the searching and iterating elements not only by their XML names (directly found in XML files), but also by the element types associated with the elements according to the XML schemas. See Also: Defining XML Type | Assigning XML Schemas | xsd.includeAbstractTypes |
6-9 |
These lines specify all namespace prefixes used in XSDDoc templates.
Templates, like the XML files/documents they process, need to deal with namespace URIs, which are typically long character strings. Therefore, some shortcuts are needed to reference to particular namespaces. See Also: Defining XML Type | Assigning XML Schemas | Declaring Namespaces |
10 |
This setting says that, in addition to normal elements and attributes, all other nodes of
an XML document (i.e. DOM)
should be exposed as special elements (called
pseudo-elements).
This is needed to be able to program in templates the processing of entire XML file content, for instance, to fully reproduce it in the generated documentation together with the special formatting and hyperlinks. See Also: Defining XML Type | Pseudo-elements |
11 | Indicates that any processing should start from the #DOCUMENTS pseudo-element, which is created by the template interpreter to represent the list of all data-source XML files specified on the generator command-line for processing. That virtual element will be passed to any main template, as the template's root element, from which the processing of the template starts. That allows XSDDoc to process/document any number of XML schemas at once. See Also: Defining XML Type | Pseudo-elements | #DOCUMENTS |
12 |
Specify the name of the Element Image Provider.
Here “elements” mean not XML schema element components,
but rather elements of the XML document that describes the schema (that is the XSD file),
and “images” are diagrams,
which depict content models of XML schema components defined by some of those elements
(such as
«Element Image Provider» is actually a more technical name for
diagramming plugin, whose job is to generate those diagrams.
FlexDoc/XML currently includes a single diagramming plugin:
Since diagramming plugin is interchangeable, its name is specified not directly,
but via <xs:element> , <xs:complexType> and <xs:group> ).
'IMAGE_PROVIDER' macro.
That allows you to select a particular diagramming plugin externally on the Java command line of both
Generator and Template Designer.
See Also: |
13 |
Specify the file path, where any additional Java classes necessary for running the
Element Image Provider can be found.
This setting is particularly important when FlexDoc/XML runs in non-modular mode (e.g. from Maven). |
The screenshot on the left shows a part of the tree representation of the element types and
their attributes constructed by this XML Type definition (click on the picture to see a more expanded tree view).
On left the you can see how this template looks when open in the Template Designer (click to enlarge). On the right is a sample documentation generated with it (click to view the HTML):
![]() |
![]() |
The FramedDoc.tpl template is interpreted as follows:
The template communicates with the diagramming plugin using special FlexQuery functions and properties registered and provided by it.
What happens next depends on the particular plugin. It may call some external diagramming engine to generate all the diagrams immediately or keep the component information so as to generate each diagram on request (see FlexDoc/XML | Features | Element Images).'index.html'
).
That file starts the whole documentation to display particular HTML documents in three frame windows:
However, the initial content of the «Detail Frame»
may be overridden dynamically by the Javascript, which is inserted
in index.html
according the «HTML Head Expression»:
index.html
.
If the parameter exists, the detailFrame will be reloaded according to the new URL found in the parameter.
That allows you to construct URLs like this one:
which will open the frameset documentation directly on a specified page.
Below on the left you can see SingleDoc.tpl open in the Template Designer (click to enlarge). The selected is the Call Template section, which calls element.tpl to generate «Element Documentation» blocks. On the right are the selected section's properties, where the output into the same document is specified.
![]() |
![]() |
Here are a few screenshots of sample documentation generated with SingleDoc.tpl. The leftmost one shows a single-file HTML documentation (click to view the HTML). Others are pages of RTF documentation (click to enlarge):
![]() |
![]() |
![]() |
![]() |
XSDDoc is controlled by more than 400 external parameters. On the left screenshot below you can see the parameter definitions of FramedDoc.tpl. On the right is the Parameter Inspector built by those definitions (click to enlarge):
![]() |
![]() |
To make so many parameters manageable, they are organized in a tree. Also, the default values of many parameters are calculated dynamically from the values of other parameters and properties. This helps you with setting of lots related parameters. Just a few most important ones may need to be changed to achieve necessary effects.
Below you can see how doc.comp.diagram
parameter is defined
(which is the one selected in the left screenshot above). On the right is the FlexQuery expression
that calculates the default value of this parameter:
![]() |
![]() |
When the same parameter is defined in a subtemplate, it receives its value from the nearest equally named parameter in the template call chain. Such propagation of parameter values happens automatically. However, it can be overridden in any particular Call Template section, so as to pass different values (as well as the values of those parameters defined locally only in the called subtemplate), as it is shown in the screenshot below:
{XSDDoc}/lib
directory and its subdirectories.
Subtemplates are normal FlexDoc/XML templates. However, they are typically not designed to run directly from the generator as the main templates – that will cause an error or produce meaningless output.
Below is the summary of all subtemplates by directories:Directory/Template | Description |
---|---|
[lib] | general-purpose subtemplates |
about.tpl | Adds «About» section at the bottom of each separate output document. |
init.tpl |
This template produces no output. Instead, it is called only once from either FramedDoc.tpl or SingleDoc.tpl
main templates before any other processing starts.
The template's job is to load all XML schema files to be processed/documented (including those references from them directly or indirectly) and
to create all necessary element maps, which are essentially hash-maps. Element maps allow resolving very complicated queries.
They are used in almost everywhere in XSDDoc template set (including even in init.tpl itself) and are critical for working of everything.
|
overview-frame.tpl |
Generates an HTML document loaded in the «Overview Frame»,
which contains the primary navigation lists (such as the lists of namespaces and XML schemas that have been documented).
|
overview-summary.tpl |
Generates «Overview Summary» documentation page/block.
|
[lib/ann] |
subtemplates generating descriptions (by the content of <xs:annotation> elements)
|
annotation.tpl |
Generates full descriptions – the content of all «Annotation» sections. This includes
processing of any
XHTML markup specified within XML schema annotations.
|
firstSentence.tpl |
Generates reduced descriptions (the first sentence of the full ones) typically displayed in various summaries (XML schemas and component summaries).
|
[lib/attribute] |
subtemplates related to documenting attribute components (those specified in XML schema with <xs:attribute> elements)
|
contentAttributeList.tpl |
Generates «Content Model Attributes» section in items of element/complexType/attributeGroup summary
|
contentAttributes.tpl |
Generates «Attribute Detail» section.
|
globalAttribute.tpl |
Generates «Global Attribute Documentation» pages/blocks (i.e. «Component Documentation» for global attributes)
|
globalAttributeProfile.tpl | Generates «Component Profile» section for global attributes |
globalAttributeSummary.tpl | Generates «Global Attribute Summary» sections. |
[lib/component] | subtemplates involved in documenting of all types of components |
all-components-frame.tpl |
Generates «All Components» navigation page loaded in the «List Frame».
|
all-components-summary.tpl |
Generates «All Component Summary» page/block
|
componentName.tpl |
Generates the full name of a component, under which it appears in various lists and references. This includes:
|
componentLinkTitle.tpl |
Generates the text specified as title (tooltip) of component hyperlink. This provides addition information about the component,
which can be easily seen by moving the mouse cursor over the component name.
|
contentType.tpl | Generates a short description of the content represented by an element or complexType component, e.g.: simple, complex, mixed, empty |
xmlRep.tpl |
Generates «XML Representation Summary» sections
|
complexContentModel.tpl |
Generates «Element Content Model» sections within
«XML Representation Summary»
|
simpleContentRep.tpl |
Generates a short representation of simple content, like the following:
list of (xs:anyURI | ("##targetNamespace" | "##local"))
|
simpleContentDerivation.tpl |
Generates a section that shows how a simple content was derived, like on the following screenshot:
|
wildcard.tpl |
Generates a textual representation of an element/attribute wildcard
(specified in XML schema with <xs:any> and <xs:anyAttribute> elements).
That is used in
|
facet.tpl |
Generates «Facet Documentation» section.
|
[lib/diagramming] | subtemplates subtemplates related to the generation of diagrams) |
diagram.tpl |
Generates «Component Diagram» sections
|
DiagramKit.tpl |
DiagramKit service template
|
[lib/element] |
subtemplates related to documenting element components (those specified in XML schema with <xs:element> elements)
|
element.tpl |
Generates «Element Documentation» pages/blocks (i.e. «Component Documentation» for elements)
|
elementProfile.tpl |
Generates «Component Profile» section for element components.
|
elementBlockAttrInfo.tpl |
Generates «Block» section in profiles of global elements, which comes from the value of 'final' attribute specified in
<xs:element>
elements.
|
elementFinalAttrInfo.tpl |
Generates «Final» section in profiles of global elements, which comes from the value of 'final' attribute specified in
<xs:element>
elements.
|
substitutionGroupInfo.tpl |
Generates «Subst.Gr» section in profiles of global elements, which comes from 'substitutionGroup' attributes specified in
<xs:element>
elements.
|
contentElementList.tpl |
Generates sections:
|
contentElements.tpl |
Generates «Content Element Detail» sections.
|
elementSummary.tpl | Generates «Element Summary» sections. |
elementListNote.tpl |
Generates a subheading of element lists or summaries, which explains the scope of listed elements
(e.g. «global + local with complex types» or «local elements unified by type»)
|
localElementExt.tpl |
Generates the extensions of names of some local elements (with its own hylerlinks).
|
[lib/groups] |
subtemplates related to documenting global element/attribute group components
(those specified in XML schema with <xs:group> /<xs:attributeGroup> elements)
|
group.tpl |
Generates «Element Group Documentation» pages/blocks (i.e. «Component Documentation» for element groups)
|
groupProfile.tpl |
Generates «Component Profile» section for element groups
|
groupSummary.tpl | Generates «Element Group Summary» sections. |
attributeGroup.tpl |
Generates «Attribute Group Documentation» pages/blocks (i.e. «Component Documentation» for attribute groups)
|
attributeGroupProfile.tpl | Generates «Component Profile» section for attribute groups |
attributeGroupSummary.tpl | Generates «Attribute Group Summary» sections. |
[lib/images] | contains icons used in XML schema documentation |
[lib/namespace] | subtemplates related to documenting namespaces |
namespace-frame.tpl |
Generates «Namespace» navigation page loaded in the «List Frame».
|
namespace-overview.tpl |
Generates «Namespace Overview» pages/blocks
|
namespaceProfile.tpl |
Generates «Namespace Profile» sections
|
[lib/schema] | subtemplates related to documenting particular XML schema files (as a whole) |
schema-frame.tpl |
Generates «Schema» navigation pages loaded in the «List Frame».
|
schema-overview.tpl |
Generates «Schema Overview» pages/blocks
|
schema-source.tpl |
Generates «Schema XML Source» pages/sections
|
schemaName.tpl | Generates XML schema name, under which that schema appears in various lists and references. This includes also the hyperlink to «Schema Overview». |
schemaLinkTitle.tpl |
Generates the text specified as title (tooltip) of XML schema hyperlink. This provides addition information about the schema,
which can be easily seen by moving the mouse cursor over the schema link.
|
schemaProfile.tpl |
Generates «Schema Profile» sections
|
[lib/type] |
subtemplates related to documenting global (named) simple/complex types
(those specified in XML schema with <xs:simpleType> /<xs:complexType> elements)
|
complexType.tpl |
Generates «Complex Type Documentation» pages/blocks (i.e. «Component Documentation» for complex types)
|
simpleType.tpl |
Generates «Simple Type Documentation» pages/blocks (i.e. «Component Documentation» for simple types)
|
typeProfile.tpl | Generates «Component Profile» section for simple/complex types |
typeBlockAttrInfo.tpl |
Generates «Block» section in profiles of complex types, which comes from the value of 'block' attribute specified in
<xs:complexType>
elements.
|
typeFinalAttrInfo.tpl |
Generates «Final» section in profiles of simple/complex types, which comes from the value of 'final' attribute
specified in
<xs:simpleType> and
<xs:complexType>
elements.
|
typeRelatedCompLists.tpl |
Generates the following sections:
|
typeUsage.tpl |
Generates «Known Usage Locations» section.
|
typeDerivationTree.tpl |
Generates «Type Derivation Tree» section.
Type Derivation Tree graphically depicts how a given type was derived from all its know supertypes, which appear in the form of tree (that shows also the method by which each intermediate type was produced from its parent type): In case of derivation by union, the full supertype tree is too complicated, so it is reduced to a formula that shows only the ancestor types used directly in the declaration of the given type:
|
typeDerivationSummary.tpl |
Generates a summary of type derivation, which is added to the information about an anonymous type displayed in «Type» section of «Component Profile»,
like on this screenshot:
|
complexTypeSummary.tpl | Generates «Complex Type Summary» sections. |
simpleTypeSummary.tpl | Generates «Simple Type Summary» sections. |
[lib/xml] | subtemplates related to documenting/reproducing XML source of XML schemas |
nodeSource.tpl |
Reproduces XML source of a given XML document node
(that is a fragment of the document's full XML source corresponding to the document's W3C
DOM tree branch attached to the given node),
including hyperlinks from certain attribute values to the corresponding documentation details.
For example:
|
sourceNote.tpl |
Generates some extra information about the reproduced XML source,
which is displayed at the «XML Source» section heading, such as whether (and how many annotations)
were removed from it and the link to the location of this fragment within the full document source, like the following:
(w/o annotations (3); see within schema source)
|
documentSource.tpl |
Reproduces XML source of the whole XML document.
|
xmlns-bindings.tpl |
Generates «XML Namespace Bindings» page/block
|