Subject: [xsl] The notion of Inheritance? From: William Bagby <williamb@xxxxxxxxx> Date: Wed, 28 Mar 2001 18:08:41 -0500 |
Can XML/XSL have the notion of inheritance? Here's an example: <people> <person> <id>1</id> <first-name>John</first-name> <last-name>Smith</last-name> <physical> <eyes>brown</eyes> <hair>black</hair> <height>6'1"</height> </physical> <occupation>Software Developer</occupation> </person> <person> <id>2</id> <first-name>Mary</first-name> <last-name>Jacobs</last-name> <occupation>Welder</occupation> </person> <person> <id>3</id> <first-name>Joe</first-name> <physical> <eyes>blue</eyes> </physical> </person> </people> Suppose I want to match id=2 and id=3 (respectively) and transform them to separate XMLs, using id=1 as the default: <person> <id>2</id> <first-name>Mary</first-name> <last-name>Jacobs</last-name> <physical> <eyes>brown</eyes> <hair>black</hair> <height>6'1"</height> </physical> <occupation>Welder</occupation> </person> <person> <id>3</id> <first-name>Joe</first-name> <last-name>Smith</last-name> <physical> <eyes>blue</eyes> <hair>black</hair> <height>6'1"</height> </physical> <occupation>Software Developer</occupation> </person> Is there a way to do with XSL, without resorting to XSP? I have tried and failed to come up with a solution to this. If any of you could point me in the right direction, I would really appreciate it. William Bagby. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Passing Parameters or ?, Sean Melvin | Thread | RE: [xsl] The notion of Inheritance, Michael Kay |
RE: [xsl] XSL, Michael Kay | Date | RE: [xsl] Re: using format-number(), Michael Kay |
Month |