This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: what should be the correct subject line
- From: TSchutzerWeissmann at uk dot imshealth dot com
- To: xsl-list at lists dot mulberrytech dot com
- Date: Tue, 13 Aug 2002 09:56:31 +0100
- Subject: RE: [xsl] what should be the correct subject line
- Reply-to: xsl-list at lists dot mulberrytech dot com
thiabek wrote:
> hello thanks
> but it is not working.
> I want output in wml format and it is coming but with some unwanted
> entities.
> the <p> </p> are still in the output.
> What can be the reason.
Most likely one of your templates is putting them there.
> And testing for <br>what you have suggesterd is like reverse of what i
> wanted.
> by writing
> <xsltemplate match="a/br | li/br | br/br">
> <xsl:apply-tempates />
> </xsl:template>
> i would have to write <xsl:template match="p/br | div/br and so on">
> </br>
> </xsl:template>
No, all you'd need to write is
<xsl:template match="br">
<br>
<xsl:apply-templates/>
</br>
</xsl:template>
because of the precedence rules for templates. The first template is more
specific, so
it has higher priority, so any <br>s with <a> <li> or <br> parents will be
matched by that
while any other <br>s will be matched by the one I've given you.
try it.
Tom
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list