Discussion:
Multiple py:match not affecting xi:include
Micah Stevens
2014-10-22 16:49:39 UTC
Permalink
I have a primary genshi template that I'm trying to apply several overrides
to in an xsl:fo template:

<py:match path="fo:page-sequence[@master-reference='invoice-sequence']">
...
</py:match>
<xi:include href="main.xml" />


.. This works fine, but when I provide more than one py:match tag, like
this:

<py:match path="fo:page-sequence[@master-reference='invoice-sequence']">
...
</py:match>
<py:match path="fo:block[@id='dateF']">
...
</py:match>
<xi:include href="main.xml" />




Only the last py:match will work. I can move the xi:include around, and it
seems to only be affected by a py:match directly above it, and not at all
at the top. What I would expect to work is the include at the top, which
starts the stream, and then py:matches after it to modify the stream, but
this doesn't seem to be the case, as the py:matches only work if they're
placed before the xi:include

Could someone explain to me how to accomplish my goal of using more than
one py:match against the xi:include? I'd also love it if there was some
theory about includes and py:match so that I could understand why this
behaviour is how it seems.


Thank you for any insight into this, or suggestions on how to improve my
approach.
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to genshi+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/genshi.
For more options, visit https://groups.google.com/d/optout.
Simon Cross
2014-10-23 11:36:37 UTC
Permalink
Could you perhaps provide a minimal example of main.xml that shows the problem?
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to genshi+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/genshi.
For more options, visit https://groups.google.com/d/optout.
Micah Stevens
2014-10-24 20:23:09 UTC
Permalink
In the interest of brevity, I concocted an example to show you with a much
simpler format - which of course worked as expected. So there's some nuance
to my full structure which is causing the problem.

Thanks, this gives me a working base to start with, I can probably
troubleshoot from here. I'll follow up when I find out what the issue is.

Appreciate your time getting me on the right track!
-Micah
Post by Simon Cross
Could you perhaps provide a minimal example of main.xml that shows the problem?
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to genshi+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/genshi.
For more options, visit https://groups.google.com/d/optout.
Simon Cross
2014-10-25 23:01:31 UTC
Permalink
Np! Keen to hear what the issue was if you discover it. :)
--
You received this message because you are subscribed to the Google Groups "Genshi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to genshi+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/genshi.
For more options, visit https://groups.google.com/d/optout.
Loading...