Mensen ik heb de volgende XML-code:
Ik wil aan de hand van deze code een html pagina creëren. Ik weet dat ik eerst een xsl moet maken, maar ik heb het volgende probleem. <item>63-1010</item> uit <lines> staat gelijk aan <number>63-1010></number> uit <items>. Nu wil ik een html pagina creëren waarin de <description> bij de <item> wordt geplaatst.
Dus:
bij elke line id uit lines moet de description uit items bijgezocht worden. Kan iemand mij hiermee helpen? Ik heb ook op de site van W3schools gekeken, daar hebben ze het over een key-function, maar ik kom er gewoon niet uit.
XML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
| <orders> <invoices> <invoice> <invoicedata> <nbr>2001-1965</nbr> <date>2005-05-26</date> <totalexcl>7784.55</totalexcl> <tva>1634.76</tva> <total>9419.31</total> <duedate>January 11th. 2002</duedate> </invoicedata> <customerdata> <custid>ALFKI</custid> <company>Alfreds Futterkiste</company> <contact>Maria Anders</contact> <pcode>12209</pcode> <city>Berlin</city> <country>Germany</country> <address>Obere Str. 57</address> </customerdata> <lines> <line id="1"> <item>63-1010</item> <unit>EACH</unit> <priceexcl>7.85</priceexcl> <qty>10</qty> <subtotal>78.50</subtotal> </line> <line id="2"> <item>63-1015</item> <unit>EACH</unit> <priceexcl>39.69</priceexcl> <qty>30</qty> <subtotal>1190.70</subtotal> </line> <line id="3"> <item>63-2212</item> <unit>ROLL</unit> <priceexcl>1.53</priceexcl> <qty>50</qty> <subtotal>76.50</subtotal> </line> </lines> </invoice> </invoices> <catalog> <items> <item> <number>63-1010></number> <description>BULLETIN BOARD. 18" X 24"</description> </item> <item> <number>63-1015></number> <description>CHAIRMAT. 46" X 60"</description> </item> <item> <number>63-2212></number> <description>TAPE. MASKING. 2"</description> </item> </items> </catalog> </orders> |
Ik wil aan de hand van deze code een html pagina creëren. Ik weet dat ik eerst een xsl moet maken, maar ik heb het volgende probleem. <item>63-1010</item> uit <lines> staat gelijk aan <number>63-1010></number> uit <items>. Nu wil ik een html pagina creëren waarin de <description> bij de <item> wordt geplaatst.
Dus:
bij elke line id uit lines moet de description uit items bijgezocht worden. Kan iemand mij hiermee helpen? Ik heb ook op de site van W3schools gekeken, daar hebben ze het over een key-function, maar ik kom er gewoon niet uit.