| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Forbid any direct network/disk side-effects for XSLT and make sure we
are using XML parser without network access.
In the future, there is an possibility to forbid also entities
replacement should it be considered risky and unintrusive.
The new lxml.etree wrappers are placed into new utils_lxml module.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
When XSLT-based commands passed a --profile switch, files per
xslt-profile-<filter name>-<hexa timestamp>.xml will be produced
(in an accumulative manner when a filter was multi-stepped).
Also add new ballast-prevention item to .gitignore accordingly.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
`None` apparently doesn't support "in" access.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Do not propagate "maxl" needed to set up a prefix as it is conveniently
memoized into "svc_output" callable within the context, and make it
(hopefully) clear that filters should complain about stuff via
flt_ctxt.ctxt_svc_output(msg, **kwargs) for uniformity.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Two subsequent attempts without a modification now lead to immediate
termination, preventing indefinite looping if the user was confused
enough (understandable).
This also prevents any sort of infloop when editor is specified as
something like "touch" for some mysterious reasons.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
| |
I.e., handle etree.XSLTApplyError being raised while executing the XSL
transformation and terminate (as this is fatal) without a traceback.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
To make it apparent that the decision is the same at multiple places.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
Show (also repeatedly, but good for clarity) the failed filter instead.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was the case with ccs-obfuscate-ids filter that could emit
something like
<xsl:template match="rm">
<xsl:variable name="failoverdomain" select="..."/>
<xsl:variable name="service" select="..."/>
</xsl:template>
as part of the resulting XSL template while explicit
<clufter:descent-mix preserve-rest="true"/> at the top-level
would lead to "identity transform" by default (modulo targeted
transformations explicitly requested) also for this erroneously
shadowed <rm> tag, just because of this bug stripping <rm>
completely as a result.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
... on output format instantiation (needless and unhelpful).
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
In that case, these directly passed kwargs take the precedence.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
| |
Possibly related to changes around
filter: fix issue possibly workarounded with text-only descent
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
This will also serve an "in-command-parameter interpolation" purpose.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
| |
...into root (~first) template (or more generally, any top-level XSLT
instruction from def_first as prescribed by the respective filter
definition).
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
...for the same tag
from previous commit:
> ... should be only for clufter:descent-mix (seems really a bad idea
> for clufter:descent)
-> turn the exception just into info log message for clufter:descent-mix
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
| |
... should be only for clufter:descent-mix (seems really a bad idea for
clufter:descent).
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
IOW, shallow/flat examination is not enough in that case. Some other
specialities, like xsl:variable, has to be taken into account as well.
For "to XSLT" experimental output (_xslt_template), at least, add a
comment explaining that situation is a little bit more complicated.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
| |
...standard way is to rely fully on flt_ctxt -- this is an injection
vector for convenient unit-testing (only) as also indicated by a
warning emitted when their presence is witnessed.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
(leverage previously defined docformat decorator)
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
IIRC, this is related to "filters/cib2pcscmd[group]" case where usage of
a parameter (presumably propagated from def_first) was attempted but did
not really worked with original descent-mix (hence text-only descent was
deemed a quick fix). This patch should be a much better solution to
that very problem ... so flip these "clufter:descent" instructions as
well.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
| |
Seems not to break anything + fits in the upcoming filter.
(fingers crossed)
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is needed so as to spread top level XSLT tags from implicit
def_first ($system{,_1,_2} params, etc.).
(Alternatively, we could somehow propagate the parameters Python-wise
and then passed them to respective method:
http://lxml.de/xpathxslt.html#stylesheet-parameters
but this seems bit more systemic [although clunky])
Related: rhbz#1207345
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
| |
Related to "script" RA ccs2pcs conversion provided by Patrik Hagara.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
| |
TODO: a test, likely more-than-unit one, to exercise _try_edit
Reported-by: Patrik Hagara <phagara@redhat.com>
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
|
|
|
| |
+ start respective unit tests
+ fix faulty format passing logic as observed with the new plugins
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
|
|
|
| |
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|