Subject: Re: [xsl] Aargh - wrong template applied From: Ian Eure <ieure@xxxxxxxxxx> Date: Wed, 19 Apr 2006 10:45:01 -0700 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Ian Eure 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.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 relevant information:
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.
- -- Ian Eure Developer, eNotes.com LLC
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin)
iD8DBQFERncdxuUdPD6j2IMRAhNCAJ9q3I0FgVzD2LvCrT3toYDmf9U/DACdF/po cctkD42wir7u6IVtwkUHuvk= =ddzu -----END PGP SIGNATURE-----
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Aargh - wrong template ap, J.Pietschmann | Thread | RE: [xsl] Aargh - wrong template ap, Michael Kay |
Re: [xsl] preserving count function, Mukul Gandhi | Date | Re: [xsl] Aargh - wrong template ap, Ian Eure |
Month |