This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: The notion of Inheritance?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]