[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: The notion of Inheritance?

Subject: Re: The notion of Inheritance?
From: Cristobal Galiano Fernandez <c.galiano@xxxxx>
Date: Thu, 29 Mar 2001 16:31:23 +0200
Re:  The notion of Inheritance?
Michael:

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.

Perhaps this XML is good for you (?)
<?xml version="1.0" encoding="ISO-8859-1"?>
<Data>
   <person id="1" Nombre="Cristóbal" apell1="Garcia" apell2="Fernández"
edad="23" apell1="GalianoUpd" />
   <person id="1" Nombre="Cristóbal-Up1"  />
   <person id="1" apell2="Fernández-Up3" edad="24" />
   <person id="2" Nombre="Rocio" apell1="Senda" apell2="Zapata" edad="21" />
   <person id="3" Nombre="Alicia" apell1="Melliza" apell2="Joquer" edad="22" />

</Data>

Thanks in advance

Cristóbal G.F

Michael Kay escribió:

> > Can XML/XSL have the notion of inheritance?
>
> No, it doesn't. If you were using attributes rather than elements you could
> achieve something along the right lines with a template rule such as
>
> <xsl:template match="person">
> <person>
>   <xsl:copy-of select="person[@id=1]/@*"/>
>   <xsl:copy-of select="@*"/>
> </person>
> </xsl:template>
>
> This relies on the fact that when outputting attributes, the last attribute
> with a given name overrides earlier attributes with the same name.
>
> You're not using attributes, but you could convert the elements to
> attributes in a pre-pass. The alternative is a lot of <xsl:choose> logic.
>
> Mike Kay
> Software AG
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.