Visualizing the Node Type Hierarchy is non-trivial, even in the case of a repository containing only the default Jackrabbit node types. Here, GraphViz can help:

!jackrabbit-nodetypes.png! Node Type Hierarchy for Jackrabbit (SVG version )

In this diagram, the rounded boxes represent node types (green for mixins, gold for primrary types), with the arrows indicating the node inheritance. The square boxes represent child node and property definitions.

To generate these diagrams, you will need:

  1. A system view export of "/jcr:system/jcr:nodeTypes".
  2. An XSLT processor and the XSLT code below.
  3. The GraphViz tool

    <!-- A tool for converting the system view of /jcr:system/jcr:nodeTypes to GraphViz input (see http://www.graphviz.org/).

    Usage:

    1: Export System View of /jcr:system/jcr:nodeTypes

    2: Run XSLT transformation, producing a .dot file, such as with

     $ saxon nt-sample.xml jcr-nodetypes-to-dot.xslt > nt-sample.dot
    

    3: Run Graphviz, for instance

     $ dot nt-sample.dot -Tsvg -o nt-sample.svg
    
     ...producing nt-sample.svg as output.
    

    -->

    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:ed="http://greenbytes.de/2002/rfcedit" xmlns:exslt="http://exslt.org/common" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"

    digraph { rankdir=LR; }

    " " [style = "filled, rounded", fillcolor = greenyellow] ; [style = "filled, rounded", fillcolor = gold] ;

    " " -> " " [dir = back, tooltip = "supertype"] ;

    <xsl:variable name="name">
      <xsl:choose>
        <xsl:when test="sv:property[@sv:name='jcr:name']
    

    "> *

    <xsl:variable name="id" select="generate-id()"/>
    
    <xsl:value-of select="concat('  &quot;',$id,'&quot; [shape = box, style = filled, fillcolor = khaki, label=&quot;',$name,'&quot;]
    

    ')"/>

    <xsl:text>  "</xsl:text>
    <xsl:value-of select="../@sv:name"/>
    <xsl:text>" -> "</xsl:text>
    <xsl:value-of select="$id"/>
    <xsl:choose>
      <xsl:when test="sv:property[@sv:name='jcr:mandatory']
    

    /sv:value='true'"> " [tooltip = "is mandatory child node of", dir = back] ; " [style = dotted, tooltip = "is child node of", dir = back] ;

    <xsl:text>  "</xsl:text>
    <xsl:value-of select="sv:property[@sv:name='jcr:requiredPrimaryTypes']
    

    /sv:value"/> " -> " " [dir = back, tooltip = "has primary type"] ;