xsl-list
[Top] [All Lists]

RE: [xsl] match="*:style"

2009-05-25 11:53:12
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(_dot_)merico(_at_)less(_dot_)ch] 
Sent: 20 May 2009 14:35
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] 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


--~------------------------------------------------------------------
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>
--~--



--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>