[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[xsl] Can't get predicates working.
Subject: [xsl] Can't get predicates working. From: "Marco Mastrocinque" <mmfive@xxxxxxxxxxxxxxx> Date: Sun, 8 May 2005 06:17:53 +1000 |
Hi All, I'm having trouble with a predicate selection (i.e. a conditional selection). For the following xml structure. <company> <division DID="XXX"> <projects> <project PID='XYZ'> (Project ID) <PNAME>Some Name</PNAME> (Project Name) <BUDGET>111</BUDGET> <assigns> <assign refEID='XXX000'> <HOURS>12</HOURS> </assign> <assign refEID='XXX001'> <HOURS>78</HOURS> </assign> <assigns> </project> <project PID='XY1'> <PNAME>Some OtherName</PNAME> <BUDGET>112</BUDGET> <assigns> <assign refEID='XXX000'> <HOURS>34</HOURS> </assign> <assign refEID='XXX002'> <HOURS>1234</HOURS> </assign> <assigns> </project> Etc.. </projects> <employees> <employee EID='XXX000'> <ENAME>Joe Blow</ENAME> <OFFICE>1204</OFFICE> <BIRTHDATE>1924-08-01</BIRTHDATE> </employee> <employee EID='XXX001'> <ENAME>Joe Smith</ENAME> <OFFICE>1203</OFFICE> <BIRTHDATE>1930-08-01</BIRTHDATE> </employee> <employee EID='XXX002'> <ENAME>Joe Jerry</ENAME> <OFFICE>0003</OFFICE> <BIRTHDATE>1930-08-01</BIRTHDATE> </employee> </employees> </division> Etc.. (there are multiple divisions with the same structure, employees can only work for one division and a project only belongs to a single division ) </company> I won't to have a table that shows PID, PNAME, BUDGET and then the employee EID (unique identifier), the employee name (ENAME), OFFICE and HOURS spent on each project. The output I won't is Division Name = XXX PID='XYZ' PNAME=Some Name BUDGET=111 EID= XXX000 ENAME= Joe Blow OFFICE=1204 HOURS=12 EID= XXX001 ENAME= Joe Smith OFFICE=1203 HOURS=78 PID=' XY1' PNAME= Some OtherName BUDGET=112 EID= XXX000 ENAME= Joe Blow OFFICE=1204 HOURS=34 EID= XXX002 ENAME= Joe Jerry OFFICE=0003 HOURS=1234 This above output is done for every division. I have to match the refEID attribute of assign element with the EID attribute of employee element. Then out the EID (refEID), with the ENAME and OFFICE elements, while looping the projects for each division. I know it is a conditional selection (I think?), but I just can't get working. Thanks Marco Mastrocinque
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSLT CSS Style -> CSS Element, Alex Neblett | Thread | RE: [xsl] Can't get predicates work, Michael Kay |
Re: [xsl] <xsl:sort>, George Cristian Bina | Date | RE: [xsl] Can't get predicates work, Michael Kay |
Month |
Keywords