Skip to content

RNG: Refactor Product/Portal Schema #187

@tomschr

Description

@tomschr

Situation

As discussed in Meeting Portal Datamodel, some structures in the RNC need to be change. The RNC schema needs to be adjusted to make it flexible for our upcoming use cases.

Use Case

The RNC schema served us well, but we have now use cases we need to cover:

  • CN and MLM teams need to be able to write a <product> or <docset> as root elements in their files.
  • We need to reference to internal HTML documents that are not being built by DAPS.
  • Having XIncludes on specific sections may help to modularize the config file.
  • Translations need to be collected by language, not other groups.

Possible Implementation

The RNC schema need to refactored in certain ways:

General

  • Add DocBook tags to document the important parts in the RNG schema. This can be extracted to create a public documentation.
  • Include XInclude.

<portal> Content model changes

  • Use <portal> as root element.
  • Allow more start elements (not only <product>).
  • Add new portal/categories element
  • Add new portal/productfamilies element
  • Add new portal/series element

<product> Content model changes

  • Allow a wrapper element <descriptions> that holds multiple elements.
  • Add a new series attribute.
  • Add a new family attribute.
  • Add a new rank attribute. This determines the order of the product tile on the homepage.
  • Allow XInclude elements on the docset level
  • Add <categories> to allow local categories
  • Remove site-sections
  • Add new series attribute

<docset> Content model changes

  • Rename <overridedesc> to <description>

<categories> and <category> Content model changes

  • Add a new <categories> element

  • Group <category> for language, not category ID. For example:

    <category lang="en-us" default="true">
      <entry categoryid="about" title="About" />
      <entry categoryid="deployment" title="Deployment" />
      <entry categoryid="inital-config" title="Initial configuration" />
      <!-- ... more entries ... -->
    </category>

<deliverable> Content model changes

  • Add <html> (name subject to change) as a sibling of <dc>. These are internal documentation that are marked as "external" because we haven't the capabilities to do so.
    The content model would look like:

    ds.html := element html {
       attribute id { IDREF },
       ds.title,
       ds.subtitle?,
       ds.desc+,
       ds.link
    }
    

    Possible names: <resource>, <document>, <doc>, <entry>, or <item>. Or create a more general element that can contain both types?

<internal> and <external> Content model changes

  • Allow descriptions in internal links to customize descriptions:

    <internal>
      <!-- for references which can't use the default description, use the individual one -->
      <ref product="sle-micro" docset="5.5" dc="DC-SLE-Micro-Admin" category="best-practices" titleformat="title subtitle">
        <descriptions> ... </descriptions>
      </ref>
    </internal>
  • Allow descriptions in external links:

    <external>
      <link category="about" gated="true | false">
        <url href="..." format="html | pdf | ..." /><!-- one or more -->
        <descriptions>
          <desc lang="en-us"><!-- must be first, required -->
             <title>The title</title>
             <!-- optional HTML child elements -->
          </desc>
          <!-- more <desc> elements for other languages --->
        </descriptions>
      </link>
    </external>

Removed Content models

Some elements which aren't used or not really useful anymore:

  • Remove ds.deliverablerestricted
  • Remove ds.param
  • Remove ds.buildcontainer (including ds.type.hexdigest and ds.type.containerref)

Some attributes which aren't used or not really useful anymore:

  • Remove meta
  • Remove includes-productname
  • Remove translation-type

Other Content model changes

  • Should we simplify the language element in regards to the translation-type attribute?

  • Do we need a <metadata> element somewhere?

  • Change the <ref/> element to allow to point to any deliverable file:

    <ref product="cloudnative" docset="storage" deliverable="cn-storage-concepts"/>

    => Can we consolidate that and don't distinguish between DC and HTML anymore? Maybe a more general entryref attribute?

Metadata

Metadata

Assignees

Labels

area:validationAbout validation of XML (RNC), TOML, or any other partskind:breakingChanges that break APIs, configs, or backward compatibility.kind:refactorCode cleanup without logic change.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions