Skip to main content

 Services

Web services from /about to /webhooks

list uri xreftree

/groups/{group}/uris/{uri}/xreftree [GET]

com.pageseeder.xref.XRefTreeLoader

Description

Loads the xref tree for a PSML URI.

Starting from a nominated URI, this service returns a tree of fragments that contain xrefs.

  • The fragments and xrefs in the tree are in the same order as they are in the document, starting with the default fragment.
  • Only PSML document fragments accessible to the group are in the response.

If allfragments=false and depth is larger than 1:

  • Forward xrefs to fragments (not default) only include xrefs from that fragment.
  • Reverse xrefs only include reverse xrefs from that fragment and default.

If duplicates=false and xrefs for a URI or fragment have already been output, they might be omitted at another position in the tree when they are leaf nodes. When this happens, the element <omitted forward="[true|false]" reverse="[true|false]" /> is output. If forward="true", then forward xrefs might have been omitted and if reverse="true", then reverse xrefs might have been omitted. They are omitted from that point and lower in the tree.

Parameters

NameDescriptionRequiredTypeDefault value
allfragmentsWhether to follow xrefs in fragments not directly referencednobooleanfalse
duplicatesWhether to output duplicate xrefs (that already appear in the tree)nobooleanfalse
followtypesComma-separated list of types of xr3efs to follownostringembed,transclude
forwardWhether to include forward xrefsnobooleantrue
forwarddepthThe maximum depth of forward xrefs to follownointeger0
propertiesComma-separated list of property names to include (not properties with datatype="xref" or markdown)nostring
reverseWhether to include reverse xrefsnobooleanfalse
reversedepthThe maximum depth of reverse xrefs to follownointeger0
typesComma-separated list of types of xrefs to include (default all)nostring
versionName of version to load for all documentsnostring
xrefsizeThe maximum number of xrefs returnednointeger500

Permission

This service is restricted to guest and higher unless the group is accessible to public.

Response

Output format is as follows:

<uri id=[id] ... >
  <!-- URI details -->
  <displaytitle>[displaytitle]</displaytitle>
  ...
  <fragment id="default">
    <!-- Forward XRefs found -->
    <xref title="[title]"
          display="[display]"
          uriid="[target ID]" ... >
            [<metadata>
              <property name="" ... /> ... </metadata>]

      <fragment id="[fragment ID]"
                    [labels=""] ...>
        [<property name="" ... /> ...]
         ...
      </fragment>
      <fragment ...> ... </fragment>
      ...
    </xref>
    <xref title="[title]"
              display="[display]"
              uriid="[target ID]" ... />
    <xref title="[title]"
              display="[display]"
              uriid="[target ID]"
              frag="2" ...>
      <fragmentnotfound id="2"/>
    </xref>
    ...
    <!-- Reverse XRefs found -->
    <reversexref title="[title]"
                 display="[display]"
                 uriid="[source ID]"
                 [urilabels=""] ...>
      <fragment ...> ... </fragment>
      ...
    </reversexref>
       ...
    </fragment>
    <fragment id="10">
      <xref title="[title]"
            display="[display]"
            uriid="[target ID]"
            [urilabels=""]
            [blocklabels=""]
            [inlinelables=""]
            [property=""] ... >
        <!-- if forward or reverse xrefs have been omitted
          -->
        <omitted forward="true" reverse="true"/>
      </xref>
    </fragment>
     ...
    <!-- if xrefsize has been reached -->
    <limitreached xrefs="[xrefsize]"/>
</uri>

Error Handling

No specific errors expected for this service.

Created on , last edited on