Coder Social home page Coder Social logo

ldd_utilities's Introduction

ldd_utilities

Miscellaneous utilities for working with local data dictionaries in PDS4

IngestLddView

The first utility is IngestLddView, which will convert an Ingest LDD file into files that are easier for a non-XML user to use and visualize.

Requirements

You will need an XML stylesheet processor such xsltproc or saxon to transform your dictionary.

xsltproc is available at http://xmlsoft.org/XSLT/xsltproc2.html

Saxon is available at https://sourceforge.net/projects/saxon/files/Saxon-HE/9.8/

If you want to be able to visualize the dictionary, you will need Graphviz, which is available at https://www.graphviz.org/

Mitch Gordon at SETI has provided some additional notes on using IngestLDDView with windows.

Getting the stylesheets

You can download both stylesheets from GitHub. Unless you have GitHub experience, use the links below:

HTML version

Graphviz Version

Html

IngestLddView will convert an Ingest LDD file into a (more) human-readable html document.

This will include every class in the dictionary, starting from any class that has the element flag. From there, it will show nested classes and attributes. If the namespace prefix is correct, it will also show the XPath expression for each element, and the human readable description of the schematron rules for that element.

IngestLddView can be invoked with the following command

xsltproc IngestLddView.xsl [ingest ldd file] > [htmlfile]

or

saxon -xsl:IngestLddView.xsl -s:[ingest ldd file] -o:[htmlfile]

Graphviz

A graphviz companion to IngestLddView is IngestLddDot. This will convert an Ingest LDD file into a graphviz dot file, which can be used to quickly visualize the relationships between classes, as well as find problems such as orphaned classes, attributes or rules. IngestLDDDot is invoked the same way as IngestLDDView:

xsltproc IngestLddDot.xsl [ingest ldd file] > [dotfile]

or

saxon -xsl:IngestLddDot.xsl -s:[ingest ldd file] -o:[dotfile]

From there, your dot file can be converted to a graphical format.

For instance, to get a pdf, run:

dot -O -Tpdf [dotfile]

UML

A UML companion to IngestLddView is IngestLddDot. This will convert an Ingest LDD file into a PlantUML file, which can be used to quickly visualize the relationships between classes. IngestLDDPlantUML is invoked the same way as IngestLDDView:

xsltproc IngestLddPlantUml.xsl [ingest ldd file] > [umlfile]

or

saxon -xsl:IngestLddPlantUml.xsl -s:[ingest ldd file] -o:[umlfile]

From there, your uml file can be converted to a graphical format.

For instance, to get an svg, run:

plantuml -tsvg [uml]

Known issues:

Need to add support for xs:any The output is not exactly attractive. Need to format it for easier comprehension.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.