Home > Archive > PERL Modules > February 2005 > XML::XSLT not recognizing attributes
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
XML::XSLT not recognizing attributes
|
|
| lars@nospam.nosoftwarepatents.edu 2005-01-18, 3:55 am |
| The module XML::XSLT seems not to recognize attributes.
According to what I read about patterns[1], this bit of XSLT should set
the string "FUBAR" before each and every h3 element where the attribute
class contains the value "subtitle":
<xsl:template match='h3[@class="subtitle"]'>FUBAR
<xsl:apply-templates/>
</xsl:template>
It doesn't seem to do that. However, it works without the attribute:
<xsl:template match='h3'>FUBAR
<xsl:apply-templates/>
</xsl:template>
What am I missing or doing wrong? Or does the module not support that yet?
-Lars
[1] James Clark (ed.) "XSL Transformations (XSLT) Version 1.0"
W3C Recommendation. 16 November 1999.
http://www.w3.org/TR/xslt#patterns
--
Lars
"Chances are that patents on software ... in fact stifle
innovation. Europe could still alter course"
http://www.nosoftwarepatents.com/en/m/intro/
| |
| lars@nospam.nosoftwarepatents.edu 2005-01-19, 8:57 am |
| Brian McCauley <nobull@mail.com> wrote:
: NAME
: xsltproc - command line xslt processor
[...]
Thanks, Brian.
--
Lars
"Chances are that patents on software ... in fact stifle
innovation. Europe could still alter course"
http://www.nosoftwarepatents.com/en/m/intro/
| |
| Jonathan Stowe 2005-02-15, 3:57 pm |
| lars@nospam.nosoftwarepatents.edu wrote:
> The module XML::XSLT seems not to recognize attributes.
>
> According to what I read about patterns[1], this bit of XSLT should set
> the string "FUBAR" before each and every h3 element where the attribute
> class contains the value "subtitle":
>
> <xsl:template match='h3[@class="subtitle"]'>FUBAR
> <xsl:apply-templates/>
> </xsl:template>
>
If you mail me and/or the xmlxslt-discuss@lists.sourceforge.net list
with some example XML, the stylesheet and the expected output we can
make a test for this with a view to getting it implemented properly.
/J\
|
|
|
|
|