1
How can I customize HTML documentation from multiple json schema files
Question asked by Suzanne Brower - 9/19/2024 at 9:27 PM
Unanswered
I am using the XML Editor edition of Liquid XML.  I have 34 interrelated json schema documents for which I want to create HTML documentation.  The default functionality works fairly well; however I want to make some customizations, and I do not want to have to directly modify the html each time I generate the documentation.  I would like to change the footer, not have the source file named on the images, not have any items below Root Schema level as part of the menu etc.  Another problem is that the generated documentation uses frames and I would like to change the background color of one of the two frames.  
I have seen similar things done with xslt documents for .xsd files, however without xml to reference I am unsure how I can properly filter the information I wish to modify.  Is there a way to do this for the json schema files?  I tried converting them to xsd files, however doing that one file at a time each time I need to regenerate the documentation is not a feasible solution.

4 Replies

Reply to Thread
0
Liquid Support Replied
Employee Post
Hi, I will need to check with the dev team as it looks like we do not currently supply the JSON Schema XSLTs in the install, the same way we do for XSDs.

You can remove the branding from the images by deselecting the setting:
Tools->Options->Environment->Write Banner Comments
0
Suzanne Brower Replied
Thank you for the information about the Write Banner Comments option, that cleaned up our images nicely.  Is there a similar way to stop the directory for the source from being included below the source block?  The value is not applicable to users who are reading the documents on a different host as their copy of the source is in a different location and they really don't need to know what the directory tree of my laptop looks like.  I am currently making it hidden in the css, but not having it generated would be even better.
0
Liquid Support Replied
Employee Post
Hi,
Liquid Studio v20.7.15 now includes the missing folder JsonSchemaToHtml, containing example XSLT templates for JSON Schema to HTML documentation generator

They can be used in the same way as the XsdToHtml templates as described here:

  1. Copy the folder from C:\Program Files\Liquid Technologies\Liquid Studio\DocTemplates\JsonSchemaToHtml to your development folder.
  2. Edit your copy of the XSLT as required.
  3. Open your JSON Schema.
  4. Select Tools->Generate Documentation.
  5. Add additional schemas.
  6. Click next and select the option 'Use custom XSLT templates to generate documentation'.
  7. Enter the location of Main.xslt from your customised template folder (created in step 1).
  8. Click next and select you Output Directory.
  9. Click next and set the Title etc.
  10. Click Finish and your custom documentation is generated.



0
Suzanne Brower Replied
Thank you so much for your responses and responsiveness.  The xslt files for json schemas helped a lot.  Knowing how to remove the banner from the images makes them look much cleaner in the resulting documentation.

Reply to Thread