This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: The notion of Inheritance?
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] The notion of Inheritance?
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Fri, 30 Mar 2001 15:06:42 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
Christobal:
> I don't understand what you can say. Perhaps a way to update elements
> attributes? Can you write an short, but full (XML & XLL) example.
I'm just saying that if you have the (presumptious) source document
<default-person height="180" sex="male" nationality="uk" knows-xslt="no"/>
<person height="170" sex="female"/>
Then you can do
<xsl:template match="person">
<person>
<xsl:copy-of select="//default-person/@*"/>
<xsl:copy-of select="@*"/>
</person>
</xsl:template>
To get the output
<person height="170" sex="female" nationality="uk" knows-xslt="no"/>
which is not quite what you wanted to do, but might be a way of getting
there.
Mike Kay
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list