RE: [xsl] The notion of Inheritance?

Subject: RE: [xsl] The notion of Inheritance?
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Fri, 30 Mar 2001 15:06:42 +0100
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


Current Thread