LISTSERV mailing list manager LISTSERV 15.5

Help for XML-L Archives

XML-L Archives

XML-L Archives


Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font


Join or Leave XML-L
Reply | Post New Message
Search Archives

Subject: XSLT default rules
From: Sebastian Jekutsch <[log in to unmask]>
Reply-To:General discussion of Extensible Markup Language <[log in to unmask]>
Date:Thu, 9 Dec 1999 09:24:34 +0000

text/plain (47 lines)

A simple question about XSLT default rules. In the recommendation there is
a default rule as this:

<xsl:template match="text() | @*">
    <xsl:value-of select="."/>

So, if you have a XML source

<class name="Fred">

and an XSLT sheet

<xsl:template match="Fred">

it will result -- according to the default rule -- into


Is that right? Or did I get it wrong? I'm a bit surprised because this
behaviour doesn't make any sense to me. I cant think of
any example where this behaviour is useful. Who needs the attribute values?
I'm ok with
<xsl:template match="text()">
    <xsl:value-of select="."/>
but not with the @* in it.

O.K., I browsed through the Data Model section in XPath and found the

"Each element node has an associated set of attribute nodes; the element is
the parent of each of these attribute nodes;
however, an attribute node is not a child of its parent element."

Sorry, but that's simply nonsens, isn't it? However, that would solve my

Every hint or comment is welcome!

([log in to unmask])

Back to: Top of Message | Previous Page | Main XML-L Page



CataList Email List Search Powered by the LISTSERV Email List Manager