-----BEGIN PGP SIGNED MESSAGE-----
On Apr 18, 2006, at 5:45 PM, J.Pietschmann wrote:
I thought it might be a bug as well, but it happens with every
processor I've tried; Sablotron, Saxon, xsltproc, and Xalan-J.
Ian Eure wrote:
I want to pass through the document as-is in most cases, but make
certain changes elsewhere. I have a generic pass-through rule, and
a more specific rule to strip out <font> elements, but retain
their children. However, the latter template is never called, and
I can't figure out why.
I'm using XSLTProc. Turning on it's verbose mode gives me some
added pattern : '@*' priority -0.500000
added pattern : 'node()' priority -0.500000
added pattern : 'font' priority 0.000000
Looks good, but then:
xsltProcessOneNode: applying template '@*|node()' for font
Why isn't the latter template ever applied, and how do I get the
behavior I want?
This may be a bug in xsltproc. You can try some voodoo and move the
generic copy-through to the end of the style sheet. The order of
the templates should only matter if there is a tie in the priority
for matching patterns though. You could also try to assign a high
positive priority to the font matching template. In either case, I'd
ask on the relevant xsltproc specific list, maybe they have already
a proper solution.
I have tried:
- - Changing the priority of the passthrough rule to -999, and the
priority of the font rule to 999.
- - Moving the templates around in the document.
- - Reversing the priorities, so the rule I wanted was -999 and the
passthrough was 999.
They all resulted in the same behavior.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
-----END PGP SIGNATURE-----
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>