Auxiliary XML format documentation?

The Backup Omissions wiki page list 4 auxiliary XML documents that Gramps generates:

The primary .gramps XML format is documented in Where are the docs for the auxiliary XML files?

This question was prompted while collating a list of Feature Requests for add-on custom filter Rules in MantisBT. The long-term goal being productive exercises of trying to create the rules in SuperTool … while also clearing some outstanding requests. And to use the experience to improve the wiki on filters and a writing rules workflow. (Particularly, using SuperTool, FilterParams, & the Query Gramplet in concert. With an eye towards a workflow on optimizing & converting a privately created rule into a public add-on.)

I was wondering if the XML formats included chunks to make the file more failsafe?


  • Since reports in Books.xml tend to reference custom filters, does the format embed a trimmed copy of the custom_filters.xml as a failback?
  • Since custom_filters.xml may reference add-on Rules, is a chunk listing requisite add-on Rules included for validation purposes?

Hum… I’m renaming my filters. My books will probably not work anymore…

Thanks for this post.

1 Like

Do you know how filters are stored in books.xml ?

In that entry:

  <book name="Legoux, André" database="G:\8. Données techniques\Données\Gramps\Gramps 5\62d2ad71">
    <item name="simple_book_title" trans_name="Page de garde">
      <option name="footer" type="unicode" value=""/>
      <option name="imgid" type="unicode" value="O00002"/>
      <option name="imgsize" type="int" value="0"/>
      <option name="subtitle" type="unicode" value=""/>
      <option name="title" type="unicode" value="André Legoux"/>
      <style name="default"/>
    <item name="indiv_complete" trans_name="Fiche individuelle complète">
      <option name="cites" type="bool" value="True"/>
      <option name="date_format" type="int" value="1"/>
      <option name="filter" type="int" value="0"/>
      <option name="images" type="bool" value="True"/>
      <option name="inc_id" type="int" value="1"/>
      <option name="incl_attrs" type="bool" value="True"/>
      <option name="incl_census" type="bool" value="True"/>
      <option name="incl_notes" type="bool" value="True"/>
      <option name="incl_private" type="bool" value="False"/>
      <option name="incl_relname" type="bool" value="True"/>
      <option name="incl_tags" type="bool" value="False"/>
      <option name="incsrcnotes" type="bool" value="True"/>
      <option name="living_people" type="int" value="99"/>
      <option name="name_format" type="int" value="1"/>
      <option name="pageben" type="bool" value="True"/>
      <option name="pid" type="unicode" value="Bk00004__"/>
      <option name="place_format" type="int" value="-1"/>
      <option name="sections" type="unicode" value="True,True,True,True,True,True,True,True,True"/>
      <option name="sort" type="bool" value="True"/>
      <option name="trans" type="unicode" value="default"/>
      <option name="years_past_death" type="int" value="0"/>
      <style name="default"/>
    <item name="SourcesCitationsReport" trans_name="Rapport de sources et citations">
      <option name="date_format" type="int" value="1"/>
      <option name="filter" type="int" value="2"/>
      <option name="footer" type="unicode" value="2021, Généalogie de Patrice Legoux -"/>
      <option name="showperson" type="bool" value="True"/>
      <option name="subtitle" type="unicode" value="Source et citations"/>
      <option name="title" type="unicode" value="Sources ayant trait à Legoux, André"/>
      <option name="trans" type="unicode" value="default"/>
      <style name="default"/>
    <item name="table_of_contents" trans_name="Table des matières">
      <option name="trans" type="unicode" value="default"/>
      <style name="default"/>
    <paper name="A3"/>
    <orientation value="0"/>
    <metric value="0"/>
    <size value="29.692600 42.011600"/>
    <margin number="0" value="2.540000"/>
    <margin number="1" value="2.540000"/>
    <margin number="2" value="2.540000"/>
    <margin number="3" value="2.540000"/>
    <format name="pdf"/>
    <output name="G:\0. Données généalogiques\2. Individus\LEGOUX\Legoux, André\20220820, Livre.pdf"/>

the only one filter entry I find is that one:

      <option name="filter" type="int" value="2"/>

I don’t have any filter named 2 so I think it’s a kind of index but an index in what list?

When I open another book with filters on Places (image bellow), I can see filters used aren’t those needed for that book dedicated to a specific place. So if it’s an index it doesn’t match filters when filter lists change.

This seams really to be an issue.

books.xml saves the report options for each report. In the report options filters are stored as enumerated lists (index, filter_name). In books.xml only the value of a filter is saved and not its name. The number 2 means the filter is 2nd or 3rd item in the filter list (depending if the first filter/item starts with 0 or 1) used in the SourcesCitationsReport.