-
Notifications
You must be signed in to change notification settings - Fork 19
Description
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:
- Validate the assembly file with an assembly RNG schema
This ensures that the file adheres to the expected structures. - Was the validation was successful?
- If yes, proceed as usual.
- 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":
-
Simple validation
Validate the assembly againstassembly.rnc. Useful when the assembly doesn't contain any XIncludes. -
Extended validation with XIncludes
Validate the assembly againstassemblyxi.rncif the assembly contains XIncludes. As XIncludes are only allowed in specific places, that can be helpful to identify problematic spots. -
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