-
Notifications
You must be signed in to change notification settings - Fork 16
Description
In the apidoc, currently the transformation code has an assumption that if there are subcategories, then we will not create a category summary page. For many things, this is sensible. But we would like to have the ability to have the code generate one. For the js libraries like jsearch and Optic, this is desired. I think the part of the code that does this is here:
The logic I would propose is as follows:
The content in the xml files is in /apidoc:module/apidoc:summary (note: this is not the same as the apidoc:summary elements under apidoc:function). The /apidoc:module/apidoc:summary element has a category and an optional subcategory attribute. It currently creates only subcategory pages if there is any apidoc:summary element that has both category and subcategory attributes. In this case, if there is an apidoc:summary element with just a category atribute, it is ignored.
The change in logic should be to create a summary page with the content in the /apidoc:module/apidoc:summary element with the category attr (but with no subcategory attrs).
For an example of this, see the jsearch.xml file which is in the 8.0 and later zip file under:
MarkLogic_8_pubs/pubs/raw/apidoc/jsearch.xml
The first apidoc:summary element in there has a category but no subcategory, but that content is never dispayed. To see what this currently looks lik, go to this page:
http://docs.marklogic.com/js/DocumentsSearch
In this case, what we want to do is create a new page and give the toc links to it with a name corresponding to the category (I think there is already code in there to come up with the name based on the attribute value).
If you need more details on this, talk to @kcoleman-marklogic or @gfurbush .