Subject: [xsl] Help with recursion (was: my brain is hurting) From: Chris Picton <chrisp@xxxxxxxxxxxxx> Date: Sat, 15 Jan 2005 12:04:32 +0200 |
<users> <user name="chris" parent="othergroup"> ... </user> <user name="phil" parent="othergroup"> ... </user> <group name="default" parent=""> ... </group> <group name="othergroup" parent="default"> ... </group> </users>
<modulesettings> <user name="chris"> <module useparent="1" > ...empty... </module> </user> <user name="phil"> <module useparent="0" > ...module settings... </module> </user> <group name="default"> <module useparent="0" > ...module settings... </module> </group> <group name="othergroup"> <module useparent="1" > ...empty... </module> </group> </settings>
Hi Chris,
Could you be more precise? I'm confused about the way you are using <usegroup> (which doesn't look like a valid element to me? And why should parameter value 'default' result only in 'chris'?
Cheers, Geert
Chris Picton wrote:
Hi all
I have the following xml structure. To paraphrase quickly, I have users and groups, each user or group has a parent group defined - except for group 'default', which is always top of the tree. I have settings for each user and group. Each settings node can be specified as 'use settings from parent group', or 'specify my own settings'.
<root> <settings> <user name="chris"> <usegroup="1" /> </user> <user name="phil"> <usegroup="0" /> ... </user> <group name="default"> <usegroup="0" /> ... </group> <group name="othergroup"> <usegroup="1" /> </group>
</settings> <users> <user name="chris" parent="othergroup"> ... </user> <user name="phil" parent="othergroup"> ... </user> <group name="default" parent=""> ... </group> <group name="othergroup" parent="default"> ... </group> </users> </root>
I am trying to write a transform which, when given a group name as a parameter, will output a list of usernames which will use that group's settings.
Example, if parameter 'group' == default, it will output "chris" in the above example
However, my xsl skills are nowhere near good enough for this.
Does anyone have ideas for me?
Regards
Chris
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] My brain is hurting, Geert Josten | Thread | Re: [xsl] Help with recursion (was:, Joris Gillis |
RE: [xsl] XSLT for math computation, Michael Kay | Date | [xsl] Use of fictitious types in th, Dimitre Novatchev |
Month |