Merged
Conversation
1bb8edc to
94240de
Compare
fcc7054 to
8bd501a
Compare
8bd501a to
a73962f
Compare
…prove diagnostics, and refactor the code
…e user to specify the template directory
9ad6bcb to
017c7d0
Compare
iakov
approved these changes
Jan 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preprocessor of xml nodes before sending them to the
Constraints Parser.Syntax for defining a
template:defaultvalue. It can be avalidsequence ofxmlnodes or set as a text string (via thedefaultattribute). If both are set, thedefaulttakes precedence. In parameter declarations, you can use parameters from the initialization list above using the syntax#{}.CDATA, and eachparameterreference is processed using the#{}syntax, which is handled byregular expressions. This means that nested use of the#{}syntax is not allowed, and a separate parser is provided for such cases, which will complain if anundeclaredparameter is used in thetemplate body.Syntax for using a template:
xml tagsare specified using thewithsyntax with theparamattribute, whose child is asequence of valid xml nodes.Text parametersare specified using thewithtagattributes, andparameterscan be grouped in multiplewithtags.textparameters at the same level as theusetag without usingwith:Templates can reuse other templates, that is, use syntax in their bodies to refer to other templates:
Cyclic links between templates are
notallowed.A system template library for typical actions should be supported.
Thus, checking whether an
objectis in theregionboils down to using thetemplatedefinedabove:There is an environment variable
TRIK_PREPROCESSOR_XML_OUTPUT, which allows you to getpreprocessed xmlinConstraint Parser syntaxevery time you loadxml.