FlexDoc/XML - XSDDoc - Documentation Structure
1. Main Blocks
The documentation generated by the «XSDDoc» template set is built of large independent main blocks of the following types:- Overview Summary
- All Component Summary
- Namespace Overview
- Schema Overview
- Component Documentation
- XML Namespace Bindings
Overview Summary
This page/block is generated only once for the entire documentation. It includes:-
The general description for the whole documentation.
See the parameter group: Literal Input | General Description
- The summary of namespaces
- The summary of all XML schemas documented
Related parameters:
- Generate Details | Overview – whether to generate the Overview Summary
- Details | Overview – customize the Overview Summary's content
- Pagination | Start from new page | Overview – in case of single-file documentation
All Component Summary
This page/block can be generated once. It contains the summary of all XSD components throughout all processed XML schemas.Related parameters:
- Generate Details | All Components – whether to generate the All Component Summary
- Details | All Components – customize the All Component Summary's content
- Pagination | Start from new page | All Components – in case of single-file documentation
Namespace Overview
This page/block can be generated for each documented namespace. It includes:- The summary of all XML schemas and targeting that namespace
- The summary of all XSD components defined in that namespace
Related parameters:
- Generate Details | Namespace – whether to generate Namespace Overviews
- Details | Namespace – customize the Namespace Overview content
- Pagination | Start from new page | Namespaces – in case of single-file documentation
- Generate Details | Sorting | Namespaces – controls how namespaces are sorted throughout the whole documentation
Schema Overview
This page/block can be generated for each processed XML schema. It may includes:- The general information about this XML schema (file name, profile)
- The description (collected by all annotations of
<xs:schema>
element) - The summary of all XSD components found in this schema
The generation of the XML Schema source is controlled by the following parameters:
- Details | Schema | XML Source – specify whether to reproduce the full schema XML source
- Details | Schema | XML Source | Separate File – specify if the XML source must generated as separate page/block
- Pagination | Start from new page | Schema | XML Source (in SingleDoc.tpl) – specify whether the repoduced XML schema source should start from a new page
- Generate Details | Schema – whether to generate the Schema Overviews
- Details | Schema – customize the Schema Overview content
- Pagination | Start from new page | Schemas – in case of single-file documentation
- Generate Details | Sorting | Namespaces – controls how XML schema are sorted throughout the whole documentation
Component Documentation
This page/block can be generated for each XSD components of the following types:- Global/Local Elements
- Global Attributes
- Global Simple/Complex Types
- Global Element/Attribute Groups
Related parameters:
- Generate Details | Components – whether to generate the Component Documentation
- Details | Component – customize the Component Documentation content
- Pagination | Start from new page | Components – in case of single-file documentation
- Generate Details | Sorting | Components – controls how XSD components are sorted throughout the whole documentation
XML Namespace Bindings
This page/block is a special report, which can be generated only once. It lists all- All namespace prefixes used in the source XSD files along with all namespace URIs bound to them.
- All namespace URIs used in the source XSD files along with all namespace prefixes bound to each URI.
- The exact locations where each namespace binding is specified.
The showing of namespace prefixes in the component names can be disabled, which is controlled by the parameter: Show | Namespace Prefixes
- Generate Details | XML Namespace Bindings – whether to generate the XML Namespace Bindings page/block
- Pagination | Start from new page | XML Namespace Bindings – in case of single-file documentation
2. Framed HTML Documentation
This kind of documentation is generated by the FramedDoc.tpl main template. In that case, the result documentation forms a simply dynamic HTML app. The HTML browser window is divided into three frames as show on the screenshot:
Frame | Purpose | |
---|---|---|
Overview Frame |
Used for primary navigation and contains the items linked to some important pages loaded directly into the Detail Frame
as well as the lists of all documented
The exact content of this frame is controlled by the parameter group: Navigation | Overview Frame Related template: overview-frame.tpl |
These are navigation frames, where you can quickly find what you need without disturbing the current view of the detail document. |
List Frame |
Displays one of the secondary navigation lists associated with a particular selection in the
Overview Frame.
All items in such lists are linked to corresponding main blocks targeted to the Detail Frame. The exact content of this frame is controlled by the parameter group: Navigation | List Frame |
|
Detail Frame |
Used to display the actual information content of the documentation.
Each of the main blocks becomes a separate HTML file (or page) displayed in that frame. Additionally, some general navigation pages/tools are displayed in that frame as well, e.g. Search. The initial content of the Detail Frame as well as some extra make-up of the detail pages loaded into it (like Navigation Bar) can be customized with the parameter group: Navigation | Detail Frame |
This frame is used to display the actual documentation content |
Navigation Lists
These are separate HTML pages displayed in the List Frame on a particular selection in the Overview Frame:There are following types of such lists:
List | Description |
---|---|
All Components |
The list of all XSD components.
It is generated only once and includes:
This list is linked from the «All Components» item in the Overview Frame. See the parameter: Navigation | Overview Frame | All Components Related template: all-components-frame.tpl |
Namespace |
This list
is generated for each documented namespace. It includes:
Such lists are linked from the namespace items in the Overview Frame. See the parameter: Navigation | Overview Frame | Namespaces Related template: namespace-frame.tpl |
Schema |
This list is generated for each documented XML schema.
It may include:
Such lists are linked from the schema file items in the Overview Frame. See the parameter: Navigation | Overview Frame | Schemas Related template: schema-frame.tpl |
Detail Header & Navigation Bar
In framed HTML documentation, the detail page may include the header & navigation bar inserted at the top. The navigation bar is added also at the bottom:
Dynamic Search
XSDDoc supports the dynamic search functionality that works similar to that in modern Javadoc. All identifiers like XSD component names, attributes etc. are indexed.The dynamic search-box powered by JQuery UI can be embedded into the Navigation Bar at the top and bottom of each detail page as shown on this screenshot (click to view in full size):
The search-box is also available on the special Search Page that shows the search help and index statistics, which lists what exactly is indexed. The Search page hyperlinked from the Navigation Bar and the Overview Frame.Related template: search.tpl
3. Single-File Documentation
This kind of documentation is generated by the SingleDoc.tpl main template.In that case, all main blocks are packed in a single document, which can be generated in any format supported by FlexDoc/XML (currently HTML and RTF).
- The sections are displayed in the same order as they appear in the documentation.
- The green text on the right of a section name shows the template parameter settings that enable that section.
- The sections with the red-colored titles can be started from a new page (RTF only). That is controlled by parameter group: Pagination
- The text like '1...∞' in a section title indicates that such a section can repeat as many times as there are appropriate objects the section describes.
4. Miscellaneous
Names of XML Files
Each source XML document/file (e.g. XSD etc.) loaded for processing is identified further by a certain name. That name is used in the generated documentation to reference that source XML.Case of File Pathname
If the source XML document was obtained by a local file pathname, the document's name will be just the name of that file (e.g.'sales.xml'
). That is the last name in the pathname's name sequence.
In that case, the settings of this parameter plays no role.
Case of URL
If the source XML document was obtained by a remote URL, the document's name will be the last name in the name sequence of this URL's path part optionally appended with the URL's query part.For example, for the URL (with the query part highlighted in red):
https://api.translator.com/V2/soap.svc?xsd=xsd0
soap.svc?xsd=xsd0
In other cases, the URL query part may contain just some options to the website for how the XML file should be produced, e.g.:
http://DEV/get.resource/wsdl/all?target=Java
Namespace Prefixes
- { namespace URI, local name }
<xs:schema>
.
At that, the namespace prefix is a local thing defined only in that XML document using a namespace URI/prefix binding.
For example, here is how the binding of the prefix 'xs'
to the namespace URI 'http://www.w3.org/2001/XMLSchema'
is defined:
That is controlled by the parameter:
If it is selected (true
), the corresponding namespace prefix will be added to each XML name. If this parameter is unselected
(true
), no namespace prefixes will appear in any XML names across the documentation.
Suppose you generate a single documentation for two XML schemas: schema1 and schema2 together.
The schema1 targets the namespace identified by the URI 'namespace_uri_1'
, which is bound to the prefix 'myns'
.
That schema defines a type component MyType.
So, in the documentation parts related to the schema1 that type will be referenced as:
myns:MyType
'namespace_uri_1'
to the prefix 'ns1'
. So, MyType will look in it as:
ns1:MyType
However, in both cases, the hyperlinks from the type's name will lead to the same location in the documentation with the MyType's details.
How To Unify Prefixes?
The mishmash of local namespace prefixes in the documentation may be not what you need. After all, namespace prefixes in component names can be helpful to quickly identify which namespace a particular component belongs to, especially when several namespaces are used together.
You can achieve that by using a driver schema. That is the schema that references from itself directly or indirectly (via
<xs:import>
,
<xs:include>
,
<xs:redefine>
directives) all other XML schemas you want to document. Then, you can:
-
Specify in the driver schema (i.e. directly in the
<xs:schema>
element) the bindings for those prefixes, with which you want to represent particular namespaces accros the entire documentation. - Specify the driver schema as the only input file for the generator.
- Make sure that this template parameter is selected: Show | Namespace Prefixes | Unify
It works as follows. When you start XSDDoc, you specify one or several input XSD files. Some of them may reference others. Some may import other schemas (XSD files) not listed on the command line. Initially, XSDDoc loads all directly specified XML schemas and all those referenced from them (imported, included, redefined) recursively. That bunch of all involved XML schemas is what is supposed to be documented. Then, XSDDoc divides that initial bunch into a few independent domains. A domain is defined so that all XML schemas included in it depend on each other (reference one another somehow directly or indirectly). Obviously, at least one of those schemas in the domain must be one specified directly to the generator (on the command line). That schema is assumed to be the domain's main XSD. There may be several candidates for such a main XSD. In that case, the selected will be one that was loaded first.
The main XSD concept is similar to "driver schema". The difference is that there may be any number of main XSDs. For instance, when you document together different versions of the same XML schema (defining the same namespace), all of them will become main XSDs. So here, each main XSD becomes the source of preferred namespace prefixes for all XSD components defined in its domain. The qualified names of all XSD components (prefix:localName) are determined on the initialization (loading/separation) phase. In that phase, XSDDoc creates special hashed element maps. Further, all documentation is generated mostly by those element maps, rather than directly by the XSD source.
There is a special situation however. Some XSD files may be involved simultaneously in different domains. All of them will define some imported namespace. Such shared XSDs are documented only once. Technically, each of them must have multiple main XSDs, whom they subordinate. However, the selected for such a role will be only one loaded first. That main XSD will provide the preferred namespace bindings for that shared schema.