Subject: RE: match="*:style"
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 25 May 2009 16:52:23 +0100
|
This is a previously unreported bug in Saxon 9.1. I have logged it at
https://sourceforge.net/tracker/?func=detail&aid=2796490&group_id=29872&atid
=397617
and a patch is being tested.
Regards,
Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay
> -----Original Message-----
> From: Merico Raffaele [mailto:raffaele.merico@xxxxxxx]
> Sent: 20 May 2009 14:35
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: match="*:style"
>
> Dear Community
>
> I process HTML/XHTML files passed as input to my XSLT
> stylesheet. I'm working with SaxonB 9.1.0.2.
> In order to catch the <style/> tag in the HTML/XHTML input
> file I defined the following match-rule.
>
> <xsl:template match="*:style[empty(./*) and
> normalize-space(./text()) eq '']">
> <xsl:element name="{node-name(current())}"
> namespace="{namespace-uri(current())}">
> <xsl:apply-templates select="@*"/>
> <xslo:value-of select="' '"/>
> </xsl:element>
> </xsl:template>
>
> Now I am surprised that above match applies also to
> style-attributes (i.e.
> style="border: 1px solid red;").
> I can imagine that this is caused by the star in the match.
> I used the star to mask the namespace-prefix in order match
> style-tags in the null and in the XHTML namespace (without prefix).
>
> Can anybody please explain me why this happens?
>
> Many thanks in advance
> Raffaele Merico
|