Skip to content

Support Validation of Assemblies #746

@tomschr

Description

@tomschr

Problem description

Currently at the time of writing, 14/73 assembly files in doc-modular don't validate. This can cause errors in the output or "unexpected" behavior from the assemble stylesheet.

Expected behavior

When you build a document from assemblies, it should do the following additional steps:

  1. Validate the assembly file with an assembly RNG schema
    This ensures that the file adheres to the expected structures.
  2. Was the validation was successful?
    1. If yes, proceed as usual.
    2. If not, display the error message from the validation and stop.

However, depending on which use case we want to support (with or without XIncludes), validation can involve different "levels":

  1. Simple validation
    Validate the assembly against assembly.rnc. Useful when the assembly doesn't contain any XIncludes.

  2. Extended validation with XIncludes
    Validate the assembly against assemblyxi.rnc if the assembly contains XIncludes. As XIncludes are only allowed in specific places, that can be helpful to identify problematic spots.

  3. Full validation
    If we want to ensure everything is correct, resolve all XInclude prior to validation. The validation itself can be done with simple validation.

Not sure if we really need XIncludes in assemblies. However, I got asked before if this is possible. So there may be a need for this functionality. With more and more Smart Doc articles for SLE 16, it could become more important.

Steps to reproduce problem

Run the following for-loop in doc-modular:

for file in articles/*.asm.xml; 
  do echo "=== Validating $file..."
  jing -c /usr/share/xml/docbook/schema/rng/5.2/assembly.rnc $file
  echo
done

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-assemblyEverything related to assembly processing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions